Substitutes system and user symbols into a string.
&CALL PROC=$CAPKBIF PARMS=(PLEXSUB,string,subchar,static,dynamic, usymbol1,uvalue1, ...,usymbol50,uvalue50)
Operands:
Specifies the string with variables to be substituted.
subchar
Specifies the prefix that designates a variable (the variable designator). This allows you to alter the variable designator to a value other than the default value of the ampersand (&). By altering the variable designator, you prevent NCL from substituting variables with its values when defining the string, which would lead to incorrect results.
Note: You can use more than one character, for example,. '%^'.
Specifies whether static system symbols are used. Valid values are Y or N.
Default: Y
Specifies whether dynamic system symbols are used. Valid values are Y or N.
Default: Y
Specifies optional pairs of up to 50 user-defined symbols and their values. The symbol name is up to 16 characters long, with the first character being an alphabetic or national character and the remaining alphanumeric or national characters. The value must not increase the string length when substituted, that is, it can be up to one character longer than the symbol name.
Examples:
The following sample NCL code creates a unique data set name identified by system and product region job name.
&TMPDSN = &CONCAT & SYSNAME.. & JOBNAME..# & UNIQUE &UNIQSTR = &SUBSTR &ZUNIQUE 2 7 &CALL PROC=$CAPKBIF PARMS=(PLEXSUB,&TMPDSN,,,,+ JOBNAME,&ZJOBNAME,UNIQUE,&UNIQSTR) &IF &RETCODE = 0 &THEN + &TMPDSN = &$CAVALUE
Where:
&SYSNAME = SYS1 &ZJOBNAME = REGION01 &ZUNIQUE = 0000043B
The value returned in &#CAVALUE is as follows:
SYS1.REGION01.#000043B
The following code shows how using the exclamation mark as the substitution character (subchar) can simplify the previous code sample to create the same result.
&UNIQSTR = &SUBSTR &ZUNIQUE 2 7 &CALL PROC=$CAPKBIF PARMS=(PLEXSUB,+ !SYSNAME..!JOBNAME..#!UNIQUE,!,,,+ JOBNAME,&ZJOBNAME,UNIQUE,&UNIQSTR) &IF &RETCODE = 0 &THEN + &TMPDSN = &$CAVALUE
Where:
&SYSNAME = SYS1
&ZJOBNAME = REGION01
&ZUNIQUE = 0000043B
The value returned in &#CAVALUE is as follows:
SYS1.REGION01.#000043B
The following example shows the use of the PLEXSUB function in an initialization file to set a unique name within the sysplex for the name of a PSM Spool File data set by using the &SYSNAME system symbol and a user symbol for the region's job name.
-*-------------------------------------------------------------* -* $PSPSMSPOOL - PSM Spool File Specification * -* * -* THE FOLLOWING PARAMETERS ARE SET IN THE FOLLOWING ORDER: * -* 1) INIT: PSSD1 - Spool File Dataset Name * -* 2) INIT: PSSO1 - Spool File VSAM Options * -* 3) INIT: PSSI1 - File Disposition 1 * -*-------------------------------------------------------------* .PSMSPOOL &CALL PROC=$CAPKBIF PARMS=(PLEXSUB,+ AUDE0.!SYSNAME..!JOBNAME..PSPOOL,!,,,+ JOBNAME,&ZJOBNAME) &$IAPPSSD1 = &$CAVALUE
Where:
&SYSNAME = SYS1
&ZJOBNAME = REGION01
The value returned in &#CAVALUE is as follows:
AUDE0.SYS1.REGION01.PSPOOL
| Copyright © 2009 CA. All rights reserved. |
|