Creating strings and patterns at DAL or JAL execution time
DAL and JAL provide several facilities that allow you great flexibility for the creation of character strings and patterns at execution time:
- A substring function.
- A pattern definition capability.
- A string definition capability.
- A concatenation operator (||).
The usefulness of these features is best understood by looking at some examples.
Sometimes you are only interested in a portion of the contents of a character Descriptor. For example, assume that your installation wants to enforce the following standard: the first three characters of every job name must match the third, fourth, and fifth characters of the RACF userid.
Two requirements are immediately obvious:
- We need a way to isolate the required characters from the RACF userid. This requirement is met by the familiar concept of a substring function.
- We need a way to use the new substring in a pattern that we can match against the jobname. This is done using the PATTERNDEF statement.
Also, as will become obvious as we follow these examples, another tool is required: the concatenation operator.
The following sections introduce the substring function, the PATTERNDEF statement, and the concatenation operator and show how they are used together.