How can I customize dynamic image copy dataset names with SYSTEM Symbolics and substrings when running Quick Copy?
SYSTEM Symbolics configured in the PARMLIB(PQC) member are the specifications for your image copy files that are dynamically allocated if you do not specify any SYSCPnyy DD statements. In braces after the system symbolic, users may substring a part of it for the dataset name.
The IBM System Symbolics can be substringed like this "(3:2)" where the first value is the column position and the second is the length of string from the column position to extract.
Sample symbolic values to be used in this example:
%USER = userid
%DBNAME : DB2DB
%TSNAME : DB2TS
%DSNUM : 0 because it's not partitioned.
&HHMMSS(3:2) : 00 because the job ran at 23.00.42 and it takes the third and fourth char of the time
&YYMMDD(3:2) : 10 because the job ran on 06/10/17 (ie. 17th Oct 2006).
&LHHMMSS(1:4) : 2300 because the job ran at 23.00.42 and it takes the first four chars of the time
&LHHMMSS(1:2) : 23 because the job ran at 23.00.42 and it takes the first two chars of the time
Note: The "L" in front of LHHMMSS means "Local time" as opposed to GMT.
These IBM system symbolics can be found in the IBM MVS Initialization and Tuning reference manual.
Note that IBM system symbolics start with a "&" and PQC Model symbolics start with a "%". The PQC Model symbolics can be found in the PQC User Guide.
Here are some examples of the format in the PQC member and the result based on the above symbolic values.
The first line is the format in the PQC PARMLIB member. The next line is the result string used to allocate the image copy dataset dynamically.
The other allocation details have been omitted for this discussion.
When the name is customized the user should be mindful to produce a valid dataset name from the format. An invalid one will not be identified utill the PQC job is executed and it will fail to allocate the dataset at that time.