The job control language (JCL) statements that can be used to list
a catalog's entries are:
//LISTCAT JOB ...
//STEP1 EXEC PGM=IDCAMS
//OUTDD DD DSN=LISTCAT.OUTPUT,UNIT=3480,
// VOL=SER=TAPE10,LABEL=(1,NL),DISP=(NEW,KEEP),
// DCB=(RECFM=VBA,LRECL=125,BLKSIZE=629)
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
LISTCAT -
CATALOG(YOURCAT) -
OUTFILE(OUTDD) -
...
/*
Note: Additional keywords can be included.
The JOB statement contains user and accounting information required
for your installation.
The EXEC statement identifies the program to be run, IDCAMS (that
is, the access method services program).
- OUTDD, which specifies an alternate output file, so that the LISTCAT
output can be written onto an auxiliary storage device. The LISTCAT
command's OUTFILE parameter points to the OUTDD DD statement. Only
the LISTCAT output is written to the alternate output device. JCL
statements, system messages, and job statistics are written to the
SYSPRINT output device.
- DSN=LISTCAT.OUTPUT specifies the name for the magnetic tape file.
- UNIT=3480 and VOL=SER=TAPE10 specifies that the file is to be
contained on magnetic tape volume TAPE10.
- LABEL=(1,NL) specifies that this is the first file on a nonlabeled
tape. You can also use a standard labeled tape by specifying LABEL=(1,SL).
If subsequent job steps produce additional files of LISTCAT output
on the same tape volume, you should increase the file number in each
job step's LABEL subparameter (that is, LABEL=(2,NL) for the second
job step, LABEL=(3,NL) for the third job step, etc.)
- DISP=(NEW,KEEP) specifies that this is a new tape file and is
to be rewound when the job finishes. If a subsequent job step prints
the tape, DISP=(NEW,PASS) should be specified. If your job step contains
more than one LISTCAT command, use DISP=(MOD,KEEP) or DISP=(MOD,PASS)
to concatenate all of the LISTCAT output in one sequential file.
- DCB=(RECFM=VBA,LRECL=125,BLKSIZE=629) specifies that the LISTCAT
output records are variable-length, blocked 5-to-1, and are preceded
by an ANSI print control character.
- SYSPRINT DD, which is required for each access method services
job step. It identifies the output queue, SYSOUT=A, on which all LISTCAT
output and system output messages are printed (unless the OUTFILE
parameter and its associated DD statement is specified—see OUTDD above).
Note: If you want all output to be written to an auxiliary
storage device, replace X'OUTDD' with X'SYSPRINT' in
the OUTDD DD statement and omit the SYSPRINT DD SYSOUT=A statement.
- SYSIN DD, which specifies, with an asterisk (*), that the statements
that follow are the input data statements. A '/*' ends the input data
statements.
The LISTCAT command parameters shown in the preceding example are
common to the LISTCAT examples that follow. Other LISTCAT parameters
are coded with each example and the output that results is illustrated.
These two parameters are optional:
- CATALOG, which identifies YOURCAT as the catalog whose entries
are to be listed.
- OUTFILE, which points to the OUTDD DD statement. The OUTDD DD
statement allocates an alternate output file for the LISTCAT output.
If you want to print the LISTCAT output that is contained on an
alternate output file, you can use the IEBGENER program. The following
shows the JCL required to print the alternate output file, LISTCAT.OUTPUT,
that was allocated previously:
//PRINTOUT JOB ...
//STEP1 EXEC PGM=IEBGENER
//SYSUT1 DD DSN=LISTCAT.OUTPUT,UNIT=2400-3,
// VOL=SER=TAPE10,LABEL=(1,NL),DISP=(OLD,KEEP),
// DCB=(RECFM=VBA,LRECL=125,BLKSIZE=629)
//SYSUT2 DD SYSOUT=A
//SYSPRINT DD SYSOUT=A
//SYSIN DD DUMMY
/*
Note: If you have the DFSORT product installed, consider using ICEGENER
as an alternative to IEBGENER when making an unedited copy of a data
set or member. It is usually faster than IEBGENER. It might already
be installed on your system using the name IEBGENER.