| Task | Options | Primary Utility | Secondary Utilities |
|---|---|---|---|
| Add | a member to a partitioned data set | IEBUPDATE, IEBGENER | IEBDG |
| a password | IEHPROGM | ||
| Alter in place | a load module | IEBCOPY | |
| Catalog | a data set in a catalog | IEHPROGM | |
| Change | data set organization | IEBUPDTE | IEBGENER, IEBPTPCH |
| logical record length | IEBGENER | ||
| Compare | z/OS UNIX System Services (z/OS UNIX) files such as HFS files | IEBCOMPR | |
| partitioned data sets | IEBCOMPR | ||
| sequential data sets | IEBCOMPR | ||
| PDSEs | IEBCOMPR | ||
| Compress | a partitioned data set | IEBCOPY | |
| Compress in place | a partitioned data set | IEBCOPY | |
| Convert to partitioned data set | an unloaded PDSE containing program objects cannot be loaded into a PDS. An unloaded PDSE containing data objects can be loaded into a PDS but all extended attributes will be lost. | IEBCOPY | |
| sequential data sets | IEBGENER | IEBUPDTE | |
| a PDSE | IEBCOPY | ||
| Convert to PDSE | a partitioned data set | IEBCOPY | |
| an unloaded copy of a partitioned data set or PDSE | IEBCOPY | ||
| sequential data sets | IEBGENER | IEBUPDTE | |
| Convert to sequential data set | a partitioned data set or PDSE | IEBGENER | IEBUPDTE |
| Copy | a load module or load module library | IEBCOPY | |
| a partitioned data set | IEBCOPY | IEHMOVE | |
| a volume of data sets (on tape or disk) | IEHMOVE | ||
| job steps | IEBEDIT | ||
| selected members of a partitioned data set | IEBCOPY | IEHMOVE | |
| sequential data sets | IEBGENER | IEHMOVE, IEBUPDTE, IEBPTPCH | |
| a PDSE | IEBCOPY | ||
| a group of PDSE members | IEBCOPY | ||
| selected members of a PDSE | IEBCOPY | ||
| Create | a backup copy of a partitioned data set or PDSE | IEBCOPY | |
| a character arrangement table module | IEBIMAGE | ||
| a copy modification module | IEBIMAGE | ||
| a 3800 or 4248 forms control buffer module | IEBIMAGE | ||
| a graphic character modification module | IEBIMAGE | ||
| a library character set module | IEBIMAGE | ||
| a library of partitioned members | IEBGENER | IEBUPDTE | |
| a member of a partitioned data set or PDSE | IEBGENER | IEBDG, IEBUPDTE | |
| a sequential output data set | IEBDG | IEBGENER, IEBPTPCH | |
| an indexed sequential data set | IEBDG | ||
| an output job stream | IEBEDIT | ||
| Delete | a data set or member of a partitioned data set | IEHPROGM | |
| password | IEHPROGM | ||
| catalog entries | IEHPROGM | ||
| records in a partitioned data set or PDSE member | IEBUPDTE | ||
| Edit and convert to partitioned data set or PDSE | a sequential data set | IEBGENER | IEBUPDTE |
| Edit and copy | a job stream | IEBEDIT | |
| a sequential data set | IEBGENER | IEBUPDTE, IEBPTPCH | |
| Edit and list | error statistics by volume (ESV) records | IFHSTATR | |
| Edit and print | a sequential data set | IEBPTPCH | IEBGENER |
| Edit and punch | a sequential data set | IEBPTPCH | IEBGENER |
| Enter | a procedure into a procedure library | IEBUPDTE | |
| Exclude | a partitioned data set member from a copy operation | IEBCOPY | IEHMOVE |
| a PDSE member from a copy operation | IEBCOPY | ||
| Expand | a partitioned data set or PDSE | IEBCOPY | |
| a sequential data set | IEBGENER | ||
| Generate | test data | IEBDG | |
| Include | changes to members or sequential data sets | IEBUPDTE | |
| a partitioned data set member from a copy operation | IEBCOPY | IEHMOVE | |
| a PDSE member from a copy operation | IEBCOPY | ||
| Indicate | double-byte character set string by supplying enclosing shift-out/shift-in characters | IEBGENER | IEBPTPCH |
| Insert records | into a partitioned data set or PDSE | IEBUPDTE | |
| Label | magnetic tape volumes | IEHINITT | |
| List | a password entry | IEHPROGM | |
| a volume table of contents | IEHLIST | ||
| number of unused directory blocks and tracks | IEHLIST | IEBCOPY | |
| partitioned data set or PDSE directories | IEHLIST | IEHPROGM | |
| CVOL entries | IEHLIST | ||
| Load | an unloaded partitioned data set to a partitioned data set | IEBCOPY | |
| an unloaded data set | IEHMOVE | ||
| an unloaded partitioned data set to a PDSE (for non-load modules only) | IEBCOPY | ||
| an unloaded PDSE to a partitioned data set (for non-load modules only) | IEBCOPY | ||
| an unloaded PDSE to a PDSE | IEBCOPY | ||
| Merge | partitioned data sets | IEBCOPY | IEHMOVE |
| PDSEs | IEBCOPY | ||
| partitioned data sets and PDSEs | IEBCOPY | ||
| Modify | a partitioned or sequential data set, or a PDSE | IEBUPDTE | |
| Move | a volume of data sets | IEHMOVE | |
| partitioned data sets | IEHMOVE | ||
| sequential data sets | IEHMOVE | ||
| Number records | in a new or old member of a partitioned data set or PDSE | IEBUPDTE | |
| Password protection | add a password | IEHPROGM | |
| delete a password | IEHPROGM | ||
| list passwords | IEHPROGM | ||
| replace a password | IEHPROGM | ||
| sequential data sets | IEBPTPCH | IEBGENER, IEBUPDTE | |
| partitioned data sets or PDSEs | IEBPTPCH | ||
| selected records | IEBPTPCH | ||
| mixed strings of double-byte and single-byte character set data | IEBPTPCH | IEBGENER | |
| double-byte character set data | IEBPTPCH | IEBGENER | |
| Punch | a partitioned data set member | IEBPTPCH | |
| a sequential data set | IEBPTPCH | ||
| selected records | IEBPTPCH | ||
| mixed strings of double-byte and single-byte character set data | IEBPTPCH | IEBGENER | |
| Double-byte character set data | IEBPTPCH | IEBGENER | |
| Reblock | a load module | IEBCOPY | |
| a partitioned data set or PDSE | IEBCOPY | ||
| a sequential data set | IEBGENER | IEBUPDTE | |
| Re-create | a partitioned data set or PDSE | IEBCOPY | |
| Rename | member of a partitioned data set or PDSE | IEBCOPY | IEHPROGM |
| a sequential or partitioned data set, or PDSE | IEHPROGM | ||
| moved or copied members of a partitioned data set | IEHMOVE | ||
| Renumber | logical records | IEBUPDTE | |
| Remove | indication of a double-byte character set string by stripping off enclosing shift-out/shift-in characters | IEBGENER | |
| Replace | a password | IEHPROGM | |
| logical records | IEBUPDTE | ||
| records in a member of a partitioned data set or PDSE | IEBUPDTE | ||
| selected members of a PDSE | IEBCOPY | IEBUPDTE | |
| selected members of a partitioned data set | IEBCOPY | IEBUPDTE, IEHMOVE | |
| Scratch | data sets | IEHPROGM | |
| Uncatalog | data sets | IEHPROGM | |
| Unload | a partitioned data set | IEBCOPY | IEHMOVE |
| a sequential data set | IEHMOVE | ||
| a PDSE | IEBCOPY | ||
| Update in place | a partitioned data set or PDSE | IEBUPDTE |
Introduction of various Mainframe Technologies with various Tips and Tricks for Cobol,Pl1,JCL,VSAM,ADSO,IMS,DB2,REXX,CICS and Latest exciting Mainframe times: SOA, Business Integration, virtualization and other Enterprise Strategies are putting the mainframe back where it belongs, at the heart of corporate IT systems. This blog will keep you abreast of the latest news and opinions, recommend key articles, white papers etc with various Mainframe Technologies.
Showing posts with label JCL Utilities. Show all posts
Showing posts with label JCL Utilities. Show all posts
Wednesday, June 18, 2014
JCL Utilities Table
JOB Utilities IEBGENER
IEBGENER
IEBGENER is a generalized copy utility used to perform the following tasks:
IEBGENER uses the following input:
• General structure
//JS10 EXEC PGM=IEBGENER,REGION=1024K
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=...,DISP=...
//SYSUT2 DD DSN=...,DISP=...
//SYSIN DD *
control statements...
/*
IEBGENER requires four data definition (DD) statements with the DD names shown in the example:
SYSIN DD specifies control statements. This can be on DASD, TAPE or in-stream data. The SYSIN block size must be multiple of 80, with a maximum allowed BLKSIZE of 32,720, and a RECFM of F or FB; for simple uses, no control parameters are needed and a DD DUMMY can be used.
SYSPRINT DD statement is required and must have RECFM=FB or F. The BLKSIZE value can be any value up to 32670 that is a multiple of 121. It is used to display messages from IEBGENER.
SYSUT1 DD statement points to the input file for the IEBGENER operation. This file can be RECFM=F, FB, V, VS, VB, VBS, or U. The BLKSIZE must be specified in the data set label or via JCL. Variable Spanned (RECFM=VS or VBS) records cannot be copied to the output file if the output file is a PDS or PDSE.
SYSUT2 DD statement points to the output file for the IEBGENER operation. This file can be RECFM=F, FB, V, VS, VB, VBS, or U. PDS or PDSE libraries cannot have a RECFM of VS or VBS. Reblocking is accomplished if the SYSUT2 BLKSIZE is a new maximum blocksize. RECFM must be specified for the SYSUT2 file if the data set is new or DUMMY. BLKSIZE must always be specified for the SYSUT2 DD statement if LRECL and RECFM are also specified.
A partitioned data set or PDSE cannot be produced if an input data set contains spanned records.
If both the SYSUT1 and the SYSUT2 DD statements specify standard user labels (SUL), IEBGENER copies user labels from SYSUT1 to SYSUT2
• IEBGENER Control Statements:
Valid control statements are GENERATE, EXITS, LABELS, MEMBER, and RECORD. Control statements are continued by placing a non-blank character in column 72, and continuing the statement beginning in column 16 on the next statement. The syntax and usage of each is discussed below:
GENERATE:
The GENERATE control statement is required when:
1. The output data set is partitioned, or
2. Editing is to be performed, or
3. User routines are provided and/or label processing is to be done.
The format of the GENERATE statement is:
{label} GENERATE MAXNAME=n
{,MAXFLDS=n}
{,MAXGPS=n}
{,MAXLITS=n}
{,DBCS={YES ¦ NO}}
The MAXNAME, MAXFLDS, MAXGPS, and MAXLITS parameters set limits on the number of member names, FIELDS, IDENTS, and character literals that will follow on subsequent RECORD and MEMBER statements. If you use the GENERATE statement, make sure these four parameters are set to high enough values. Use DBCS=YES whenever the input file has double-byte character set data included.
RECORD:
The RECORD statement defines a record group and provides editing directions to IEBGENER. The RECORD control statement is required when:
1. The output data set is partitioned, or
2. Editing is to be performed, or
3. User routines are provided and/or label processing is to be done.
In a RECORD statement, one IDENT parameter can be used to identify a record group, one or more FIELD parameters can be used to describe editing to be done on records in the record group, and a LABELS parameter can be used to indicate that this statement is immediately followed by user label records. The format of the RECORD statement is:
{label} RECORD {{IDENT¦IDENTG}=(length,'name',input-location)}
{,FIELD=({length}
{,input-location ¦ 'literal'}
{,conversion}
{output-location}),{FIELD=...}
{,LABELS=n}
The variables on the FIELDS= parameter are positional; if any of the options are not coded, the associated comma preceding that variable must be coded.
The {IDENT¦IDENTG}= parameter identifies the last record of the input group to which the FIELD parameters apply. IDENT is used for single-byte character string, and IDENTG for double-byte character strings (DBCS). The last record is identified by the literal given by 'name', which must have the given length and input location relative to 1. Use X'name' for hexadecimal names.
The FIELD= parameter supplies field-processing and editing information. 'Length' and 'input-location' identify a field to be processed, 'literal' is a literal value to be placed in the specified 'output-location', and 'conversion' is either CG (shift-out/shift-in characters removed no DBCS validation), CV (DBCS validation and input contains both single and double-byte character set data), GC (shift-in/shift-out characters inserted for DBCS data), GV (DBCS data not in shift-in/shift-out characters and data validation), HE (H-set BCD data converted to EBCDIC), PZ (packed to zoned), VC (DBCS validation and data not in shift-in/shift-out characters), VG (DBCS data validation and eliminate shift-in/shift-out characters), or ZP (zoned to packed). Use X'literal' for hexadecimal literal values.
LABELS= (optional) is a number from 1 to 8 that identifies the number of records in the SYSIN stream to treat as user label records. DATA=INPUT on a LABELS statement must precede it in the input stream.
MEMBER:
The MEMBER statement is used when the output data set is to be a PDS/PDSE. One MEMBER statement must be included for each member being created. All RECORD statements that follow a MEMBER statement refer to the member named by that statement. If a MEMBER statement is not included, the output data set will be sequential. The format of the MEMBER statement is:
{label} MEMBER NAME=(name{,alias}...)
'name' and 'alias' are member names and aliases desired for the ember. Multiple aliases are allowed.
LABELS:
The LABELS statement indicates the disposition of user labels hen processed by IEBGENER. LABELS should be specified when:
1. User labels are not to be copied to the output data set, or
2. Retrieved user labels from records in the data portion of the SYSIN data set, or
3. The user's exit routine is invoked before the user labels are copied to the output data set.
If multiple LABELS statements are present, only the last one encountered is used. The format of the LABELS statement is:
{label} LABELS {DATA=YES¦NO¦ALL¦ONLY¦INPUT}
DATA=YES is the default. "YES" means that if the user labels are not rejected by your user label exit module, they will be processed as data. "NO" means, do not process user labels as data. "ALL" means, treat all user labels in the current group being processed as data. "ONLY" means, treat header labels only as data. "INPUT" means, that user labels for the output data set are to be copied from the data part of the SYSIN data set, and the number of records to read is specified in the RECORD statement.
EXITS:
The EXITS statement provides that names of user exit routines to be used in processing user labels. The format of the EXITS statement is:
Format -
{label} EXITS {INHDR=routinename}
{,OUTHDR=routinename}
{,INTLR=routinename}
{,OUTTLR=routinename}
{,KEY=routinename}
{,DATA=routinename}
{,IOERROR=routinename}
{,TOTAL=routinename,size}
The EXITS statement provides the names of the exit routines to be user for the function identified above. Usage of all of these exits is optional. 'INHDR' identifies the input header exit routine. 'OUTHDR' identifies the output header exit routine. 'INTLR' identifies the input trailer exit routine. 'OUTTLR' identifies the output trailer exit routine. 'KEY' identifies the output create record key exit routine, not invoked for LRECL VS or VBS records. 'DATA' identifies the pre processing record exit routine. 'IOERROR' identifies the permanent I/O error exit routine. 'TOTAL' identifies the pre record output exit routine, where "size" is a decimal number identifying the bytes required for processing.
IEBGENER usage examples
• Copy datasets
//STEPCOPY EXEC PGM=IEBGENER
//SYSUT1 DD DSN=MUK001A.OLDFILE1,DISP=SHR
//SYSUT2 DD DSN=MUK001A.NEWFILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL(2,2),RLSE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS),
// MGMTCLAS=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
• Concatenate datasets
//STEPCONC EXEC PGM=IEBGENER
//SYSUT1 DD DSN=MUK001A.OLDFILE1,DISP=SHR
// DD DSN=MUK001A.OLDFILE2,DISP=SHR
// DD DSN=MUK001A.OLDFILE3,DISP=SHR
//SYSUT2 DD DSN=MUK001A.NEWFILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL(2,2),RLSE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS),
// MGMTCLAS=A
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
• Empty existing files
//STEPEMPT EXEC PGM=IEBGENER
//SYSUT1 DD DUMMY,
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS)
//SYSUT2 DD DSN=MUK001A.EMPTFILE,
// DISP=(OLD)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
• Allocate empty files
//STEPEMPT EXEC PGM=IEBGENER
//SYSUT1 DD DUMMY,
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS)
//SYSUT2 DD DSN=MUK001A.EMPTFILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL(2,2),RLSE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS),
// MGMTCLAS=A
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
• Create a PDS from sequential dataset
//CREATPDS EXEC PGM=IEBGENER
//SYSUT1 DD DSN=MY.SEQ.FILE.LIB,DISP=SHR
//SYSUT2 DD DSN= MY.PDS.FILE.LIB,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
GEN1 GENERATE MAXNAME=4,MAXGPS=3
MEM1 MEMBER NAME=JOBCARD
GRP1 RECORD IDENT=(8,'//* NJOB',1),
MEM2 MEMBER NAME=JESCARDS
GRP2 RECORD IDENT=(8,'//* NJES',1),
MEM3 MEMBER NAME=JCLCARDS
GRP3 RECORD IDENT=(7,'* TOP *',1),
MEM4 MEMBER NAME=RPTDATA
GRP4 RECORD IDENT=(8,'*BOTTOM*',1)
• Copy CMS file to disk having data in first 35 characters
//COPYSTEP EXEC PGM=IEBGENER
//SYSUT1 DD DSN=,DISP=SHR
//SYSUT2 DD DSN=,DISP=OLD
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
GENERATE MAXFIELDS=1
RECORD FIELDS=(35,1,,1)
• Copy file to disk after inserting an identifier
//COPYSTEP EXEC PGM=IEBGENER
//SYSUT1 DD DSN=,DISP=SHR
//SYSUT2 DD DSN=,DISP=OLD
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
GENERATE MAXFIELDS=2,MAXLITS=7
RECORD FIELDS=(7,'USC1280',,1),FIELD=(80,1,,8)
* Print a Sequential Data Set
//PRINT JOB ...
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=A
//SYSIN DD DUMMY
//SYSUT1 DD DSNAME=D80.DATA,DISP=SHR
//SYSUT2 DD SYSOUT=A
* Produce Blocked File from Unblocked Disk File
//COPYJOB JOB
//STEP1 EXEC PGM=IEBGENER,REGION=318K
//SYSPRINT DD SYSOUT=A
//SYSIN DD DUMMY
//SYSUT1 DD DSNAME=INPUT,UNIT=disk,
// DISP=OLD,VOL=SER=X13380,
// DCB=(BUFNO=20,RECFM=F,LRECL=2000,BLKSIZE=2000)
//SYSUT2 DD DSNAME=OUTPUT,UNIT=disk,DISP=(NEW,KEEP),
// DCB=(RECFM=FB,LRECL=2000,BLKSIZE=32000)
IEBGENER is a generalized copy utility used to perform the following tasks:
- Create a backup copy of a sequential data set, a member of a partitioned data set or PDSE or a z/OS UNIX System Services (z/OS UNIX) file such as a HFS file.
- Produce a partitioned data set or PDSE, or a member of a partitioned data set or PDSE, from a sequential data set or a z/OS UNIX file.
- Expand an existing partitioned data set or PDSE by creating partitioned members and merging them into the existing data set.
- Produce an edited sequential or partitioned data set or PDSE.
- Manipulate data sets containing double-byte character set data.
- Print sequential data sets, members of partitioned data sets or PDSEs or z/OS UNIX files.
- Reblock or change the logical record length of a data set.
- Copy user labels on sequential output data sets.
- Supply editing facilities and exits for your routines that process labels, manipulate input data, create keys, and handle permanent input/output errors.
IEBGENER uses the following input:
- An input data set, which contains the data that is to be copied, edited, converted into a partitioned data set or PDSE, or converted into members to be merged into an existing data set. The input is either a sequential data set or a member of a partitioned data set or PDSE.
- A control data set, which contains utility control statements. The control data set is required if editing is to be performed or if the output data set is to be a partitioned data set or PDSE.
- The PARM parameter on the JCL EXEC statement or the dynamic invocation equivalent.
- IEBGENER produces the following output:
- An output data set, which can be either sequential, including large format sequential, or partitioned. The output data set can be either a new data set (created during the current job step) |or an existing data set. It can be a sequential data set or |a PDS or PDSE that will be expanded. If a partitioned data set or PDSE is created, it is a new member with a new directory entry. None of the information is copied from the previous directory entry. |The same sequential data set cannot be used as both the input |and output data set. The |output sequential data set cannot be any of the input data sets in a sequential |concatenation.
- A message data set, which contains informational messages (for example, the contents of utility control statements) and any error messages.
• General structure
//JS10 EXEC PGM=IEBGENER,REGION=1024K
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=...,DISP=...
//SYSUT2 DD DSN=...,DISP=...
//SYSIN DD *
control statements...
/*
IEBGENER requires four data definition (DD) statements with the DD names shown in the example:
SYSIN DD specifies control statements. This can be on DASD, TAPE or in-stream data. The SYSIN block size must be multiple of 80, with a maximum allowed BLKSIZE of 32,720, and a RECFM of F or FB; for simple uses, no control parameters are needed and a DD DUMMY can be used.
SYSPRINT DD statement is required and must have RECFM=FB or F. The BLKSIZE value can be any value up to 32670 that is a multiple of 121. It is used to display messages from IEBGENER.
SYSUT1 DD statement points to the input file for the IEBGENER operation. This file can be RECFM=F, FB, V, VS, VB, VBS, or U. The BLKSIZE must be specified in the data set label or via JCL. Variable Spanned (RECFM=VS or VBS) records cannot be copied to the output file if the output file is a PDS or PDSE.
SYSUT2 DD statement points to the output file for the IEBGENER operation. This file can be RECFM=F, FB, V, VS, VB, VBS, or U. PDS or PDSE libraries cannot have a RECFM of VS or VBS. Reblocking is accomplished if the SYSUT2 BLKSIZE is a new maximum blocksize. RECFM must be specified for the SYSUT2 file if the data set is new or DUMMY. BLKSIZE must always be specified for the SYSUT2 DD statement if LRECL and RECFM are also specified.
A partitioned data set or PDSE cannot be produced if an input data set contains spanned records.
If both the SYSUT1 and the SYSUT2 DD statements specify standard user labels (SUL), IEBGENER copies user labels from SYSUT1 to SYSUT2
• IEBGENER Control Statements:
Valid control statements are GENERATE, EXITS, LABELS, MEMBER, and RECORD. Control statements are continued by placing a non-blank character in column 72, and continuing the statement beginning in column 16 on the next statement. The syntax and usage of each is discussed below:
GENERATE:
The GENERATE control statement is required when:
1. The output data set is partitioned, or
2. Editing is to be performed, or
3. User routines are provided and/or label processing is to be done.
The format of the GENERATE statement is:
{label} GENERATE MAXNAME=n
{,MAXFLDS=n}
{,MAXGPS=n}
{,MAXLITS=n}
{,DBCS={YES ¦ NO}}
The MAXNAME, MAXFLDS, MAXGPS, and MAXLITS parameters set limits on the number of member names, FIELDS, IDENTS, and character literals that will follow on subsequent RECORD and MEMBER statements. If you use the GENERATE statement, make sure these four parameters are set to high enough values. Use DBCS=YES whenever the input file has double-byte character set data included.
RECORD:
The RECORD statement defines a record group and provides editing directions to IEBGENER. The RECORD control statement is required when:
1. The output data set is partitioned, or
2. Editing is to be performed, or
3. User routines are provided and/or label processing is to be done.
In a RECORD statement, one IDENT parameter can be used to identify a record group, one or more FIELD parameters can be used to describe editing to be done on records in the record group, and a LABELS parameter can be used to indicate that this statement is immediately followed by user label records. The format of the RECORD statement is:
{label} RECORD {{IDENT¦IDENTG}=(length,'name',input-location)}
{,FIELD=({length}
{,input-location ¦ 'literal'}
{,conversion}
{output-location}),{FIELD=...}
{,LABELS=n}
The variables on the FIELDS= parameter are positional; if any of the options are not coded, the associated comma preceding that variable must be coded.
The {IDENT¦IDENTG}= parameter identifies the last record of the input group to which the FIELD parameters apply. IDENT is used for single-byte character string, and IDENTG for double-byte character strings (DBCS). The last record is identified by the literal given by 'name', which must have the given length and input location relative to 1. Use X'name' for hexadecimal names.
The FIELD= parameter supplies field-processing and editing information. 'Length' and 'input-location' identify a field to be processed, 'literal' is a literal value to be placed in the specified 'output-location', and 'conversion' is either CG (shift-out/shift-in characters removed no DBCS validation), CV (DBCS validation and input contains both single and double-byte character set data), GC (shift-in/shift-out characters inserted for DBCS data), GV (DBCS data not in shift-in/shift-out characters and data validation), HE (H-set BCD data converted to EBCDIC), PZ (packed to zoned), VC (DBCS validation and data not in shift-in/shift-out characters), VG (DBCS data validation and eliminate shift-in/shift-out characters), or ZP (zoned to packed). Use X'literal' for hexadecimal literal values.
LABELS= (optional) is a number from 1 to 8 that identifies the number of records in the SYSIN stream to treat as user label records. DATA=INPUT on a LABELS statement must precede it in the input stream.
MEMBER:
The MEMBER statement is used when the output data set is to be a PDS/PDSE. One MEMBER statement must be included for each member being created. All RECORD statements that follow a MEMBER statement refer to the member named by that statement. If a MEMBER statement is not included, the output data set will be sequential. The format of the MEMBER statement is:
{label} MEMBER NAME=(name{,alias}...)
'name' and 'alias' are member names and aliases desired for the ember. Multiple aliases are allowed.
LABELS:
The LABELS statement indicates the disposition of user labels hen processed by IEBGENER. LABELS should be specified when:
1. User labels are not to be copied to the output data set, or
2. Retrieved user labels from records in the data portion of the SYSIN data set, or
3. The user's exit routine is invoked before the user labels are copied to the output data set.
If multiple LABELS statements are present, only the last one encountered is used. The format of the LABELS statement is:
{label} LABELS {DATA=YES¦NO¦ALL¦ONLY¦INPUT}
DATA=YES is the default. "YES" means that if the user labels are not rejected by your user label exit module, they will be processed as data. "NO" means, do not process user labels as data. "ALL" means, treat all user labels in the current group being processed as data. "ONLY" means, treat header labels only as data. "INPUT" means, that user labels for the output data set are to be copied from the data part of the SYSIN data set, and the number of records to read is specified in the RECORD statement.
EXITS:
The EXITS statement provides that names of user exit routines to be used in processing user labels. The format of the EXITS statement is:
Format -
{label} EXITS {INHDR=routinename}
{,OUTHDR=routinename}
{,INTLR=routinename}
{,OUTTLR=routinename}
{,KEY=routinename}
{,DATA=routinename}
{,IOERROR=routinename}
{,TOTAL=routinename,size}
The EXITS statement provides the names of the exit routines to be user for the function identified above. Usage of all of these exits is optional. 'INHDR' identifies the input header exit routine. 'OUTHDR' identifies the output header exit routine. 'INTLR' identifies the input trailer exit routine. 'OUTTLR' identifies the output trailer exit routine. 'KEY' identifies the output create record key exit routine, not invoked for LRECL VS or VBS records. 'DATA' identifies the pre processing record exit routine. 'IOERROR' identifies the permanent I/O error exit routine. 'TOTAL' identifies the pre record output exit routine, where "size" is a decimal number identifying the bytes required for processing.
IEBGENER usage examples
• Copy datasets
//STEPCOPY EXEC PGM=IEBGENER
//SYSUT1 DD DSN=MUK001A.OLDFILE1,DISP=SHR
//SYSUT2 DD DSN=MUK001A.NEWFILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL(2,2),RLSE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS),
// MGMTCLAS=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
• Concatenate datasets
//STEPCONC EXEC PGM=IEBGENER
//SYSUT1 DD DSN=MUK001A.OLDFILE1,DISP=SHR
// DD DSN=MUK001A.OLDFILE2,DISP=SHR
// DD DSN=MUK001A.OLDFILE3,DISP=SHR
//SYSUT2 DD DSN=MUK001A.NEWFILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL(2,2),RLSE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS),
// MGMTCLAS=A
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
• Empty existing files
//STEPEMPT EXEC PGM=IEBGENER
//SYSUT1 DD DUMMY,
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS)
//SYSUT2 DD DSN=MUK001A.EMPTFILE,
// DISP=(OLD)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
• Allocate empty files
//STEPEMPT EXEC PGM=IEBGENER
//SYSUT1 DD DUMMY,
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS)
//SYSUT2 DD DSN=MUK001A.EMPTFILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL(2,2),RLSE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS),
// MGMTCLAS=A
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
• Create a PDS from sequential dataset
//CREATPDS EXEC PGM=IEBGENER
//SYSUT1 DD DSN=MY.SEQ.FILE.LIB,DISP=SHR
//SYSUT2 DD DSN= MY.PDS.FILE.LIB,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
GEN1 GENERATE MAXNAME=4,MAXGPS=3
MEM1 MEMBER NAME=JOBCARD
GRP1 RECORD IDENT=(8,'//* NJOB',1),
MEM2 MEMBER NAME=JESCARDS
GRP2 RECORD IDENT=(8,'//* NJES',1),
MEM3 MEMBER NAME=JCLCARDS
GRP3 RECORD IDENT=(7,'* TOP *',1),
MEM4 MEMBER NAME=RPTDATA
GRP4 RECORD IDENT=(8,'*BOTTOM*',1)
• Copy CMS file to disk having data in first 35 characters
//COPYSTEP EXEC PGM=IEBGENER
//SYSUT1 DD DSN=
//SYSUT2 DD DSN=
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
GENERATE MAXFIELDS=1
RECORD FIELDS=(35,1,,1)
• Copy file to disk after inserting an identifier
//COPYSTEP EXEC PGM=IEBGENER
//SYSUT1 DD DSN=
//SYSUT2 DD DSN=
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
GENERATE MAXFIELDS=2,MAXLITS=7
RECORD FIELDS=(7,'USC1280',,1),FIELD=(80,1,,8)
* Print a Sequential Data Set
//PRINT JOB ...
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=A
//SYSIN DD DUMMY
//SYSUT1 DD DSNAME=D80.DATA,DISP=SHR
//SYSUT2 DD SYSOUT=A
* Produce Blocked File from Unblocked Disk File
//COPYJOB JOB
//STEP1 EXEC PGM=IEBGENER,REGION=318K
//SYSPRINT DD SYSOUT=A
//SYSIN DD DUMMY
//SYSUT1 DD DSNAME=INPUT,UNIT=disk,
// DISP=OLD,VOL=SER=X13380,
// DCB=(BUFNO=20,RECFM=F,LRECL=2000,BLKSIZE=2000)
//SYSUT2 DD DSNAME=OUTPUT,UNIT=disk,DISP=(NEW,KEEP),
// DCB=(RECFM=FB,LRECL=2000,BLKSIZE=32000)
JCL Utilities IEFBR14
IEFBR14
The first three letters of the utilities has specific usage like "IEF" for programs produced by the job management group, "IEB" for data set utility programs, "IEF" for system utility programs, and "IEW" for program-linkage and -loading.
And the next portion of the program name, for example "BR14" means "branch to register 14", IEBUPDTE was the dataset utility (IEB) that applied updates (UPDTE) to source code files, and IEHINITT was the system utility (IEH) that initialized (INT) magnetic tape labels (T).
IEFBR14 is a very popular utility in IBM mainframes. Even though it is very popular, the service provided by this utility is "nothing".(i.e) It is a "do nothing" utility. This utility runs in all the IBM environments derived from OS/360, including z/OS.
This utility module performs two simple functions:
1. It loads register 15 with a value of 0
2. It then does a branch to the address in register 14
Since register 14 is the standard IBM program linkage "return address" register, this immediately returns control to the calling program. And since register 15 is the standard IBM program linkage "return code" register, the return code passed back to the calling program is always 0.
If the calling program is an application program which calls IEFBR14 according to standard IBM program linkage conventions, then IEFBR14 acts as a subroutine which immediately returns to the calling program and always passes back a return code of 0. In other words, it functions as a subroutine "stub" which can be useful in some testing situations.
If IEFBR14 is executed as a standalone batch program; i.e.,
//JS10 EXEC PGM=IEFBR14
then it provides a convenient way to insert a job step into a given job which is guaranteed to set a return code of zero. This job step can also be used to catalog or delete specified data sets from within a batch job.
The following JCL for the job named MUKESH1 accomplishes several tasks, even though IEFBR14 does nothing but return 0:
//MUKESH1 JOB 1,LEO,MSGCLASS=X
//EXEC1 EXEC PGM=IEFBR14//NEWDS DD DSN=MUKESH.LIB.CNTL,DISP=(NEW,CATLG),VOL=SER=WORK02,// UNIT=3390,SPACE=(CYL,(3,1,25)
//OLDDS DD DSN=MUKESH.OLD.DATA,DISP=(OLD,DELETE)
The z/OS job scheduler to check your JCL statements for syntax errors.
The initiator allocates the new data set defined by NEWDS (MUKESH.LIB.CNTL) and keeps the data set when the job ends.
The initiator also deletes an old data set defined by OLDDS (MUKESH.OLD.DATA) at the end of the job.
The first three letters of the utilities has specific usage like "IEF" for programs produced by the job management group, "IEB" for data set utility programs, "IEF" for system utility programs, and "IEW" for program-linkage and -loading.
And the next portion of the program name, for example "BR14" means "branch to register 14", IEBUPDTE was the dataset utility (IEB) that applied updates (UPDTE) to source code files, and IEHINITT was the system utility (IEH) that initialized (INT) magnetic tape labels (T).
IEFBR14 is a very popular utility in IBM mainframes. Even though it is very popular, the service provided by this utility is "nothing".(i.e) It is a "do nothing" utility. This utility runs in all the IBM environments derived from OS/360, including z/OS.
This utility module performs two simple functions:
1. It loads register 15 with a value of 0
2. It then does a branch to the address in register 14
Since register 14 is the standard IBM program linkage "return address" register, this immediately returns control to the calling program. And since register 15 is the standard IBM program linkage "return code" register, the return code passed back to the calling program is always 0.
If the calling program is an application program which calls IEFBR14 according to standard IBM program linkage conventions, then IEFBR14 acts as a subroutine which immediately returns to the calling program and always passes back a return code of 0. In other words, it functions as a subroutine "stub" which can be useful in some testing situations.
If IEFBR14 is executed as a standalone batch program; i.e.,
//JS10 EXEC PGM=IEFBR14
then it provides a convenient way to insert a job step into a given job which is guaranteed to set a return code of zero. This job step can also be used to catalog or delete specified data sets from within a batch job.
The following JCL for the job named MUKESH1 accomplishes several tasks, even though IEFBR14 does nothing but return 0:
//MUKESH1 JOB 1,LEO,MSGCLASS=X
//EXEC1 EXEC PGM=IEFBR14//NEWDS DD DSN=MUKESH.LIB.CNTL,DISP=(NEW,CATLG),VOL=SER=WORK02,// UNIT=3390,SPACE=(CYL,(3,1,25)
//OLDDS DD DSN=MUKESH.OLD.DATA,DISP=(OLD,DELETE)
The z/OS job scheduler to check your JCL statements for syntax errors.
The initiator allocates the new data set defined by NEWDS (MUKESH.LIB.CNTL) and keeps the data set when the job ends.
The initiator also deletes an old data set defined by OLDDS (MUKESH.OLD.DATA) at the end of the job.
Subscribe to:
Posts (Atom)