ISRSCAN and ISRLEMX programs
The ISPF-supplied Batch skeletons each generate one or more job steps. The first step executes either the ISRSCAN program or the ISRLEMX program. Both programs find the input member and copy it from the library hierarchy (up to four partitioned data sets) to a temporary data set for input to the processing program executed in the second step. The difference between them is that ISRSCAN copies only one member to the output data set, while ISRLEMX copies the primary member and expands any included members as part of the output data set. All members copied by ISRLEMX are unpacked in the output data set and ISRSCAN does not unpack the input while ISRLEMX does. The input to ISRSCAN must not be packed. ISRLEMX also creates a member parts list (see ISPF Options 4.12 and 5.12).
If your input is a sequential data set, ISRLEMX only copies the data to the output data set. It unpacks the input but does not unpack any included members.
The first step is essential for the operation of library hierarchies because the ISPF-supplied processing programs typically accept primary input only from fully qualified data sets (that is, from either a sequential data set or a single member of a single partitioned data set, not from concatenations of partitioned data sets).
//*ISRSCAN step
//SCANSTEP EXEC PGM=ISRSCAN,PARM='member name'
//STEPLIB DD DSN= (Library name if ISRSCAN is not in
your system library)
//IN DD ... Input data set in which the source
member is found.
//OUT DD ... Sequential output data set.
/*- 0
- Normal completion
- 8
- One of these:
- DDNAME OUT not found.
- Error retrieving data set information for OUT data set.
- OUT data set is a PDS without a member specified.
- 12
- Member not found
- 16
- Unable to open input DCB
- 20
- I/O error on input data set
- 24
- Unable to open output DCB
- 28
- I/O error on output data set
//*ISRLEMX step
//LEMXSTEP EXEC PGM=ISRLEMX,PARM='parm1,parm2,...,parm15'
//STEPLIB DD DSN= (Library name if ISRLEMX is not in your
system library)
//ISRLCODE DD ... Input data set in which the source member(s)
are found.
//ISRLEXPD DD ... Sequential output data set for expansion.
//ISRLXREF DD ... Sequential output data set for mem prts lst.
//ISRLMSG DD SYSOUT=A /* program error messages print here */
- or -
//ISRLMSG DD DSN=&ZPREFIX;.&LID;.LMSG,UNIT=SYSDA,
SPACE=(TRK,(1,1)),DISP=(MOD,CATLG),
DCB=(RECFM=FBA,LRECL=133,BLKSIZE=3059)
/*Return Codes: ISRLEMX sets one of these return codes in register 15:
- 0
- Normal completion
- n
- Parameter n is 1-15 (too long)
- 16
- Too many parameters
- 17
- Too few parameters
- 20
- Severe error in expand module—an error is printed in the ISRLMSG data set.
- DDNAME ISRLEXPD is needed if parameter 5 is either ‘E’ or blank. DDNAME ISRLXREF is needed if parameter 5 is ‘L’. See this figure for additional information.
- ISRLEMX reads data that is presented in a BSAM compatible form. If the SUBSYS parameter (or any parameter that will cause the UCB pointer in the TIOT to be 0) is used, PDF cannot verify that the input is on DASD. It is the responsibility of the user to ensure ISRLEMX will see the data in the correct form. If the data is not presented in a BSAM compatible form, results will be unpredictable.
The ISRLEMX parameter string contains up to 15 parameters, each separated from the next by commas. The parameters are:
| Parameter | Length | Description |
|---|---|---|
| 1 | CHAR(3) | Language type of the input member to be processed:
|
| 2 | CHAR(8) | Member name of member to be expanded or of first member to be processed to create a member parts list. |
| 3 | CHAR(1) |
|
| 4 | CHAR(1) |
|
| 5 | CHAR(1) |
|
| 6 | CHAR(3) | Number of concatenated input libraries that should be scanned to find the specified input member. The value can be 1 - 255. If the number specified is equal to or larger than the number of concatenated input libraries, all concatenated input libraries are scanned. |
| 7 | CHAR(20) | User trigger, a character string of maximum length 20 to be processed as an INCLUDE, COPY or IMBED statement when found in the member being processed. Enter a comma to skip this parameter if no user trigger is being used. |
| 8 | CHAR(2) | User trigger start column, specifies which column the user trigger listed here will start in the member being processed. Enter a comma to skip this parameter if no user trigger is being used. |
| 9 | CHAR(3) | Indicates the National language in use:
|
| 10 | CHAR(1) | Position of the month value in the date string; for example, yy/mm/dd (default ‘4’) |
| 11 | CHAR(1) | Position of the day value in the date string; for example, yy/mm/dd (default ‘7’) |
| 12 | CHAR(1) | Position of the year value in the date string; for example, yy/mm/dd (default ‘1’) |
| 13 | CHAR(1) | Delimiter to use in the date string; for example, yy/mm/dd (default ‘/’) |
| 14 | CHAR(8) | Unit name to be used for all temporary data sets used by ISRLEMX. The unit name must be specified. |
| 15 | CHAR(4) | The number of blocks used when allocating the temporary sort data sets. These are allocated to ddnames ISRKLWKnn, where nn is 1 through 4. The default for this parameter is 0100. It can be increased for very large or complex expansions. |
yy/mm/dd, mm/dd/yy,
dd/mm/yy). Therefore, you must specify the index for each
portion. Use any valid character to delimit the date string (for example, yy/mm/dd,
dd.mm.yy). This delimiter is required.