Data Set Utilities
This chapter describes data set utilities.
1. Overview
The following is a list of data set utilities. Each utility is described in detail below.
Program Name | Description |
---|---|
Calls DFSMSdss functions provided from JCL in the IBM mainframe MVS environment. |
|
Searches and handles CICS log data included in the SMF data set. |
|
Manages VSAM and Non-VSAM data sets, as well as catalog information. |
|
Compares two SDSs or PDSs with comparable conditions and displays the results. |
|
Copies or merges entire or partial members of one or more PDSs. |
|
Creates a test data set. |
|
Creates or edits JOB stream data set. |
|
Copies sequential data sets or members of PDS. |
|
Creates data to print out all or part of a sequential data set or PDS in a output format. |
|
Creates, updates, and copies resources (application sources, JCL sources, etc.) |
|
Provides PDS data set information and member list or volume information and data set list included in the volume. |
|
Compares two SDSs or PDSs through comparison conditions and displays the result. |
|
Dumps the SMF data set into a general data set or initializes the contents of SMF data set. |
2. ADRDSSU
The utility is used to call DFSMSdss functions from JCL in the IBM mainframe MVS environment.
ADRDSSU provides various commands such as COPY, DUMP, RESTORE, CONVERT, DEFRAG. OpenFrame only provides DUMP, RESTORE, and COPY which are used most frequently. DUMP and RESTORE are used for data set backup and restore data volume to prevent system damage caused by natural disasters and to protect important data. COPY is used to copy a data set to another name.
The DUMP command combines multiple data sets or volumes described in control statements in JCL into a single data set and stores the data set in a specified volume directory. The RESTORE command separates data sets into their original form from a dumped data set and restores them to a specified volume directory. Internally, the tar program provided by UNIX is used in this process.
When processing the DUMP command in OpenFrame, the data sets' catalog information is saved into a meta-info file inside the dumped data set. When processing the RESTORE command, this meta-file is used to restore the catalog state back to when it was dumped.
The COPY command is used to copy the target data set to another data set name. OpenFrame ADRDSSU only supports VSAM.
|
The workflow diagram for the general DUMP process is illustrated as follows:
The workflow diagram for the RESTORE process is illustrated as follows:
2.1. DD Statements
The following describes each DD statement for COPY, DUMP, and RESTORE.
-
COPY
Statement Description SYSIN DD
Describes the COPY command and its related options.
-
DUMP
Statement Description SYSIN DD
Describes the DUMP command and related options.
DD for INDD
Sets the volume information of the DUMP data set. The DD name is the same as the DD name defined in the INDD keyword of the control statements on the SYSIN DD. It can be omitted if the DUMP data set is registered in the catalog and there is no INDD keyword among the control statements.
DD for OUTDD
Sets the information of the DUMP data set. The DD name is the same as the DD name defined in the OUTDD keyword of the control statements on the SYSIN DD. DUMP handling is not performed if a DUMMY statement is described in the corresponding DD. OUTDD’s RECFM is generally set to 'U'.
The following are the data set record formats (RECFM):
-
F (Fixed): fixed-length records.
-
FB (Fixed Blocked): fixed-length records combined into one physical block.
-
V (Variable): variable-length records that includes a 4 Byte field for record description.
-
VB (Variable Blocked): variable-length records combined into one physical block.
-
U (Undefined): records with no predefined structure.
-
-
RESTORE
Statement Description SYSIN DD
Describes the RESTORE command and its optional parameters in the DD command named SYSIN.
DD for INDD
Sets the name of the targeted DUMP data set from which to restore. The DD name is the same as the DD name defined in the INDD keyword of the control statements on the SYSIN DD.
DD for OUTDD
Specifies the volume where the restored data set is saved. The DD name is the same as the DD name defined in the OUTDD keyword of the control statements on the SYSIN DD. DD for OUTDD can be entered multiple times. The DSN (Data Set Name) is not described for the DD.
2.2. Command Usage
This section describes the ADRDSSU commands.
ADRDSSU supports the following abbreviations of optional keywords for each command:
Command | Optional Keyword (Abbreviation) |
---|---|
COPY |
DATASET (DS) |
RENAMEU (RENUNC) |
|
SHARE (SHA, SHR) |
|
TOLERATE (TOL) |
|
DUMP |
ALLDATA (ALLD) |
ALLEXCP (ALLE) |
|
ALLMULTI (ALLM) |
|
DATASET (DS) |
|
DELETE (DEL) |
|
ENQFAILURE (ENQ) |
|
INCLUDE (INC) |
|
INDDNAME (INDD, IDD) |
|
INDYNAM (INDY, IDY) |
|
LOGINDDNAME (LOGINDD, LIDD) |
|
LOGINDYNAM (LOGINDY, LIDY) |
|
OUTDDNAME (OUTDD, ODD) |
|
PURGE (PUR, PRG) |
|
SHARE (SHA, SHR) |
|
TOLERATE (TOL) |
|
COMPRESS (COM) |
|
OPTIMIZE (OPT) |
|
RESTORE |
DATASET (DS) |
ENQFAILURE (ENQ) |
|
INDDNAME (INDD, IDD) |
|
OUTDDNAME (OUTDD, ODD) |
|
RENAME (REN) |
|
RENAMEU (RENUNC) |
|
REPLACE (REP) |
|
SHARE (SHA, SHR) |
|
TOLERATE (TOL) |
COPY
The command copies the specified data set to another named data set. The COPY command is only available in VSAM data sets.
The syntax of the COPY command is as follows:
COPY DATASET(INCLUDE(DSNAME,…) [RENAMEU((OLD DATASET NAME,NEW DATASET NAME),…)] [SHARE] [SPHERE] [TOL(ENQF)] [WAIT(interval_time, retry_attempts)]
Keyword | Description |
---|---|
DATASET |
Specifies the data set to be copied. |
INCLUDE |
Specifies one or more data set names to be copied from the DUMP-processed data set. Filtering of the data set to be copied is performed using wildcard characters. For information about wildcard characters, refer to the example that demonstrates filtering using wildcard characters in [Wildcard Characters]. |
RENAMEU |
Renames and restores the data set specified in the INCLUDE keyword. It is renamed and restored only if the specified data set exists. If the specified data set does not exist, it is restored to its original name. It is not available in VSAM data sets. |
SHARE |
Forces a shared lock when accessing the data set to be copied. If not specified, an exclusive lock is executed by default.. |
SPHERE |
Copies the target data set and the data set associated with the catalog. |
TOL |
Causes processing even if a shared or exclusive lock for the existing COPY target data set fails if the REPLACE statement is specified. This option is not recommended for maintaining data consistency. |
WAIT |
Specifies the interval time (seconds) and the number of attempts to lock the existing data set to be copied. If WAIT(2,99) is specified, locking will be attempted up to 99 times at 2 second intervals. If not specified, the default value is WAIT(2,2), and if WAIT(0,0) is specified, it will be processed immediately. |
DUMP
The command combines multiple Non-VSAM or VSAM data sets or volumes into a single data set.
The syntax of the DUMP command is as follows:
DUMP (DATASET(INCLUDE(DSNAME,…) [EXCLUDE(DSNAME,…)] | [FULL]) [BY(CREDT|EXPDT|REFDT,operator,*,[-]days)]) OUTDD(OUTDD NAME) [INDD(INDD NAME,…)] [INDY((VOLSER,UNIT),…)] [LIDD(LIDD NAME,…)] [LOGINDY((VOLSER,UNIT),…)] [ALLE] [ALLD(*)] [ALLM] [DELETE] [PURGE] [SHARE] [TOL(ENQF)] [WAIT(interval_time, retry_attempts)] [COMPRESS] [CAN]
Keyword | Description |
---|---|
DATASET | FULL |
Specifies data sets to dump.
|
INCLUDE |
Specifies one or more names of data sets to dump. Separate multiple data sets with a comma (,), a blank space, or a line feed. Name filtering can be performed using wildcard characters. For information about wildcard characters, refer to the example that demonstrates filtering using wildcard characters in [Wildcard Characters]. |
EXCLUDE |
Describes the name of one or more data sets to be excluded from dump targets. Name filtering can be performed using wildcard characters. For information about wildcard characters, refer to the example that demonstrates filtering using wildcard characters in [Wildcard Characters]. Separate multiple data sets with a comma (,), a blank space, or a line feed. |
BY |
Filters the data set given in the INCLUDE keyword using conditions described with the BY keyword.
The following example shows how to filter data sets created 3 days before the current date: (CREDT,LE,*,-3) or (REFDT,LE,*,-3) |
OUTDD |
Specifies the DD name of the DUMP data set to create. |
INDD |
Specifies the DD name of the volume to dump. One or more DD names can be specified. If the data set to dump is not specified and only the INDD is specified, all non-VSAM data sets in the corresponding volume are dumped. |
INDY |
Dynamically specifies the volume to dump. One or more names of the VOLSER and UNIT of the volume can be specified. |
LIDD |
In mainframes, the names of the DD to dump are defined using the LIDD keyword to handle a logical dump. However, in OpenFrame, it is handled like the INDD keyword because it is not a necessary concept. |
LOGINDY |
In mainframes, the names of the VOLSER and UNIT of the corresponding volume are defined using the LOGINDY keyword to handle a logical dump. However, in OpenFrame, it is handled like the INDY keyword because it is not a necessary concept. |
ALLE |
It is ignored because it is not necessary for OpenFrame. |
ALLD |
It is ignored because it is not necessary for OpenFrame. |
ALLM |
It is ignored because it is not necessary for OpenFrame. |
DELETE |
Deletes successfully dumped data sets. |
PURGE |
It can be specified after the DELETE keyword, but is ignored in OpenFrame. |
SHARE |
Executes a shared lock when accessing data sets to dump. If it is not specified, an exclusive lock is set by default. |
TOL |
performs handling even though a shared or exclusive lock for data sets to dump has failed. It is not recommended for data match. |
WAIT |
Specifies the interval time (seconds) and retry attempts for executing locks on data sets to dump. For example, for WAIT(2,99), locking is attempted a maximum of 99 times every 2 seconds. For WAIT(0,0), locking is attempted without waiting. If it is not specified, WAIT(2,2) is set by default. |
COMPRESS |
It is ignored because it is not necessary for OpenFrame. |
CAN |
It is ignored because it is not necessary for OpenFrame. |
[Comparison Operators]
The following describes comparison operators used with the BY keyword of the DUMP command.
Operator | Symbol | Definition |
---|---|---|
EQ |
= |
Equal to |
LE |
<= |
Less than or equal to |
LT |
< |
Less than |
GT |
> |
Greater than |
GE |
>= |
Greater than or equal to |
NE |
!= |
Not equal |
[Wildcard Characters]
Data Sets can be filtered by name using wild character with the INCLUDE keyword for a DUMP or RESTORE command.
Filter Key | Description |
---|---|
* (single asterisk) |
By default, matches a single qualifier. Also, matches 0 or more characters within a qualifier. |
** (double asterisk) |
Matches 0 or more qualifiers. |
% (percent) |
Matches a single character within a qualifier. |
Qualifier are segments separated by a period (.) in the data set names. For example, if the data set name is SYS.LIB, there are two qualifiers: SYS1 and LIB.
The following example demonstrates filtering using wildcards:
Filtering Criterion | Matching Data Sets | Nonmatching Data Sets |
---|---|---|
SYS1.*.LIST |
SYS1.TEST.LIST, SYS1.LIB.LIST |
SYS.TEST.LIST.TEMP, SYS1.LIST |
SYS1.LIB.*.* |
SYS1.LIB.LIST.TEMP, SYS1.LIB.A.B |
SYS1.LIB.LIST, SYS1.LIB.A.B.C |
SYS.*IB.LIST |
SYS.LIB.LIST, SYS1.IB.LIST |
SYS.LIBA.LIST, SYS.LIB.LIST.TEMP |
**.LIST |
SYS1.LIST, SYS1.LIB.LIST, SYS1.A.B.C.LIST |
SYS1.LIST.TEMP, SYS1.LIB.LISTA |
USER.LIB.** |
USER.LIB.LIST.TEMP, USER.LIB |
USER.LIBTEST.LIST, USER.LIBLIST |
SYS1.**.LIST |
SYS1.A.B.C.LIST, SYS1.LIST |
SYS1.LIST.ERR, SYS1.TEST.LIST.ERR |
**.*LIST |
SYS1.TEST.LIST, SYS1.TEST.A.B.OKLIST |
SYS1.LIST.ERR, SYS1.TEST.OKLIST.TEMP |
*.*.L*B |
SYS1.TEST.LIB, USER.LIB.LISTB, A.B.LB |
SYS1.TEST.LIBTEMP, SYS1.USER.LIB.TEMP |
%.LIST |
A.LIST, B.LIST |
AA.LIST, BB.LIST, LIST |
USER%.* |
USER1.LIST, USERA.LIST |
USEROK.LIST, USER1.OK.LIST, USER.LIST |
*%%* |
AA, BB, TEST, USER |
A, B, TEST.USER |
|
[GDG Wildcard Filtering]
You can use wildcard filtering if the data set specified in the INCLUDE clause is GDS.
Filter Key | Description |
---|---|
GDGdsn(0) |
Matches GDS (Generation Data Set) with the generation number of the target data set. |
GDGdsn(*) |
Matches all GDSs that belong to the GDG (Generation Data Group). |
RESTORE
The command restores the DUMP-processed data set as a single file to the original data set.
The syntax of the RESTORE command is as follows:
RESTORE DATASET(INCLUDE(DSNAME,…) [EXCLUDE(DSNAME,…)]) INDD(INDD NAME) OUTDD(OUTDD NAME,…) [RENAME((OLD DATASET NAME,NEW DATASET NAME),…)] [RENUNC((OLD DATASET NAME,NEW DATASET NAME),…)] [CATALOG] [REPLACE] [SHARE] [TOL(ENQF)] [WAIT(interval_time, retry_attempts)]
Parameter | Description |
---|---|
DATASET |
Specifies data sets to restore. |
INCLUDE |
Specifies one or more names of data sets to restore. Name filtering can be performed using wildcard characters. For information about wildcard characters, refer to the example that demonstrates filtering using wildcard characters in [Wildcard Characters]. |
EXCLUDE |
Specifies one or more names of data sets to exclude from restore targets. Name filtering can be performed using wildcard characters. For information about wildcard characters, refer to the example that demonstrates filtering using wildcard characters in [Wildcard Characters]. |
INDD |
Specifies the name of the DD that defines the DUMP data set. |
OUTDD |
Specifies the name of the DD in the output volume where the restored data set will be saved. |
RENAME |
Changes the data set name specified in the INCLUDE statement to a new data set name for restoration processing. When the data set with the name before the change already exists, the data set with the name before the change is restored by changing the name. When the data set with the name before the change does not exist, it is restored with the name before the change. |
RENUNC |
Changes the data set name specified in the INCLUDE statement to a new data set name for restoration processing. It is different from the RENAME statement in that it unconditionally restores the data set with the new name regardless of the existence of the data set with the name before the change. |
CATALOG |
In mainframes, it is specified for a logical restore. However, in OpenFrame, it is ignored because the catalog information from handling the dump is used. |
REPLACE |
Replaces the corresponding data set if a data set to restore already exists. An existing data set is searched for in the following order:
|
SHARE |
Executes a shared lock when accessing existing data sets to restore if the REPLACE keyword is specified. If it is not specified, an exclusive lock is set by default. |
TOL |
Performs handling even though a shared or exclusive lock for data sets to restore has failed, if the REPLACE keyword is specified. It is not recommended for data match. |
WAIT |
Specifies the interval time (second) and retry attempts to execute a lock for data sets to dump, if the REPLACE keyword is specified. For example, for WAIT(2,99), locking is attempted a maximum of 99 times every 2 seconds. For WAIT(0,0), locking is attempted without waiting. If this is not specified, WAIT(2,2) is set by default. |
IF-THEN-ELSE
The IF-THEN-ELSE command compares codes returned after handling the commands of the ADRDSSU utility. The nested IF statement can be used, and only WTO command is currently supported after a conditional split.
The syntax of the IF-THEN-ELSE command is as follows:
IF {Condition Code} {operator} {number} THEN [command|DO command set END] [ELSE [command|DO command set END]]
The following variable values can be used for comparison in an IF condition:
Variable | Description |
---|---|
LASTCC |
The final return code after handling commands. |
MAXCC |
The return code that has the greatest value while handling commands. |
For more information on operators used in condition comparison, refer to the table in [Comparison Operators].
The following example shows a control statement that includes an IF-THEN-ELSE command:
DUMP INDD(IN) OUTDD(OUT) DELETE – DATASET(INCLUDE(TEST.DATASET.**) BY (CREDT,LT,*,1) ) – IF MAXCC > 4 – THEN DO – WTO ‘* DATA SETS DELETE FAILURE *’- END
In the example above, if MAXCC is greater than 4, a message is output to the system console through the WTO command.
WTO
The WTO command outputs messages to the system console of the system administrator. To check the output messages, tconmgr must be started before executing the ADRDSSU utility. For more information about tconmgr, refer to OpenFrame Batch Guide.
The syntax of the WTO command is as follows:
WTO ‘message’
Parameter | Description |
---|---|
message |
Specifies messages to output to the system console. |
2.3. Examples
The following example combines multiple non-VSAM data sets into a single data set using DUMP. ADRDSSU.TEST01, ADRDSSU.TEST02, and ADRDSSU.TEST03 data sets are dumped into ADRDSSU.DUMPED.DS data set specified in OUTDD.
//********************************************************************* //*** ADRDSSU LOGICAL DUMP *** //********************************************************************* //ADRDUM01 JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JS010 EXEC PGM=ADRDSSU //OUTDD DD DSN=ADRDSSU.DUMPED.DS,UNIT=3380,DISP=(NEW,CATLG,DELETE) //SYSIN DD * DUMP DATASET(INCLUDE(ADRDSSU.TEST01, - ADRDSSU.TEST02, - ADRDSSU.TEST03)) - OUTDD(OUTDD) /* //SYSPRINT DD SYSOUT=* *
The following example combines multiple non-VSAM data sets into a single data set using DUMP and then removes the dumped data sets.
ADRDSSU.TEST01, ADRDSSU.TEST02, and ADRDSSU.TEST03 data sets are dumped into ADRDSSU.DUMPED.DS data set specified in OUTDD and then they are deleted.
//********************************************************************* //*** ADRDSSU LOGICAL DUMP AND DELETE *** //********************************************************************* //ADRDUM01 JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JS010 EXEC PGM=ADRDSSU //OUTDD DD DSN=ADRDSSU.DUMPED.DS,UNIT=3380,DISP=(NEW,CATLG,DELETE) //SYSIN DD * DUMP DATASET(INCLUDE(ADRDSSU.TEST01, - ADRDSSU.TEST02, - ADRDSSU.TEST03)) - OUTDD(OUTDD) - ALLE ALLD(*) - DEL PURGE – TOL(ENQF) - WAIT(2,99) - SHARE /* //SYSPRINT DD SYSOUT=*
The following example combines data sets with names that match the condition specified with wildcard characters in the INCLUDE keyword and then dumps them.
Data Sets with first qualifier of 'ADRTEST' are dumped.
//********************************************************************* //*** ADRDSSU LOGICAL DUMP WITH DATA SET NAME FILTERRING *** //********************************************************************* //ADRDUM01 JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JS010 EXEC PGM=ADRDSSU //OUTDD DD DSN=ADRDSSU.DUMPED.DS,UNIT=3380,DISP=(NEW,CATLG,DELETE) //SYSIN DD * DUMP DATASET( INCLUDE(ADRTEST.**) ) - OUTDD(OUTDD) /* //SYSPRINT DD SYSOUT=*
The following example dumps data sets with names that match the BY condition among the data sets filtered by the INCLUDE keyword.
All data sets with a creation date later than one day prior to the current day among the data sets with first qualifier of 'ADRTEST' and second qualifier starting with 'TEST' are dumped.
//********************************************************************* //*** ADRDSSU LOGICAL DUMP WITH ‘BY’ FILTERING *** //********************************************************************* //ADRDUM01 JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JS010 EXEC PGM=ADRDSSU //OUTDD DD DSN=ADRDSSU.DUMPED.DS,UNIT=3380,DISP=(NEW,CATLG,DELETE) //SYSIN DD * DUMP DATASET( INCLUDE(ADRTEST.TEST*) BY (CREDT,GT,*,-1) ) - OUTDD(OUTDD) //SYSPRINT DD SYSOUT=*
The following example dumps all non-VSAM data sets included in the volume specified in the INDD keyword.
All non-VSAM data sets included in the volume serial '200000' specified in INDD are dumped.
//********************************************************************* //*** ADRDSSU PHYSICAL DUMP *** //********************************************************************* //ADRDUM01 JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JS010 EXEC PGM=ADRDSSU //INDD1 DD UNIT=SYSDA,DISP=SHR,VOL=SER=200000 //OUTDD DD DSN=ADRDSSU.DUMPED.DS,UNIT=3380,DISP=(NEW,CATLG,DELETE) //SYSIN DD * DUMP INDD(INDD1) OUTDD(OUTDD) //SYSPRINT DD SYSOUT=*
The following example restores dumped data sets as non-VSAM data sets.
ADRDSSU.TEST01, ADRDSSU.TEST02, and ADRDSSU.TEST03 data sets are restored from the DUMP data set.
//********************************************************************* //*** ADRDSSU LOGICAL RESOTRE *** //********************************************************************* //ADRRES1 JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JS010 EXEC PGM=ADRDSSU //INDD DD DSN=ADRDSSU.DUMPED.DS,DISP=OLD //DASD1 DD VOL=SER=100000,UNIT=3380,DISP=OLD //SYSIN DD * RESTORE DATASET(INCLUDE(ADRDSSU.TEST01, - ADRDSSU.TEST02, - ADRDSSU.TEST03)) - CATALOG - INDD(INDD) - OUTDD(DASD1) /* //SYSPRINT DD SYSOUT=*
The following example restores the dumped data sets with new names.
ADRDSSU.TEST01, ADRDSSU.TEST02, and ADRDSSU.TEST03 data sets are restored as ADRDSSU.TEST01.NEW, ADRDSSU.TEST02.NEW, and ADRDSSU.TEST03.NEW data sets respectively.
//********************************************************************* //*** ADRDSSU LOGICAL RESOTRE AND RENAME *** //********************************************************************* //ADRRES1 JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JS010 EXEC PGM=ADRDSSU //INDD DD DSN=ADRDSSU.DUMPED.DS,DISP=OLD //DASD1 DD VOL=SER=100000,UNIT=3380,DISP=OLD //SYSIN DD * RESTORE DATASET(INCLUDE(ADRDSSU.TEST01, - ADRDSSU.TEST02, - ADRDSSU.TEST03)) - RENUNC((ADRDSSU.TEST01,ADRDSSU.TEST01.NEW ), - (ADRDSSU.TEST02,ADRDSSU.TEST02.NEW ), - (ADRDSSU.TEST03,ADRDSSU.TEST03.NEW )) - CATALOG - INDD(INDD) - OUTDD(DASD1) /* //SYSPRINT DD SYSOUT=*
The following example restores all dumped data sets. All dumped data sets included in the ADRDSSU.DUMPED.DS data set are restored to data sets with their original names.
//********************************************************************* //*** ADRDSSU PHYSICAL RESOTRE *** //********************************************************************* //ADRRES1 JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JS010 EXEC PGM=ADRDSSU //INDD DD DSN=ADRDSSU.DUMPED.DS,DISP=OLD //DASD1 DD VOL=SER=100000,UNIT=3380,DISP=OLD //SYSIN DD * RESTORE INDDNAME(INDD) OUTDDNAME(DASD1) - DATASET(INCLUDE(**)) /* //SYSPRINT DD SYSOUT=*
The following copies a data set. ADRDSSU.TEST01 is copied to ADRDSSU.TEST01.NEW.
//********************************************************************* //*** ADRDSSU PHYSICAL COPY *** //********************************************************************* //ADRRES1 JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JS010 EXEC PGM=ADRDSSU //SYSIN DD * COPY DATASET(INCLUDE(ADRDSSU.TEST01)) - WAIT(0,0) SPHERE - RENAMEU(ADRDSSU.TEST01.NEW) /* //SYSPRINT DD SYSOUT=*
2.4. Related Environment Configuration
The DUMP function for VSAM is implemented using a utility provided by Tibero.
Set the information to use the Tibero utility in the adrdssu subject and DUMP_VSAM section in the OpenFrame environment configuration, and refer to this information when executing the command.
For how to configure the adrdssu subject, refer to OpenFrame Configuration Guide. |
2.5. Return Codes
Use TSAM RDB to process VSAM format data set in OpenFrame. Specify to process return code 12 or higher in the rc subjec as an error during OpenFrame configuration through the ofconfig tool.
The result of ADRDSSU utility program running Batch application is as follows:
-
Upon success:
It returns the return code of the batch application.
-
In the case of an error:
Error messages are printed to SYSPRINT DD and the corresponding error code is returned.
The following errors may occur in ADRDSSU:
Code Description 8
Indicates some data sets cannot be found and other data sets have been successfully processed during program execution.
12
Indicates unrecoverable error. Execution failed due to an error.
|
3. DFHJUP
The utility is used to search and handle CICS log data included in the SMF data set. Using the DFHJUP system utility program, CICS log records included in the SMF data set can be selected with various conditions, output as a result, and copied to another data set.
IFASMFDP is similar to DFHJUP. |
3.1. DD Statements
The following describes each DD statement.
Statement | Description |
---|---|
SYSPRINT DD |
Output data set in the case of printing with SYSPRINT among selected records in DFHJUP. |
SYSIN DD |
Specifies commands of DFHJUP. |
SYSUT1 DD |
Specifies default input data sets of DFHJUP. It can be changed to another DD through the CONTROL statement. |
SYSUT4 DD |
Specifies default output data sets of DFHJUP. It can be changed to another DD through the CONTROL statement. |
|
3.2. Command Usage
This section describes the DFHJUP commands.
CONTROL
The command specifies the DD that defines the input/output data set, or the range for handling input data sets with the unit of the number of records.
The syntax of the CONTROL command is as follows:
CONTROL CNTL [{SKIP|K}={0|number}] [,{STOPAFT|H}={EOF|number|(number,E)}] [,{DDNAME|D}={SYSUT1|ddname}] [,{DDNOUT|O}={SYSUT4|ddname}]
Parameter | Description |
---|---|
SKIP | K |
Specifies the number of records that will be ignored, starting from the first record of the input data set. (Default value: 0) |
STOPAFT | H |
Specifies the maximum number of records to be read and tested from the input data set. (number,E) specifies that processing is performed until the number of records that meet the condition becomes the number specified. Default value is EOF, which indicates the end of the input file regardless of the number of records. |
DDNAME | D |
Specifies the DD that defines the input data set in ddname. (Default value: SYSUT1) |
DDNOUT | O |
Specifies the DD that defines the output data set in ddname. (Default value: SYSUT4) |
OPTION
The command specifies the condition for selecting records. The selection condition specified in each OPTION statement is called a test. Each test is handled with the OR condition by default. Multiple tests can be used by specifying the COND parameter and combining with the AND condition, which is called a test series.
The syntax of the OPTION command is as follows:
OPTION {PRINT|COPY|NEGOF} [{OFFSET|O}={1|number}] [,{FLDTYP|T}={X|C}] [,{VALUE|V}=string] [,{FLDLEN|L}={1|number}] [,{COND|C}={E|M|T{Y|N}]
Parameter | Description |
---|---|
Prints all selected record to SYSPRINT DD. |
|
COPY |
Copies all selected records to an output data set. These records can be printed to SYSPRINT DD using PRTSYS. |
NEGOF |
Specifies the offset from the end of a record by making the value of OFFSET a negative value. Selected records are printed to SYSPRINT DD. |
OFFSET | O |
Specifies the location in the record of the first byte of the field to be tested. (Default value: 1) If NEGOF is set, the number of bytes from the end of a record is specified. |
FLDTYP | T |
Specifies the type of string given as VALUE. The following values can be selected:
|
VALUE | V |
Writes the value to be tested against a specified record as a string. Character and hexadecimal types can be specified up to 255 and 510 characters respectively. |
FLDLEN | L |
Specifies the length of the record to be tested against the value of VALUE. The default value is 1, and up to 255 can be specified. |
COND | C |
Specifies the relationship between test type and another test.
|
END
Indicates the end of the CONTROL statement. The syntax of the END command is as follows:
END
3.3. Examples
The following example copies the SMF data sets given as SYSUT1 to SYSUT4.
//DFHJUP JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //STEP EXEC PGM=DFHJUP //SYSOUT DD SYSOUT=* //SYSUT1 DD DSN=SMLOG.CICSDATA,DISP=SHR //SYSUT4 DD DSN=SMF.CICSDUMP,DISP=NEW,DCB=LRECL=32760 //SYSIN DD * OPTION COPY END /* //
The following example selects the SMF data sets given as SYSUT1 that meet the condition in the OPTION statement and then prints them with SYSPRINT. Records whose value of the 4th byte from the end is 'E' are selected.
//DFHJUP JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //STEP EXEC PGM=DFHJUP //SYSOUT DD SYSOUT=* //SYSUT1 DD DSN=SMLOG.CICSDATA,DISP=SHR //SYSUT4 DD DSN=SMF.CICSDUMP,DISP=NEW,DCB=LRECL=32760 //SYSPRINT DD DSN=SMF.CICSPRT,DISP=NEW,DCB=LRECL=32760 //SYSIN DD * OPTION NEGOF OFFSET=4,T=C,V=E END /* //
The following example selects the SMF data sets given as UTILIN that meet the condition in the OPTION statement and then copies them with UTILOUT or prints them with SYSPRINT.
//DFHJUP JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //STEP EXEC PGM=DFHJUP //SYSOUT DD SYSOUT=* //UTILIN DD DSN=SMLOG.CICSDATA,DISP=SHRv //UTILOUT DD DSN=SMF.CICSDUMP,DISP=NEW,DCB=LRECL=32760 //SYSIN DD * CONTROL CNTL SKIP=4,STOPAFT=(8,E),DDNAME=UTILIN,DDNOUT=UTILOUT OPTION COPY OFFSET=7,T=C,V=E,C=M OPTION COPY OFFSET=6,V=30,L=1 OPTION COPY OFFSET=6,FLDTYP=C,VALUE=0,FLDLEN=1,COND=M OPTION COPY O=7,V=D,C=M,L=1,T=C END /* //
-
In the above example, the first 4 records of UTILIN are ignored because of the SKIP statement.
-
Only up to 8 records that satisfy the conditions of the STOPAFT statement are handled by DFHJUP.
-
They are copied to UTILOUT if the following condition is met:
( (The value of 7th byte is 'E' ) AND (The value of 6th byte is X'30') ) OR ( (The value of 6th byte is '0') AND (The value of 7th byte is 'D') )
The following example performs TRUNCATE on the SMF dataset specified in SYSUT1 because the SUBSYS subparameter conditions are met.
//DFHJUP JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //STEP EXEC PGM=DFHJUP //SYSOUT DD SYSOUT=* //SYSUT1 DD DSN=SMLOG.CICSDATA, // SUBSYS=(LOGR,DFHLGCNV,,DELBRCUR) //SYSIN DD * OPTION PRINT END /* //
3.4. Return Codes
The DFHJUP utility program displays the following batch execution results:
-
Upon success:
It returns the return code of the batch application.
-
In the case of an error:
Error messages are printed to SYSOUT or SYSPRINT’s DD and the corresponding error code is returned.
The following errors may occur in the DFHJUP utility program.
Code Description 0
Indicates the utility program has performed successfully.
8
Indicates the utility program has stopped due to a significant error. It occurs in the following cases:
-
Script parsing failed
-
Unable to use data sets
-
OpenFrame system library initialization failed
-
4. IDCAMS
The utility is used to manage OpenFrame’s VSAM and Non-VSAM data sets, as well as catalog information.
Each command entered in a SYSIN DD statement is composed of the command itself and the optional parameters. IDCAMS reads these commands from SYSIN DD and executes them.
OpenFrame’s IDCAMS utility has the same command set as mainframe’s IDCAMS utility and operates on VSAM data set, Non-VSAM data set, and catalog. It essentially performs the same tasks as the mainframe IDCAMS utility.
The IDCAMS utility can be classified into two types of commands:
-
Functional Commands
Indicate the specific action the user wants to perform.
Command Description Alters a data set or a catalog attribute.
Defines the following data set objects or catalog entries:
Deletes a VSAM data set, a Non-VSAM data set, or a catalog.
Exports catalogs or VSAM data sets to a backup data set or a portable data set.
Imports a backup data set or a portable data set from the EXPORT command. Catalogs and VSAM data sets in backup or portable data set format are restored to their original state.
Displays information regarding VSAM and Non-VSAM data sets registered in a catalog.
Prints VSAM or Non-VSAM data set records.
Copies a VSAM or Non-VSAM data set record to another data set.
Fixes corrupt data set information caused by abnormal termination (close) of data sets in a catalog and verifies consistency between data set information and actual data sets. Checks the correct reflection of the information such as the number of records.
When closing a VSAM data set, statistical information such as the data set’s last position and number of records are recorded in a catalog. When a VSAM data set is closed abnormally, data set information in the catalog may not be consistent with the actual data set information. The VERIFY command corrects this inconsistency.
-
Modal Commands
Control the execution of a series of IDCAMS commands.
Command Description Conditionally branches to different commands based on the conditionally coded value (LASTCC or MAXCC) of the last executed command.
Logical command that has no function.
After IF-THEN-ELSE command’s THEN or ELSE statement, the Null command is used to show that there is no specific command to be carried out for the branch.
Explicitly sets the value of MAXCC or LASTCC.
Stops the execution of the IDCAMS program. Subsequent commands will not be processed.
PARM
Sets optional parameters while IDCAMS is being executed. (Not supported yet)
-
Non-functional Commands
Control to prevent errors. It does not actually function.
Command Description Creates a secondary index for a specific data set.
Coding Conventions
The following table is a summary of coding conventions for IDCAMS commands:
-
Hyphen (-)
If a single command needs to be written over multiple lines, add a hyphen (-) at the end of each line and continue coding on the next line. Note that a hyphen (-) must be used in between keywords or parameters and not inside a keyword or parameter.
An example of coding using a hyphen (-) is as follows:
LISTCAT ENT( - TEST.CLUS1 - TEST.KSDS1 - TEST.RRDS1 - TEST.SDS1)
Do not put a hyphen (-) on the last line of multi-line commands.
-
Comment
Comments can be used in between IDCAMS commands, but cannot be used inside a keyword or parameter.
There is no functionality associated with comments. However, they are treated as commands and thus a comment that spans multiple lines requires a hyphen at the end of each commented line. Like a white-space or a comma, comments may be used to syntactically separate fields in an IDCAMS statement. Thus, the comment must be placed between '/*' and '*/'.
The example below shows the correct way of writing comments:
/* This is IDCAMS Comment */ /* This is multi line Comment comment continued from above line */ LISTCAT ENT( /* Comment 1 */ - TEST.KSDS1 /* Comment 3 */ - TEST.SDS1 /* Comment 4 */ ) /* Comment 5 */
If a comment is used inside an IF-THEN-ELSE statement, be careful not to alter the structure of the IF-THEN-ELSE statement.
4.1. DD Statements
OpenFrame’s IDCAMS utility can be executed as a batch job through JCL or interactively through the UNIX system’s command line interface.
Executing in JCL as JOB (using JCL as JOB)
When IDCAMS is executed in JCL as a JOB statement, use the following DD statements.
Statement | Description |
---|---|
SYSIN DD |
Specifies commands to be performed by IDCAMS. A data set record cannot be more than 72 columns. If a command becomes lengthy, use a hyphen (-). |
SYSPRINT DD or SYSOUT DD |
Specifies the data set where informative messages, warning messages, and error messages from the execution of IDCAMS and execution results are stored. If SYSPRINT DD is missing or a specified data set cannot be allocated or opened, IDCAMS exits without executing any commands and returns condition code 16. |
Additional command specific DDs |
Some IDCAMS commands can indirectly specify target ddname or entryname via DD statements in JCL. In this case, IDCAMS does not dynamically allocate data sets and it inherits data sets allocated from the JOB level. This allocation is done by tjclrun, the execution controller for JOB. The parameter that indirectly specifies the data set from JCL ddname statement has FILE (ddname) typed in the parameter name. Conversely, the parameter that specifies the data sets dynamically allocated by IDCAMS has DATASET (entryname) as the parameter name. |
The following is an example of parameters for the REPRO BLDINDEX PRINT command, which inherits data sets allocated in JCL:
INFILE(ddname), OUTFILE(ddname)
The following is an example of parameters for the REPRO BLDINDEX PRINT command, which dynamically allocates data sets in IDCAMS.
INDATASET(entryname), OUTDATASET(entryname)
To execute IDCAMS as a JOB statement in JCL, DDs explained above are defined in a JOB statement that calls IDCAMS, and IDCAMS is specified in EXEC PGM. Finally, the respective JCL is submitted.
//JOB01 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //REPRO EXEC PGM=IDCAMS //INDD DD DSN=VSAM.KSDS1,DISP=(OLD,KEEP) //OUTDD DD DSN=VSAM.KSDS2,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(INDD) - OUTFILE(OUTDD) - SKIP(50000) COUNT(10000) /* //
Executing from Command Line
First, execute IDCAMS in the UNIX system command line. In this mode, a standard input/output stream (stdin/stdout/stderr) replaces SYSIN DD and SYSPRINT DD. This is an interactive interpreter model where IDCAMS command is read and executed from stdin and the results and the error messages are output to stdout/stderr.
The following UNIX system command line example command removes a VSAM data set named DEFINE.TEST.CLUS1.CMD and then redefines it:
$ IDCAMS < DEFINE.TEST.CLUS1.CMD
TEST.CLUS1.CMD is a UNIX text file and contains the following contents:
The DEFINE.TEST.CLUS1.CMD file shows the stdin redirection from the IDCAMS UNIX command line.
DELETE TEST.CLUS1 CLUSTER DEFINE CLUSTER - (NAME(TEST.CLUS1) - VOLUMES(100000) - INDEXED - KEYS(07 0) - CYL (70 10) - RECORDSIZE(200 200) - SHR(2 3)) - DATA (NAME(TEST.CLUS1.DATA) - CONTROLINTERVALSIZE(4096) ) - INDEX (NAME(TEST.CLUS1.INDEX) - CONTROLINTERVALSIZE(4096) )
Limitations
In order to inherit data sets allocated through the DD (ddname) statement, the runtime environment of OpenFrame/Batch, especially tjclrun, is required. Since tjclrun is only used when IDCAMS is executed in JCL, the data set cannot be specified using the ddname statement for the UNIX system command line interface.
Thus, when executing from the UNIX command line interface, data sets for IDCAMS must be specified in DATASET (entryname) format.
4.2. Functional Commands
This section describes the functional commands of IDCAMS.
ALTER
A data set registered in a catalog and some, but not all, of the catalog entry information can be modified using DEFINE statement.
The syntax of the ALTER commands is as follows:
ALTER entryname [EMPTY|NOEMPTY] [FILE(ddname)] [LIMIT(limit)] [NEWNAME(newname)] [NULLIFY([OWNER][RETENTION])] [OWNER(ownerid)] [ROLLIN] [SCRATCH|NOSCRATCH] [SHAREOPTIONS(crossregion[crosssystem])] [STORAGECLASS(class)] [STRNO(number)] [TO(date)|FOR(days)] [CATALOG(catname)]
Parameter | Description |
---|---|
entryname |
Specifies the catalog entry name of a data set or the catalog entry name itself to be modified. |
ROLLIN |
Specifies to change the GDS which is not yet associated with the GDG base (deferred rolled-in state) or is disconnected to the GDS that is associated with the GDG base (rolled-in state). |
CATALOG |
Specifies the catalog that will be used when searching the specified entryname. If this parameter is not set, the catalog is selected based on the default search order of catalogs. |
NEWNAME |
Renames the data set registered in the catalog. It can only be used for Non-VSAM. By changing Non-VSAM to GDS name, you can change it to the state associated with the GDG base. |
For more information on other parameters, refer to IBM DFSMS Access Method Services for Catalogs Guide. |
Depending on the catalog entry type and the load status of a user data set for the given catalog entry, there are editable and non-editable attributes of catalog entry information.
The catalog entry types supported by OpenFrame’s IDCAMS ALTER command are summarized with their editable attributes in the following table. The 'O' mark indicates that the attributes are editable.
Entry Type Editable Attributes |
AIX |
AIX DATA |
AIX INDEX |
CLUSTER |
CLUSTER DATA |
CLUSTER INDEX |
PATH |
UCAT DATA |
UCAT INDEX |
NON -VSAM |
GDG |
---|---|---|---|---|---|---|---|---|---|---|---|
NEWNAME |
- |
- |
- |
- |
- |
- |
O |
- |
- |
O |
- |
EMPTY |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
O |
NOEMPTY |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
O |
LIMIT |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
O |
NULLIFY |
- |
- |
- |
- |
- |
- |
O |
- |
- |
O |
O |
OWNER |
- |
- |
- |
- |
- |
- |
O |
- |
- |
O |
O |
ROLLIN |
- |
- |
- |
- |
- |
- |
- |
- |
- |
O |
- |
RETENTION |
- |
- |
- |
- |
- |
- |
O |
- |
- |
O |
O |
SCRATCH |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
O |
NOSCRATCH |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
O |
TO |
- |
- |
- |
- |
- |
- |
O |
- |
- |
O |
O |
FOR |
- |
- |
- |
- |
- |
- |
O |
- |
- |
O |
O |
For more information on other parameters, refer to IBM DFSMS Access Method Services for Catalogs Guide. |
In order to designate a new attribute value for the catalog entry to be changed, parameters for designating the catalog entry to be changed are required in addition to each parameter.
The example below modifies the attributes of a GDG named TEST.GDG1 registered in the TESTCAT catalog by changing the maximum number of attributes (LIMIT) to 255, and the expiration date attribute (TO) to the 300th day of 2006.
//JOB02 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //ALTGDG EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * ALTER TEST.GDG1 - LIMIT(255) - TO(2006300) - CATALOG(TESTCAT) /* //
DEFINE
The parameters commonly available in the DEFINE command are as follows:
DEFINE Commands {NAME(entryname)|NAMES(entryname)} {CYLINDERS(primary[secondary])| KILOBYTES(primary[secondary])| MEGABYTES(primary[secondary])| RECORDS(primary[secondary]])| TRACKS(primary[secondary])} VOLUMES(volser[volser...]) [CONTROLINTERVALSIZE(size)] [DATACLASS(class)] [MANAGEMENTCLASS(class)] [OWNER(ownerid)] [RECATALOG|NORECATALOG] [RECORDSIZE(average maximum)] [STORAGECLASS(class)] [TO(date)|FOR(days)]) [DATA (...)] [INDEX (...)] [CATALOG(catname)]
Parameter | Description |
---|---|
NAME | NAMES |
Specifies the name of the catalog object to be created or defined with the DEFINE command. Some DEFINE commands do not support NAMES. |
VOLUMES |
specifies a serial number of the volume where a data set is stored after the data set is created. |
DATACLASS |
Specifies the data class value (1-8 characters). A data class is defined in SMS (Storage Management Subsystem) and it includes various attributes used to create a new data set. When using a data class, the DEFINE statement for its attributes is not necessary. However, if the explicit DEFINE statement differs from the default attributes of a data class, the attributes from the DEFINE statement override the default attributes. |
MANAGEMENTCLASS |
Specifies the management class value (1-8 characters). A management class is defined in SMS and it includes various attributes such as TO and FOR which affect the management of created data sets. If TO or FOR is explicitly defined in the DEFINE statement, as well as in the management class, the management class takes precedence and overrides the DEFINE statement unlike in the case of the data class. |
OWNER |
Specifies an owner for the data set. |
RECATALOG| NORECATALOG |
Rebuilds catalog entries such as cluster, alternate index, index component, and Non VSAM data set from the information stored in VVDS. For Cluster and alternate index rebuilding, most information is retrieved from VVR (VSAM VOLUME RECORD) in VVDS. However, information missing in VVR must be entered explicitly through the DEFINE command. The parameters that must be explicitly defined are the following: The INDEXED, NONINDEXED, and NUMBERED parameters that define the VSAM record and the VOLUMES parameter that describe the data set’s original volume. Also VRDS must have the RECORDSIZE parameter, and ALTERNATEINDEX must have the NAME, RELATE, and VOLUME parameters. If the catalog entry is for a Non-VSAM data set, VOLUMES and DEVICETYPES parameters must be defined explicitly in the DEFINE statement. Finally, PATH is missing from VVDS, thus NAME and PATHENTRY parameters must be defined in the DEFINE statement to RECATALOG. |
RECORDSIZE |
Specifies the average and maximum record size for the new CLUSTER, ALTERNATEINDEX, and USERCATALOG data sets. If the average and maximum values have the same value, the record becomes a Fixed Length Record.
|
STORAGECLASS |
Specifies the storage class value (1-8 characters). The storage class is defined in SMS and includes attributes for the storage size allocation for creating data sets. If this parameter is set, other mandatory parameters for storage size (CYLINDERS, etc) need not to be set. Attributes defined in the storage class take precedence over attributes in the DEFINE statement. |
TO|FOR |
Specifies the expiration date when creating the data set and its catalog entry.
|
DATA, INDEX |
When creating a VSAM cluster that can have both a data component and index component such as CLUSTER, ALTERNATEINDEX, and USERCATALOG types, the parameters above can be set individually to data and index components. For example, if a CYLINDERS parameter is used to define the storage size for a CLUSTER, it could be defined as subparameters for the CLUSTER, DATA, or the INDEX component of the CLUSTER. If this parameter is defined for each individual component, each component has its own CYLINDER value. |
CATALOG |
Specifies the catalog where the catalog entry object from this command is registered. If this parameter is not specified, the aliased USERCATALOG, or the catalog specified in the JOB’s STEPCAT or JOBCAT is used. If there are no catalogs specified or aliased, a catalog entry object is registered in the master catalog. For more information on catalog search order, refer to "Chapter 4. Integrated Catalog" in OpenFrame Data Set Guide. |
The parameters above are commonly used for all kinds of DEFINE commands. Command specific parameters are described later on in this section. |
DEFINE ALIAS
The command creates an ALIAS for a Non-VSAM data set or a catalog.
ALIAS is stored in a catalog as a catalog entry consisting of just the referencing data set name and alias name. The data set for storing user data does not exist.
ALIAS cannot be created on a VSAM data set, with the exception of user defined catalogs. |
The syntax for the DEFINE ALIAS command is as follows:
DEFINE ALIAS (NAME(aliasname) RELATE(entryname)) [CATALOG(catname)]
Parameter | Description |
---|---|
NAME |
Specifies the name for this alias. |
RELATE |
Specifies the name of the entry to which the ALIAS is pointing. |
CATALOG |
Specifies the catalog where the ALIAS is registered. |
The following example creates an ALIAS named TEST.ALIAS1 for TEST.NVSAM1 which is registered in the TESTCAT catalog.
//JOB04 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //DEFALI EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE ALIAS(NAME(TEST.ALIAS1) - RELATE(TEST.NVSAM1)) - CATALOG(TESTCAT) /* //
DEFINE ALTERNATEINDEX
DEFINE ALTERNATEINDEX (hereafter AIX) command defines an AIX data set that provides a separate index method for a specific data set (BASE CLUSTER).
When a record is added, deleted, or changed in the base cluster, VSAM automatically performs changes to the related AIXs so that AIX can continuously and correctly update separate indexes for the base cluster.
The AIX data set has the same structure as the KSDS cluster, therefore parameters for the DEFINE CLUSTER can be used for DEFINE AIX.
The syntax of DEFINE AIX is as follows:
DEFINE AIX (NAME(entryname) | NAMES(entryname) RELATE(entryname) {CYLINDERS(primary[secondary])| KILOBYTES(primary[secondary])| MEGABYTES(primary[secondary])| RECORDS(primary[secondary])| TRACKS(primary[secondary])} VOLUMES(volser[ volser...]) [CONTROLINTERVALSIZE(size)] [DATACLASS(class)] [FILE(ddname)] [KEYS(length offset|64 0)] [OWNER(ownerid)] [RECATALOG|NORECATALOG] [RECORDSIZE(average maximum| 4086 32600)] [TO(date)|FOR(days)] [UNIQUEKEY|NONUNIQUEKEY] [UPGRADE|NOUPGRADE]) [DATA ({CYLINDERS(primary[secondary])| KILOBYTES(primary[secondary])| MEGABYTES(primary[secondary])| RECORDS(primary[secondary])| TRACKS(primary[secondary])} [VOLUMES(volser[volser...])] [CONTROLINTERVALSIZE(size)] [FILE(ddname)] [KEYS(length offset)] [NAME(entryname)] [OWNER(ownerid)] [RECORDSIZE(average maximum)] [UNIQUEKEY|NONUNIQUEKEY])] [INDEX ({CYLINDERS(primary[secondary])| KILOBYTES(primary[secondary])| MEGABYTES(primary[secondary])| RECORDS(primary[secondary])| TRACKS(primary[secondary])} [VOLUMES(volser[volser...])] [CONTROLINTERVALSIZE(size)] [FILE(ddname)] [NAME(entryname)] [OWNER(ownerid)])] [CATALOG(catname)]
Parameter | Description |
---|---|
RELATE |
Specifies the entry name of the base cluster data set which is related to the currently defined AIX . The data set used for the base cluster must be a VSAM data set with KSDS and ESDS data structure. Prior to defining AIX, a base cluster data set must be defined using the DEFINE CLUSTER command. |
RECORDSIZE |
Specifies the record size of an AIX data set cluster. If the SPANNED parameter is set, the size can be up to 32760. |
UNIQUEKEY| NONUNIQUEKEY |
Specifies the uniqueness of an AIX key value throughout all data sets. The KSDS data set used for a base cluster must always have a UNIQUEKEY. However, AIX can have both UNIQUEKEY and NONUNIQUEKEY. With NONUNIQUEKEY, the AIX data set cluster record is composed of an alternate key and a set of multiple keys. |
UPGRADE |
Updates an AIX cluster with the latest changes to its base cluster. In other words, this parameter always keeps the alternate index up-to-date. |
The following example creates an alternate index named VSAM.AIX1 for VSAM.KSDS1.
The alternate key is 7 bytes of data from offset 44 to the beginning of the record. Also, the alternate key is not unique and when the base cluster changes, it is automatically updated.
//JOB05 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //DEFAIX EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE AIX (NAME(VSAM.AIX1) - RELATE(VSAM.KSDS1) - UPGRADE - NUNQK - KEYS(7 44) - VOL(VOL100) - SHR(2 3)) /* //
DEFINE CLUSTER
The command defines VSAM data set and specifies primary and secondary properties together.
The syntax of the DEFINE CLUSTER command and the primary parameters that can be specified are as follows.
DEFINE CLUSTER (NAME(entryname) | NAMES(entryname) {CYLINDERS(primary[secondary])| KILOBYTES(primary[secondary])| MEGABYTES(primary[secondary])| RECORDS(primary[secondary])| TRACKS(primary[secondary])} VOLUMES(volser[ volser...]) [CONTROLINTERVALSIZE(size)] [DATACLASS(class)] [FILE(ddname)] [INDEXED|LINEAR|NONINDEXED|NUMBERED] [KEYS(length offset| 64 0] [MANAGEMENTCLASS(class)] [OWNER(ownerid)] [RECATALOG|NORECATALOG] [RECORDSIZE(average maximum)] [SPANNED|NONSPANNED] [STORAGECLASS(class)] [TO(date)|FOR(days)]) [DATA({CYLINDERS(primary[secondary])| KILOBYTES(primary[secondary])| MEGABYTES(primary[secondary])| RECORDS(primary[secondary])| TRACKS(primary[secondary])} [VOLUMES(volser[volser...])] [CONTROLINTERVALSIZE(size)] [FILE(ddname)] [KEYS(length offset)] [NAME(entryname)] [OWNER(ownerid)] [RECORDSIZE(average maximum)] [SPANNED|NONSPANNED])] [INDEX({CYLINDERS(primary[secondary])| KILOBYTES(primary[secondary])| MEGABYTES(primary[secondary])| RECORDS(primary[secondary])| TRACKS(primary[secondary])} [VOLUMES(volser[volser...])] [CONTROLINTERVALSIZE(size)] [FILE(ddname)] [NAME(entryname)] [OWNER(ownerid)])] [CATALOG(catname)]
Parameter | Description |
---|---|
VOLUMES |
Specifies the target volume for the data set. |
INDEXED| NONINDEXED| NUMBERED |
Specifies the data set structure to KSDS, ESDS, or RRDS. To use VRDS data set structure, set this parameter to NUMBERED and set RECORDSIZE to variable length. |
KEYS |
Specifies the key location and length in the indexed data set record. |
RECORDSIZE |
Specifies the average and maximum size of the data set record. Variable length records can be defined by having different values for average length and maximum length. |
SPANNED |
Stores data set records to have a length longer than the CONTROLINTERVALSIZE. Data Sets with NUMBERED structures, such as RRDS and VRDS, cannot use this parameter. |
The following is an example of creating an INDEXED structured data set named VSAM.KSDS1.
The data set record for VSAM.KSDS1 has a fixed length of 350 bytes and the key is extracted from the first 10 bytes. The index and the data component of the VSAM.KSDS1 data set are explicitly specified.
//JOB06 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //DEFCLUS EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE CLUSTER (NAME(VSAM.KSDS1) - INDEXED - KEYS(10 0) - VOL(VOL100) - SPEED - ORDERED - SHR(2 3)) - INDEX (NAME (VSAM.KSDS1.I)) - DATA (NAME(VSAM.KSDS1.D) - CISZ(4096) - RECSZ(350 350)) /* //
DEFINE GDG (Generation Data Group)
The command creates a GDG catalog entry in the catalog.
Unlike GDS, a Non-VSAM Generation data set, there are no actual data sets for GDG. The GDG catalog entry is for future GDG data sets.
As a result of executing DEFINE GDG, no data set is created, and only a catalog entry for managing the GDG group is added to the catalog.
The syntax of the DEFINE GDG command is as follows:
DEFINE GENERATIONDATAGROUP (NAME(entryname) | NAMES(entryname) LIMIT(limit) [EMPTY|NOEMPTY] [OWNER(ownerid)] [SCRATCH|NOSCRATCH] [TO(date)|FOR(days)]) [CATALOG(catname)]
Parameter | Description |
---|---|
NAME | NAMES |
Specifies the GDG base name. |
LIMIT |
Specifies the maximum number of GDSs that can be stored in a particular GDG. For example, if you specify 100, you cannot create more than 100 GDSs. This parameter can have values between 1 and 255. |
EMPTY| NOEMPTY |
Specifies EMPTY to terminate the association (rolled off status) between the entire GDS and the GDG base when the GDG base reaches the maximum value that can contain GDS members. The NOEMPTY parameter removes the association to the oldest GDS and adds the new GDS to the base. The GDS removed from the GDG base becomes a plain Non-VSAM data set. |
OWNER |
Explicitly specifies the owner of the GDG base to be created. |
SCRATCH| NOSCRATCH |
If the maximum number of GDS members that can be included in the GDG base is reached, depending on the EMPTY and NOEMPTY properties, when the association between the entire or oldest GDS data set and the GDG base is rolled off, the data used by the GDS is deleted (SCRATCH) or is kept (NOSCRATCH). |
TO|FOR |
Sets the expiration date of the GDG.
|
CATALOG |
Specifies the catalog where the GDG base to be created is registered. |
The following example creates a GDG base named TEST.GDG1 that can hold a maximum of 100 GDSs, expires after December 31st, 2006, and is registered in the TESTCAT catalog.
//JOB07 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //DEFGDG EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE GDG (NAME(TEST.GDG1) - LIMIT(100) - TO(2006365)) - CATALOG(TESTCAT) /* //
DEFINE NONVSAM
The command creates a PS (Physical Sequential) Non-VSAM data set and registers it in a catalog.
A GDS in GDG is a Non-VSAM data set. It can be created using the DEFINE NONVSAM command. |
The syntax of the DEFINE NONVSAM command is as follows:
DEFINE NONVSAM ({NAME(entryname)|NAMES(entryname)} DEVICETYPES(devtype [devtype ...]) VOLUMES(volser [volser ...]) [OWNER(ownerid)] [RECATALOG|NORECATALOG] [TO(date)|FOR(days)]) [CATALOG(catname)]
Parameter | Description |
---|---|
NAME | NAMES |
Specifies the name for the Non-VSAM data set. To create a GDS that is a member of GDG, entryname must follow the GDGname.GxxxxVyy naming convention. For example, in TEST.GDG1.G0001V00, Gxxxx is the generation number, and Vyy is the version number. For more information on naming conventions, refer to OpenFrame Data Set Guide |
DEVICETYPES |
Specifies the volume device type in which Non-VSAM data set is to be stored. The device type includes 3380, 3390, 3480, etc. Esoteric, or non-standard, device groups such as SYSDA cannot be used. |
VOLUMES |
Specifies the volume serial number for the Non-VSAM data set. |
CATALOG |
Specifies the catalog where the Non-VSAM data set’s catalog entry information is registered. |
OWNER |
Explicitly identifies the owner of the Non-VSAM data set. |
RECATALOG| NORECATALOG |
Specifies RECATALOG when registering VVDS corresponding to a non-VSAM data set and an existing data set only to the catalog. (Default value: NORECATALOG, creating a new data set.) |
TO|FOR |
Specifies the expiration date of the Non-VSAM data set.
|
The following example creates a Non-VSAM data set named TEST.NVSAM1 and registers it in the TESTCAT catalog.
//JOB08 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //DEFNVS EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE NONVSAM (NAME(TEST.NVSAM1) - VOLUMES(100000)) - CATALOG(TESTCAT) /* //
DEFINE PATH
The DEFINE PATH command defines a direct path to a base cluster or an indirect path to a base cluster that goes through an alternate index
The syntax of the DEFINE PATH command is as follows:
DEFINE PATH ({NAME(entryname) | NAMES(entryname)} [PATHENTRY(entryname)] [OWNER(ownerid)] [RECATALOG|NORECATALOG] [TO(date)|FOR(days)] [UPDATE|NOUPDATE]) [CATALOG(catname)]
Parameter | Description |
---|---|
NAME | NAMES |
Specifies the name of the path. |
PATHENTRY |
Specifies the name of the AIX data set if PATH consists of a pair of AIX and base cluster. In the case of defining the PATH for the base cluster itself, it can be considered of as a simple alias that designates the name of the base cluster data set and refers to the original indexing method of the base cluster data set. However, since one base cluster can define multiple PATHs, the command can be used to specify different properties that are applied when actually accessing. |
OWNER |
Explicitly identifies the owner of the access path. |
RECATALOG| NORECATALOG |
|
TO|FOR |
Specifies the effective date of the access path.
|
UPDATE| NOUPDATE |
|
The following example creates a PATH named VSAM.PATH1 which points to the VSAM.AIX1 base cluster through the VSAM.AIX1 alternate index.
The UPDATE parameter is set so that when the base cluster is modified using this PATH, alternate indexes other than VSAM.AIX1 are automatically updated as well.
//JOB09 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //DEFPATH EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE PATH (NAME(VSAM.PATH1) - PATHENTRY(VSAM.AIX1) - UPDATE) /* //
The following example creates a PATH named VSAM.PATH2 which points to a base cluster without going through an alternate index.
The UPDATE parameter is set so that modifying the VSAM.KSDS1 base cluster using VSAM.PATH2 will allow for automatic updates on alternate indexes of VSAM.KSDS1.
//JOB10 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //DEFPATH EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE PATH (NAME(VSAM.PATH2) - PATHENTRY(VSAM.KSDS1) - UPDATE) /* //
For more information on the DEFINE PATH command, refer to OpenFrame Data Set Guide. |
DEFINE USERCATALOG
A user can have many user catalogs as opposed to having a single master catalog.
If all data set meta-information is stored in the master catalog, the master catalog size becomes too large, which causes deterioration in performance.
The DEFINE USERCATALOG command creates a user catalog that can be used in the same way as master catalog. It can be considered as a sub-catalog for a master catalog.
The information about a user catalog is stored in the master catalog. This hierarchy cannot be defined between user catalogs. The depth of the user-master catalog hierarchy should not exceed one. Therefore, user catalogs cannot hold information on other user catalogs and all user catalog information is stored in the master catalog. Usually, user catalogs are created for each user or department.
OpenFrame does not use a separate command to create a master catalog. On the other hand, when creating additional user catalogs, it uses the DEFINE USERCATALOG command of IDCAMS.
The syntax and parameters of the DEFINE USERCATALOG command are as follows:
DEFINE USERCATALOG ({NAME(entryname)} {CYLINDERS(primary[secondary])| KILOBYTES(primary[secondary])| MEGABYTES(primary[secondary])| RECORDS(primary[secondary])| TRACKS(primary[secondary])} VOLUME(volser) [CONTROLINTERVALSIZE(size)] [DATACLASS(class)] [FILE(ddname)] [MANAGEMENTCLASS(class)] [OWNER(ownerid)] [RECORDSIZE(average maximum|4086 32400)] [STORAGECLASS(class)] [TO(date)|FOR(days)]) [DATA ({CYLINDERS(primary[secondary])| KILOBYTES(primary[secondary])| MEGABYTES(primary[secondary])| RECORDS(primary[secondary])| TRACKS(primary[secondary])} [CONTROLINTERVALSIZE(size)] [RECORDIZE(average maximum|4086 32400)])] [INDEX ({CYLINDERS(primary[secondary])| KILOBYTES(primary[secondary])| MEGABYTES(primary[secondary])| RECORDS(primary[secondary])| TRACKS(primary[secondary])} [CONTROLINTERVALSIZE(size)])] [CATALOG(mastercatname)]
Parameter | Description |
---|---|
NAME |
Sets the name of the user catalog. |
VOLUME |
Sets the volume where the user catalog is saved. |
RECORDSIZE |
Any user-defined record size here is ignored; however, the Basic Catalog Structure data set’s default record size (4086 32400) is used all the time. |
CATALOG |
Sets the master catalog where the user catalog is registered. If this parameter is not set, the user catalog is automatically registered to the system’s master catalog. |
For more information on other parameters, refer to IBM DFSMS Access Method Services for Catalogs Guide. |
DELETE
The command deletes VSAM data sets, Non-VSAM data sets, and other cataloged data sets. As the DELETE command’s task is simply removing existing data sets, it does not need many parameters. Only the name or catalog entry type of the data set to be deleted is needed.
The syntax of the DELETE command is as follows:
DELETE (entryname [entryname ...]) [ALIAS| ALTERNATEINDEX| CLUSTER| GENERATIONDATAGROUP| NONVSAM| PATH| TRUENAME| USERCATALOG] [FILE(ddname)] [FORCE|NOFORCE] [PURGE|OPURGE] [CATALOG(catname)]
Parameter | Description |
---|---|
entryname |
Specifies the name of the catalog entry or the data set to be deleted. Multiple entries can be deleted by listing the entry names in parentheses. The data set specified with entryname is exclusively allocated (DISP=OLD). |
ALIAS| ALTERNATEINDEX| CLUSTER| GENERATIONDATAGROUP| NONVSAM| PATH| TRUENAME| USERCATALOG |
ALIAS is ALIAS Entry Type. Specifies the catalog entry type to be deleted. This is an optional parameter; however, it prevents catalog entries of different types from being deleted. AIX, CLUSTER, PATH, and TRUENAME are VSAM data set entry types and all others are Non-VSAM data set entry types. |
FILE |
Specifies the data set to be deleted. When specifying a data set using FILE(ddname), its ddname must be specified by the ddname allocated by the DD statement of JCL, an IDCAMS caller. |
FORCE|NOFORCE |
Determines whether to forcibly delete the GDG to be deleted even if it has GDS members. Currently, this is available only for GDG.
|
PURGE|NOPURGE |
Specifies whether to remove the data set entry regardless of the specified usage period when defining the data set.
The data set expiration (retention period) is set by the TO and FOR parameters of the DEFINE command. |
CATALOG |
Specifies the catalog where the information of the catalog entry to be deleted is registered. |
The following example deletes the VSAM data set entries VSAM.KSDS1 and VSAM.KSDS2 regardless of their expiration dates.
//JOB11 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //DELCLUS EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE (VSAM.KSDS1 VSAM.KSDS2) - CLUSTER - ERASE - PURGE /* //
EXPORT
The command exports VSAM CLUSTER and ALTERNATE INDEXes to a transferable data set format that can be imported by OpenFrame. This EXPORT command is used to back up catalog data sets.
The syntax of the EXPORT command is as follows:
EXPORT entryname {OUTFILE(ddname)|OUTDATASET(entryname)} [INFILE(ddname)] [TEMPORARY|PERMANENT]
Parameter | Description |
---|---|
entryname |
Secifies the catalog entryname to EXPORT. The data set specified with entryname is exclusively allocated (DISP=OLD). |
OUTFILE| OUTDATASET |
Sets the data set where the result of the EXPORT command is stored. Use entryname to create a new data set or to use an existing data set. Use ddname to create a data set allocated by the runtime environment prior to the IDCAMS call. The data set specified with the OUTDATASET parameter is exclusively allocated (DISP=OLD). |
INFILE |
Specifies the data set to EXPORT. If INFILE(ddname) is set for the data set, the ddname must be set as the one allocated by JCL’s DD statement, an IDCAMS caller. |
TEMPORARY|PERMANENT |
Option to delete the catalog entry after EXPORT.
|
The following example exports the entire TESTCAT catalog to TESTCAT.BACKUP.
//JOB12 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //BACKCAT EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //BACK DD DSN=TESTCAT.BACKUP,DISP=OLD //SYSIN DD * EXPORT TESTCAT - OUTFILE(BACK) /* //
IMPORT
The IMPORT command imports catalogs from a transferable data format (data exported using the EXPORT command).
The syntax of the IMPORT command is as follows:
IMPORT {INFILE(ddname)|INDATASET(entryname)} {OUTFILE(ddname)|OUTDATASET(entryname)} [INTOEMPTY] [OBJECTS((entryname [MANAGEMENTCLASS(class)] [NEWNAME(newname)] [STORAGECLASS(class)] [VOLUMES(volser[ volser...])]) [(entryname...)...])] [CATALOG(catname)]
Parameter | Description |
---|---|
INFILE|INDATASET |
Specifies the source data set to IMPORT. User ddname to use a data set allocated by the runtime environment prior to an IDCAMS call. Use entryname to use a data set internally allocated in an IDCAMS call. The source data set specified with the INDATASET parameter is exclusively allocated (DISP=OLD). |
OUTFILE|OUTDATASET |
If you want to use a data set pre-allocated in the execution environment before calling IDCAMS, specify ddname. If you want to allocate IDCAMS internally, use entryname. The data set specified with the OUTDATASET parameter is exclusively allocated (DISP=OLD). |
INTOEMPTY |
If the target data set is not registered in the catalog or storage space is not allocated, the IMPORT command fails. This failure can be avoided by setting the INTOEMPTY parameter to allocate storage space at runtime. |
OBJECTS |
In the process of performing the IMPORT operation, it is available to change some of the information recorded in the IMPORT source data set as an incidental. At this time, specify the entryname to be changed and the new attribute to be applied. It can be specified repeatedly for multiple entrynames. |
CATALOG |
Specifies the target catalog when the data sets need to be cataloged during import. |
The following example imports the TESTCAT.BACKUP back-up data set to the TESTCAT catalog. The TESTCAT catalog is restored from the data stored in the TESTCAT.BACKUP data set.
//JOB13 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //IMPCAT EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //BACK DD DSN=TESTCAT.BACKUP,DISP=OLD //SYSIN DD * IMPORT INFILE(BACK) - OUTDATASET(TESTCAT) /* //
LISTCAT
The command displays the descriptive information about data sets defined in a catalog.
Descriptive information is organized in the following groups:
-
Attributes of the entry object
-
Creation, modification, and expiration dates
-
Protection settings
-
Data Set access statistics
-
Storage space information
-
Data Set structure information
The syntax of the LISTCAT command is as follows:
LISTCAT [ALIAS] [ALTERNATEINDEX] [CLUSTER] [DATA] [GENERATIONDATAGROUP] [INDEX] [NONVSAM] [PATH] [USERCATALOG] [ENTRIES(entryname[ entryname...])|LEVEL(level)] [NAME|HISTORY|VOLUME|ALLOCATION|ALL] [CATALOG(catname)]
Parameter | Description |
---|---|
ALIAS ALTERNATEINDEX, CLUSTER, DATA, GENERATIONDATAGROUP, INDEX, NONVSAM, PATH, USERCATALOG |
Displays only the specified types of catalog entries. For example, the LISTCAT CLUSTER command displays only CLUSTER entries. Multiple entry types can be specified as well. For example, the LISTCAT DATA INDEX command displays only DATA or INDEX entries. If no parameters are specified, all entry information of all types is printed without filtering on the catalog entry type. However, entries are not displayed when the entry name does not match the ENTRIES parameter. |
ENTRIES|LEVEL |
Specifies the catalog entry name(s) for the LISTCAT command.
The examples of ENTRIES and LEVEL are as follows:
(The * mark matches any of the characters in the segment.) |
NAME|HISTORY| VOLUME| ALLOCATION|ALL |
Specifies how much detail is displayed by the LISTCAT command. Specifying the NAME parameter displays only the basic entry information, and specifying the ALL parameter displays all of the entry information. |
CATALOG |
Specifies the catalog name for the LISTCAT command. The entrynames designated by ENTRIES or LEVEL parameters are searched within this catalog. |
The following example displays all of the entry information for VSAM.KSDS1.
//JOB14 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //LISTC EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * LISTCAT ENTRIES(VSAM.KSDS1) ALL /* //
The following is the SYSPRINT output from the LISTCAT example above.
CLUSTER ------------- VSAM.KSDS1 HISTORY CREATION -------------- (NULL) DATASET-OWNER ----------- (EMPTY) RELEASE ------------------- 1 VSAM QUIESCED --------------- (NO) PROTECTION-PSWD---------- (NULL) ASSOCIATIONS DATA ------------ VSAM.KSDS1.D INDEX ----------- VSAM.KSDS1.I DATA ---------------- VSAM.KSDS1.D HISTORY CREATION --------------- (NULL) DATASET-OWNER ---------- (EMPTY) RELEASE -------------------- 1 PROTECTION-PSWD ---------- (NULL) ASSOCIATION CLUSTER ----------- VSAM.KSDS1 ATTRIBUTES AVGLRECL ----------------- 350 MAXLRECL ------------------- 350 KEYLEN -------------------- 10 RKP -------------------------- 0 CISIZE ------------------ 4096 INDEXED NON-SPANNED STATISTICS REC-DELETED ---------------- 0 REC-INSERTED ------------- 10445 REC-RETRIEVED -------------- 0 REC-TOTAL ---------------- 10445 REC-UPDATED ---------------- 0 TIMESTAMP ---------------- (NULL) ALLOCATION HI-A-RBA ------------------- 0 HI-U-RBA --------------------- 0 VOLUMES VOLSER ----------------- (TSAM) INDEX --------------- VSAM.KSDS1.I HISTORY CREATION --------------- (NULL) DATASET-OWNER ---------- (EMPTY) RELEASE -------------------- 1 PROTECTION-PSWD ---------- (NULL) ASSOCIATION CLUSTER ----------- VSAM.KSDS1 ATTRIBUTES AVGLRECL ----------------- 350 MAXLRECL ------------------- 350 KEYLEN -------------------- 10 RKP -------------------------- 0 CISIZE ------------------ 4096 STATISTICS INDEX: ENTRIES/SECT ------------ 254 HI-LEVEL-RBA ----------- 12288 LEVELS -------------------- 2 SEQ-SET-RBA ------------- 4096 REC-DELETED ----------------- 0 REC-INSERTED ------------ 10445 REC-RETRIEVED --------------- 0 REC-TOTAL --------------- 10445 REC-UPDATED ----------------- 0 TIMESTAMP --------------- (NULL) ALLOCATION HI-A-RBA -------------------- 0 HI-U-RBA ------------------- 0 VOLUMES VOLSER ---------------------- (TSAM)
The command displays the content of VSAM and Non-VSAM data set records.
The syntax of the PRINT command is as follows:
PRINT {INFILE(ddname)|INDATASET(entryname)} [CHARACTER|DUMP|HEX] [FROMKEY(key)|FROMADDRESS(address)|FROMNUMBER(number)|SKIP(number)] [OUTFILE(ddname)] [TOKEY(key)|TOADDRESS(address)|TONUMBER(number)|COUNT(number)]
Parameter | Description |
---|---|
INFILE|INDATASET |
Specifies the data sets to PRINT.
|
CHARACTER| DUMP| HEX |
Specifies the output parameter of the PRINT command.
|
FROMKEY| FROMADDRESS| FROMNUMBER|SKIP |
Similar to the REPRO command, the user can set the range of records using this parameter. Refer to the REPRO command which immediately follows this command section for details on each parameter. |
OUTFILE |
Prints the output result to a DD other than SYSPRINT. It is necessary to designate a separate data set to store the contents of the data set output through the PRINT command, and to designate the ddname pre-allocated through JCL. If this parameter is omitted, the PRINT command defaults to SYSPRINT output. |
TOKEY|TOADDRESS |TONUMBER|COUNT |
Similar to the REPRO command, the user can set the range of outputs using this parameter. Refer to the REPRO command which immediately follows this command section for details of each parameter. |
The following example outputs the TEST.KSDS1 record in DUMP format. Only the first 10 records from the record where the key value is 0000000099 are output.
//JOB15 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //PRINT EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * PRINT INDATASET(TEST.KSDS1) DUMP - FROMKEY(0000000099) COUNT(10) /* //
Below is the SYSPRINT output of the JCL example above.
KEY OF RECORD = 30303030303030303939 0000: 3030 3030 3030 3030 3939 7265 636F 7264 *0000000099record* 0010: 3030 3030 3030 3030 3939 *0000000099 * KEY OF RECORD = 30303030303030313030 0000: 3030 3030 3030 3031 3030 7265 636F 7264 *0000000100record* 0010: 3030 3030 3030 3031 3030 *0000000100 * KEY OF RECORD = 30303030303030313031 0000: 3030 3030 3030 3031 3031 7265 636F 7264 *0000000101record* 0010: 3030 3030 3030 3031 3031 *0000000101 * KEY OF RECORD = 30303030303030313032 0000: 3030 3030 3030 3031 3032 7265 636F 7264 *0000000102record* 0010: 3030 3030 3030 3031 3032 *0000000102 * KEY OF RECORD = 30303030303030313033 0000: 3030 3030 3030 3031 3033 7265 636F 7264 *0000000103record* 0010: 3030 3030 3030 3031 3033 *0000000103 * KEY OF RECORD = 30303030303030313034 0000: 3030 3030 3030 3031 3034 7265 636F 7264 *0000000104record* 0010: 3030 3030 3030 3031 3034 *0000000104 * KEY OF RECORD = 30303030303030313035 0000: 3030 3030 3030 3031 3035 7265 636F 7264 *0000000105record* 0010: 3030 3030 3030 3031 3035 *0000000105 * KEY OF RECORD = 30303030303030313036 0000: 3030 3030 3030 3031 3036 7265 636F 7264 *0000000106record* 0010: 3030 3030 3030 3031 3036 *0000000106 * KEY OF RECORD = 30303030303030313037 0000: 3030 3030 3030 3031 3037 7265 636F 7264 *0000000107record* 0010: 3030 3030 3030 3031 3037 *0000000107 * KEY OF RECORD = 30303030303030313038 0000: 3030 3030 3030 3031 3038 7265 636F 7264 *0000000108record* 0010: 3030 3030 3030 3031 3038 *0000000108 * PRINT 10 record(s) IDCAMS: PRINT OK
REPRO
The command copies existing VSAM and Non-VSAM data sets defined by the DEFINE command to other data sets. VSAM data sets must be registered in a catalog prior to using this command. Non-VSAM data sets do not have to be registered in a catalog.
This command cannot copy an entire catalog because mainframe catalogs are usually saved in a single KSDS cluster.
It is common for applications to copy data sets without using the REPRO command. However, REPRO offers the safest mechanism for duplicating data regardless of the content of a record.
When both the source data set to be copied and the target data set are designated as user catalogs, the catalog records are copied.
The syntax of the REPRO command is as follows:
REPRO {INFILE(ddname)|INDATASET(entryname)} {OUTFILE(ddname)|OUTDATASET(entryname)} [ENTRIES(entryname [entryname...])|LEVEL(level)] [FROMKEY(key)|FROMADDRESS(address)|FROMNUMBER(number)|SKIP(number)] [MERGECAT|NOMERGECAT] [REPLACE|NOREPLACE] [REUSE|NOREUSE] [TOKEY(key)|TOADDRESS(address)|TONUMBER(number)|COUNT(number)]
Parameter | Description |
---|---|
INFILE|INDATASET |
Specifies the source data set.
|
OUTFILE|OUTDATASET |
Specifies the target data set after the source data set is copied.
|
ENTRIES|LEVEL |
Specifies the catalog entry name(s) for the REPRO command to copy. In this case, only the catalog entry names between two catalogs are copied. This does not mean the copying of actual data sets indicated by the catalog entries.
The examples of ENTRIES and LEVEL are as follows:
(The * mark matches any of the characters in the segment.) |
FROMKEY| FROMADDRESS| FROMNUMBER|SKIP |
Copies only some records of the data set without copying the entire data set and limits the copy target. It specifies the key, address, and record number of the start record. The offset from the beginning of the data set can be set using the SKIP parameter. In other words, the SKIP parameter specifies the start record. You can control the copy target by using FROMKEY, FROMADDRESS, and FROMNUMBER for KSDS, ESDS, and RRDS, respectively. For Non-VSAM datasets, only SKIP can be used, and if an item that does not correspond to each dataset attribute is used, an error occurs. |
MERGECAT| NOMERGECAT |
Copies a data set between two catalogs.
|
REPLACE|NOREPLACE |
Specifies whether or not to replace a record that already exists in the target data set.
|
REUSE|NOREUSE |
It is used when the target data set is a VSAM data set, not a catalog.
|
TOKEY|TOADDRESS TONUMBER|COUNT |
limits the records to be copied. It specifies the end record to be copied. Similar to FROMKEY, FROMADDRESS, FROMNUMBER, and SKIP, you can control the copy destination by using TOKEY, TOADDRESS, and TONUMBER for KSDS, ESDS, and RRDS, respectively. Non-VSAM datasets can only use COUNT, and if an item that does not correspond to each dataset property is used, an error occurs. |
The following example copies 10,000 records starting from the record number 50,001 in the VSAM.KSDS1 data set to the VSAM.KSDS2 data set.
//JOB16 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //REPRO EXEC PGM=IDCAMS //INDD DD DSN=VSAM.KSDS1,DISP=(OLD,KEEP) //OUTDD DD DSN=VSAM.KSDS2,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(INDD) - OUTFILE(OUTDD) - SKIP(50000) COUNT(10000) /* //
VERIFY
If a VSAM data set experiences an abnormal exit, incorrect data may be written to its catalog.
This command verifies the consistency between a VSAM data set and the data set’s catalog. If inconsistency is detected, the catalog is fixed by updating it with the latest data set information. If an abnormal exit occurs, the STATISTICS/REC-TOTAL may be inconsistent with the total number of records in a VSAM data set. The VERIFY command also resolves this inconsistency.
The VERIFY command only works on VSAM data sets. |
The syntax of the VERIFY command is as follows:
VERIFY FILE(ddname)|DATASET(entryname)
Parameter | Description |
---|---|
FILE|DATASET |
Specifies the target data set that is to be verified.
|
The following example uses the VERIFY command to verify the TEST.CLUS1 data set with its catalog record.
//JOB17 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //VSTEP EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //TESTDD DD DSN=TEST.CLUS1,DISP=OLD //SYSIN DD * VERIFY FILE(TESTDD) /* //
4.3. Modal Commands
Modal commands are used to support multiple IDCAMS commands that are carried out in a single execution. They are different from the IDCAMS commands that operate on a catalog’s entries and data sets.
PARM, one of the IDCAMS commands, is currently not supported. |
IF-THEN-ELSE
The IF-THEN-ELSE command branches to different commands based on the last result of the condition statement (LASTCC or MAXCC). The condition statement is an evaluative statement placed between IF and THEN statements, composed of a Condition Code and a comparison of variables. For example, the condition statement "LASTCC > 8" is true for the case when the Condition Code, LASTCC, is greater than 8.
The syntax of the IF-THEN-ELSE command is as follows:
IF {Condition Code} {operator} {number} THEN[ command| DO command set END] [ELSE[ command| DO command set END]]
-
Condition Code
The following values can be used as Condition Codes.
Value Description LASTCC
The result of the command that was last executed is stored in LASTCC. LASTCC displays a result of 0 for successful last commands, 4 for informative warnings, and higher numbers for serious warnings and errors.
MAXCC
The largest result of all executed commands is stored in MAXCC. In general, the severity of an error is linear to the Condition Code.
Operator
The operator compares values in a Condition Code.
For more information about the operators, refer to the Comparison Operators table of ADRDSSU.
When the condition of the IF statement is true, IDCAMS commands in the THEN statement are executed. When the condition of the IF statement is false, commands in the ELSE statement are executed. The ELSE statement is not necessary if there are no commands to execute when the IF statement condition is false.
The IF-THEN-ELSE statement is seen as an IDCAMS command that executes branches to other IDCAMS commands. Thus, the IF-THEN-ELSE statement often requires hyphens (-) to write multiple lines.
The following example sets MAXCC to 0 when LASTCC is 8. LASTCC is explicitly set to 8 in order to make the condition statement true. Therefore, once the condition statement in the IF statement is found to be true, SET MAXCC=0 in the THEN statement is executed. The value of the MAXCC variable is displayed upon exit of the IDCAMS command.
SET LASTCC=8 IF LASTCC=8 THEN SET MAXCC=0
In the following example, if LASTCC is greater than 4, entry information is retrieved from TEST.SDS1. Otherwise, entry information is retrieved from TEST.SDS2. In a real world application, SET LASTCC is replaced with another IDCAMS command and the result from this command sets LASTCC. Since LASTCC is set to 0 in this example, LISTCAT is performed on TEST.SDS2.
SET LASTCC=0 IF LASTCC > 4 - THEN - LISTCAT ENT(TEST.SDS1) ELSE - LISTCAT ENT(TEST.SDS2)
Null
Null is a command that has no function and exists only for syntactical purposes.
-
Null is used in IF-THEN-ELSE statements in order to have an empty command in the THEN or ELSE statements.
-
Null is treated as an empty line, when it is outside of IF-THEN-ELSE statements.
A common mistake with IF-THEN-ELSE statements is the use of hyphens. Hyphens are only used after an IF statement and are not used after THEN or ELSE statements. If a hyphen is used after an ELSE statement, IDCAMS will process the next line as part of the ELSE statement as well, which may not be the intended control flow. |
The following example takes no action if LASTCC is greater than 4. If LASTCC is less than 4, entry information is retrieved from TEST.SDS2.
SET LASTCC=0 IF LASTCC > 4 - THEN ELSE LISTCAT ENT(TEST.SDS2)
SET
The command explicitly specifies the value of MAXCC or LASTCC. A common procedure is to ignore lower number Condition Codes and continue executing the next JCL steps once IDCAMS terminates.
The following example sets MAXCC to 0 if LASTCC is 8.
If TEST.SDS1 is missing in the DEL step, the return code 8 is returned and the DEF step is not executed. This termination is dependent on the TJES setting and the COND statement specified for a particular JOB. To avoid the termination of a JCL JOB, MAXCC can be explicitly set to 0 to continue on to the DEF step.
//JOB18 JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //DEL EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE TEST.SDS1 IF LASTCC=8 THEN SET MAXCC=0 /* //DEF EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE NONVSAM (NAME(TEST.SDS1) VOLUMES(100000)) /* //
CANCEL
The command ends processing of the current job step. When you use the CANCEL command, the remainder of the command stream is not processed
The following example stops the execution of IDCAMS using the CANCEL command when LASTCC is 4.
LISTCAT ENTRIES(MUST.EXIST.SDS) IF LASTCC=4 THEN CANCEL ...
If the catalog entry specified in LISCAT does not exist, Condition Code 4 is returned. Since Condition Code 4 is only a message level code, IDCAMS continues execution. In the example above, if MUST.EXIST.SDS does not exist, the IF condition is found to be true and then the CANCEL command terminates execution of IDCAMS.
4.4. Non-functional Commands
The command does not perform an actual function for the operation of IDCAMS, but is processed so that an error does not occur.
BLDINDEX
The command builds an alternate index for an existing data set.
The command internally functions to load records composed of one secondary key and multiple primary keys into the alternate index cluster.
In OpenFrame, the alternate index configuration of the data set is implemented through the index function of Tibero, so this command does not actually perform any action.
The parameters that can be specified in the BLDINDEX command syntax are as follows.
BLDINDEX {INFILE(ddname)|INDATASET(entryname)} {OUTFILE(ddname)|OUTDATASET(entryname)} [CATALOG(catname)]
Parameter | Description |
---|---|
INFILE| INDATASET |
Specifies the entryname of the base cluster or the path that points to the base cluster.
|
OUTFILE| OUTDATASET |
Specifies the entryname of the alternate index or the path that points to the alternate index. Before BLDINDEX, the alternate index must be defined in advance.
|
CATALOG |
Explicitly specifies the catalog to use when searching for the catalog entry specified by entryname. If not specified, it is determined according to the catalog search order. |
The following is an example of configuring VSAM.AIX1, the alternate index of VSAM.KSDS1.
//JOB03 JOB OBM,CLASS=B,MSGCLASS=X,MSGLEVEL=(1,1) //BLDAIX EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //BASE DD DSN=VSAM.KSDS1,DISP=OLD //AIX DD DSN=VSAM.AIX1,DISP=OLD //SYSIN DD * BLDINDEX INFILE(BASE) - OUTFILE(AIX) /* //
4.5. Environment Configuration
IDCAMS is set in the idcams subject in the OpenFrame configuration. By changing the contents of this configuration file, some operations of KQCAMS can be customized for the user.
For more about idcams subject, refer to OpenFrame Configuration Guide. |
[Note]
The following is a table of parameters that do not actually function among the commands of IDCAMS but prevent errors.
Command | Parameter |
---|---|
ALTER |
[ACCOUNT(account–info)] |
[ADDVOLUMES(volser[ volser…])] |
|
[BUFFERSPACE(size)] |
|
[BUFND(number)] |
|
[BUFNI(number)] |
|
[BWO(TYPECICS|TYPEIMS|NO)] |
|
[CCSID(value)] |
|
[CODE(code)] |
|
[ECSHARING|NOECSHARING] |
|
[ERASE|NOERASE] |
|
[EXCEPTIONEXIT(entrypoint)] |
|
[FILEDATA(TEXT|BINARY)] |
|
[FREESPACE(CI-percent[ CA-percent])] |
|
[FRLOG(NONE[ REDO])] |
|
[INHIBIT|UNINHIBIT] |
|
[KEYS(length offset)] |
|
[LOCK|UNLOCK] |
|
[LOG(NONE|UNDO|ALL)] |
|
[LOGSTREAMID(logstream)] |
|
[MANAGEMENTCLASS(class)] |
|
[NULLIFY([AUTHORIZATION(MODULE|STRING)] [BWO] [CODE] [EXCEPTIONEXIT] [LOG] [LOGSTREAMID] |
|
[RECORDSIZE(average maximum)] |
|
[REMOVEVOLUMES(volser[ volser…])] |
|
[REUSE|NOREUSE] |
|
[ROLLIN] |
|
[SHAREOPTIONS(crossregion[ crosssystem])] |
|
[STORAGECLASS(class)] |
|
[STRNO(number)] |
|
[TYPE(LINEAR)] |
|
[UNIQUEKEY|NONUNIQUEKEY] |
|
[UPDATE|NOUPDATE] |
|
[UPGRADE|NOUPGRADE] |
|
[WRITECHECK|NOWRITECHECK] |
|
BLDINDEX |
[{EXTERNALSORT|INTERNALSORT}] |
[{SORTCALL|NOSORTCALL}] |
|
[SORTDEVICETYPE(device type)] |
|
[SORTFILENUMBER(number)] |
|
[SORTMESSAGEDD(ddname)] |
|
[SORTMESSAGELEVEL({ALL|CRITICAL|NONE})] |
|
[WORKFILES(ddname[ ddname…]) |
|
DEFINE command |
[ACCOUNT(account–info)] |
[BUFFERSPACE(size)] |
|
[BWO(TYPECICS|TYPEIMS|NO)] |
|
[ERASE|NOERASE] |
|
[EXCEPTIONEXIT(entrypoint)] |
|
[FILE(ddname)] |
|
[FREESPACE(CI-percent[ CA-percent])] |
|
[FRLOG(NONE[| REDO])] |
|
[LOG(NONE|UNDO|ALL)] |
|
[LOGSTREAMID(logstream)] |
|
[MODEL(entryname[ catname])] |
|
[REUSE|NOREUSE] |
|
[SHAREOPTIONS(crossregion[ crosssystem])] |
|
[SPEED|RECOVERY] |
|
[WRITECHECK|NOWRITECHECK]) |
|
[CYLINDERS(primary[secodnary])] |
|
[KILOBYTES(primary[secodnary])] |
|
[MEGABYTES(primary[secodnary])] |
|
[RECORDS(primary[secodnary])] |
|
[TRACKS(primary[secodnary])] |
|
[CONTROLINTERVALSIZE(size)] |
|
DELETE |
[LIBRARYENTRY|NVR|PAGESPACE|VOLUMEENTRY|VVR] |
[ERASE|NOERASE] |
|
[FORCE|NOFORCE] |
|
[PURGE|NOPURGE] |
|
[RECOVERY|NORECOVERY] |
|
[SCRATCH|NOSCRATCH] |
|
EXPORT |
[CIMODE|RECORDMODE] |
[ERASE|NOERASE] |
|
[INHIBITSOURCE|NOINHIBITSOURCE] |
|
[INHIBITTARGET|NOINHIBITTARGET] |
|
[PURGE|NOPURGE] |
|
[TEMPORARY|PERMANENT] |
|
IMPORT |
[ALIAS|NOALIAS] |
[ERASE|NOERASE] |
|
[LOCK|UNLOCK] |
|
[OBJECTS ([FILE(ddname)])] |
|
[PURGE|NOPURGE] |
|
[SAVRAC|NOSAVRAC] |
|
LISTCAT |
[LIBRARYENTRIES(libent)] |
[PAGESPACE] |
|
[VOLUMEENTRIES(volent)] |
|
[EXPIRATION(days)] |
|
[FILE(ddname)] |
|
[LIBRARY(libname)] |
|
[OUTFILE(ddname)] |
|
[DBCS] |
|
[INSERTSHIFT((offset1 offset2)[(offset1 offset2 )…])|INSERTALL] |
|
[SKIPDBCSCHECK((offset1 offset2) [(offset1 offset2)…])|NODBCSCHECK] |
|
REPRO |
[DBCS] |
[ERRORLIMIT(value)] |
|
[FILE(ddname)] |
|
[INSERTSHIFT((offset1 offset2)[(offset1 offset2 )…])| INSERTALL] |
|
[SKIPDBCSCHECK((offset1 offset2)[(offset1 offset2 )…])| NODBCSCHECK] |
|
[VOLUMEENTRIES(entryname)] |
|
[ENCIPHER({EXTERNALKEYNAME(keyname)| INTERNALKEYNAME(keyname)|PRIVATEKEY} [CIPHERUNIT(number|1)] [DATAKEYFILE(ddname)|DATAKEYVALUE(value)] [SHIPKEYNAMES(keyname[ keyname…])] [STOREDATAKEY|NOSTOREDATAKEY] [STOREKEYNAME(keyname)] [USERDATA(value)])] |
|
[DECIPHER ({DATAKEYFILE(ddname)| DATAKEYVALUE(value)|SYSTEMKEY} [SYSTEMDATAKEY(value)] [SYSTEMKEYNAME(keyname)])] |
Below is a table of DEFINE subcommands.
Subcommand | Parameter |
---|---|
ALIAS |
(SYMBOLICRELATE(entryname)) |
ALTERNATEINDEX |
(BUFFERSPACE(size)] |
[ERASE|NOERASE] |
|
[EXCEPTIONEXIT(entrypoint)] |
|
[FREESPACE(CI-percent[ CA-percent]| 0 0)] |
|
[MODEL(entryname[ catname])] |
|
[REUSE|NOREUSE] |
|
[SHAREOPTIONS(crossregion[ crosssystem]| 1 3)] |
|
[SPEED|RECOVERY] |
|
[WRITECHECK|NOWRITECHECK]) |
|
[DATA ([ATTEMPTS(number)] [AUTHORIZATION(entrypoint[ string])] [BUFFERSPACE(size)] [CODE(code)] [ERASE|NOERASE] [EXCEPTIONEXIT(entrypoint)] [FREESPACE(CI-percent[ CA-percent])] [MODEL(entryname [ catname ])] [REUSE|NOREUSE] [SHAREOPTIONS(crossregion[ crosssystem])] [SPEED|RECOVERY] [WRITECHECK|NOWRITECHECK])] |
|
[INDEX ([ATTEMPTS(number)] [AUTHORIZATION(entrypoint[ string])] [CODE(code)] [EXCEPTIONEXIT(entrypoint)] [MODEL(entryname[ catname ])] [REUSE|NOREUSE] [SHAREOPTIONS(crossregion[ crosssystem])] [WRITECHECK|NOWRITECHECK])] |
|
CLUSTER |
([ACCOUNT(account–info)] |
[BUFFERSPACE(size)] |
|
[BWO(TYPECICS|TYPEIMS|NO)] |
|
[ERASE|NOERASE] |
|
[EXCEPTIONEXIT(entrypoint)] |
|
[FREESPACE(CI-percent[ CA-percent]|0 0)] |
|
[FRLOG(NONE[| REDO])] |
|
[LOG(NONE|UNDO|ALL)] |
|
[LOGSTREAMID(logstream)] |
|
[MODEL(entryname[ catname])] |
|
[REUSE|NOREUSE] |
|
[SHAREOPTIONS(crossregion[ crosssystem]|1 3)] |
|
[SPEED|RECOVERY] |
|
[WRITECHECK|NOWRITECHECK]) |
|
[DATA ([BUFFERSPACE(size)] [ERASE|NOERASE] [EXCEPTIONEXIT(entrypoint)] [FREESPACE(CI-percent[ CA-percent])] [MODEL(entryname [ catname ])] [REUSE|NOREUSE] [SHAREOPTIONS(crossregion[ crosssystem])] [SPEED|RECOVERY] [WRITECHECK|NOWRITECHECK])] |
|
[INDEX ([EXCEPTIONEXIT(entrypoint)] [MODEL(entryname[catname ])] [REUSE|NOREUSE] [SHAREOPTIONS(crossregion[ crosssystem])] [WRITECHECK|NOWRITECHECK])] |
|
GENERATIONDATAGROUP |
([SCRATCH|NOSCRATCH]) |
NONVSAM |
([COLLECTION] |
[FILESEQUENCENUMBERS(number[ number…])]) |
|
PATH |
([MODEL(entryname[ catname])]) |
USERCATALOG |
([BUFFERSPACE(size|3072)] |
[BUFND(number)] |
|
[BUFNI(number)] |
|
[ECSHARING|NOECSHARING] |
|
[FREESPACE(CI-percent[ CA-percent]|0 0)] |
|
[ICFCATALOG|VOLCATALOG] |
|
[LOCK|UNLOCK] |
|
[MODEL(entryname[ catname])] |
|
[SHAREOPTIONS(crossregion[crosssystem]| 3 4)] |
|
[STRNO(number|2)] |
|
[WRITECHECK|NOWRITECHECK]) |
|
[DATA ([BUFFERSPACE(size)] [BUFND(number)] [FREESPACE(CI-percent[ CA-percent])] [WRITECHECK|NOWRITECHECK])] |
|
[INDEX ( [BUFNI(number)] [WRITECHECK|NOWRITECHECK])] |
4.6. Condition Codes
A condition code is a kind of error code that indicates whether the result of executing each command by IDCAMS has succeeded or failed. Possible values for Condition Codes are 0, 4, 8, 12, and 16, where a larger number indicates a more severe error.
The following is the description of each Condition Code.
Condition Code | Description |
---|---|
0 |
Successful execution of a command. An informative message may be associated with it. |
4 |
Minor error with the execution. However, the error can be ignored and it should not affect further execution of other commands. A warning message is displayed with this error. For example, in a LISTCAT command, if the specified catalog entry cannot be found, the following message is displayed: IDCAMS: No specified catalog entry found: NOT.EXIST.SDS |
8 |
Some commands could not be executed. However, the execution result meets expectations and it should not affect further execution of other commands. For example, if the DELETE command is performed on a data set that does not exist, the DELETE command cannot be carried out. However, results meet the expectations since the data set does not exist. This does not stop further commands from being executed and the following message is displayed. IDCAMS(WARNING): No such catalog entry - 'NOT.EXIST.SDS' |
12 |
There is a severe error that stops execution of further commands. Such error is caused by an inaccessible parameter, a missing mandatory parameter, and/or inconsistent data structures (incorrect key length, record size, etc.). When such severe errors occur, the following error message is displayed. IDCAMS(ERROR): {error description or logical error code} |
16 |
There is a critical error in execution that stops process the remainder of the commands. This error may be caused by the following situations:
IDCAMS(ERROR): {error description or logical error code} or IDCAMS(FATAL): {error description} |
Condition Code Variables (LASTCC and MAXCC)
IDCAMS stores Condition Codes in LASTCC and MAXCC variables.
The result from the latest command is stored in LASSCC and the largest Condition Code returned from previous commands is stored in MAXCC. Note that LASTCC and MAXCC can be set explicitly by the user.
The following example deletes the NOT.EXIST.SDS data set. If LASTCC is 8, MAXCC is explicitly set to 0.
DELETE NOT.EXIST.SDS IF LASTCC = 8 THEN SET MAXCC=0 DEFINE ...
5. IEBCOMPR
The utility is used to compare two SDSs or PDSs with comparable conditions and displays the results.
The utility enables to perform the following functions.
-
Compares two SDSs.
-
Compares two PDSs.
-
Compares by selecting only specific members of PDS.
-
If the result of comparison does not match, displays the result.
5.1. DD Statements
The following describes each DD statement.
Statement | Description |
---|---|
SYSPRINT DD |
Describes the data set where IEBCOMPR messages will be stored. |
SYSUT1 DD |
Describes sequential data sets or PDS type input data sets for comparison. |
SYSUT2 DD |
Describes sequential data sets or PDS type input data sets for comparison. |
SYSIN DD |
Describes the IEBCOMPR commands. |
5.2. Command Usage
The following describes each IEBCOMPR commands.
COMPARE
A control statement that suspends the data set organization or comparison, or sets records or fields for comparison.
The syntax of the COMPARE command is as follows:
[label] COMPARE [FIELD=(length[,starting-location]) | MASK=(length, starting-location)] [,LIMIT=n] [,MAXNAME=n] [,STRTAFT=n] [,STOPAFT=n] [,TYPORG={PS|PO}] [,DFOFFSET] [,DFOFFSET_ALL] [,MAXIGNORE] [,NOLIMIT]
Parameter | Description |
---|---|
FIELD |
Sets when comparing fields within records. If this option is omitted, the whole record will be compared. If multiple fields are set, the multiple fields will be compared. This cannot be used with the MASK option.
|
MASK |
Sets when comparing records after excluding fields in the records. This cannot be used with the FIELD option.
|
LIMIT |
Ends the comparison if the number of unmatched records reaches this number when comparing records. If multiple members are set, skips to the next member for comparison. When comparing SDS or only 1 member, comparison is ended. Sets a decimal number between 1~ 32760 for n. If this option is omitted or set to 0, it is set to 10. |
MAXNAME |
Sets a number that is greater than the number of members that is specified by the MEMBER control statement. Sets a decimal number between 1~ 32760 for n. This option will be ignored when the MEMBER control statement does not exist. |
STRTAFT |
Sets the number of logical records that will be skipped before comparing sequential data set. Compares from the n+1th logical records of the data set. The record number should not exceed 32760. If exceeded, an error message will be displayed. If omitted, comparison will be performed from the first record. |
STOPAFT |
Sets the number of logical records of the sequential data set to be compared. Sets the number of records to compare each member of a sequential data set or a partitioned data set. The number of records should not exceed 32760. If exceeded, an error message will be displayed. If omitted, comparison will be performed up to the last record. |
TYPORG |
Describes whether the input data set is a sequential data set (PS) or a partitioned data set (PO). (Default value: PS) |
DFOFFSET |
Displays the first instance of unmatched records. Using DFOFFSET and DFOFFSET_ALL together causes DFOFFSET to be overridden. |
DFOFFSET_ALL |
Displays all instances of unmatched records. |
MAXIGNORE |
Ignores the limits set for LIMIT, STRTAFT, and STOPAFT values. (Maximum value if not set: 32760) |
NOLIMIT |
If set, LIMIT is ignored and comparison is performed to the end of the records. |
MEMBER
A control statement that specifies names of the members that will be compared when the input data set is PDS.
-
This can be omitted when to comparing to all the members.
-
When comparing all members, only members with the same names will be compared.
A number that is greater than the number of members set by this control statement must be set to the MAXNAME parameter value of the COMPARE control statement.
[label] MEMBER NAME={member-name | (sysut1-member-name,sysut2-member-name)}[,...]
Parameter | Description |
---|---|
NAME |
Sets the member name to be compared.
|
LABELS
Describes when processing user labels. Only parsing is supported.
EXITS
Describes when an exit routine is used. Only parsing is supported.
5.3. Examples
The following is an example of comparing data by setting fields. It compares IEBCOMPR.TEST.INPUT01 and IEBCOMPR.TEST.INPUT02 from the first field to 11th field, and from the 15th field to as many as the length 5.
If not matched, the result will be displayed.
//TEST JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JOBSTEP EXEC PGM=IEBCOMPR //SYSUT1 DD DSNAME=IEBCOMPR.TEST.INPUT01,DISP=(SHR) //SYSUT2 DD DSNAME=IEBCOMPR.TEST.INPUT02,DISP=(SHR) //SYSPRINT DD SYSOUT=A //SYSIN DD * COMPARE FIELD=11,FIELD(5,15),TYPORG=PS /*
The following example compares data after excluding specified fields. Fields from the 15th field with a length up to 7 in IEBCOMPR.TEST.INPUT01 and IEBCOMPR.TEST.INPUT02 are excluded.
//TEST JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JOBSTEP EXEC PGM=IEBCOMPR //SYSUT1 DD DSNAME=IEBCOMPR.TEST.INPUT01,DISP=(SHR) //SYSUT2 DD DSNAME=IEBCOMPR.TEST.INPUT02,DISP=(SHR) //SYSPRINT DD SYSOUT=A //SYSIN DD * COMPARE MASK=(7,15),TYPORG=PS /*
The following example shows how to compare data by specifying records. It compares 7 records from the 3rd record of IEBCOMPR.TEST.INPUT01 and IEBCOMPR.TEST.INPUT02 by skipping the first and second records.
If the number of unmatched and consecutive recodes reaches 3, comparison will be stopped.
If unmatched, the result will be displayed.
//TEST JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JOBSTEP EXEC PGM=IEBCOMPR //SYSUT1 DD DSNAME=IEBCOMPR.TEST.INPUT01,DISP=(SHR) //SYSUT2 DD DSNAME=IEBCOMPR.TEST.INPUT02,DISP=(SHR) //SYSPRINT DD SYSOUT=A //SYSIN DD * COMPARE LIMIT=3,STRTAFT=2,STOPAFT=7,TYPORG=PS /*
The following example shows how to compare data by specifying members that have the same names. It compares member A, B, and C of IEBCOMPR.TEST.INPUT01and IEBCOMPR.TEST.INPUT02.
If unmatched, the result will be displayed as follows.
//TEST JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JOBSTEP EXEC PGM=IEBCOMPR //SYSUT1 DD DSNAME=IEBCOMPR.TEST.INPUT01,DISP=(SHR) //SYSUT2 DD DSNAME=IEBCOMPR.TEST.INPUT02,DISP=(SHR) //SYSPRINT DD SYSOUT=A //SYSIN DD * COMPARE MAXNAME=3,TYPORG=PO MEMBER NAME=A,B,C /*
The following example shows how to compare data by specifying members that have different member names. Member A, B, D of IEBCOMPR.TEST.INPUT01 and member A, C, D of IEBCOMPR.TEST.INPUT02 are compared.
If unmatched, the result will be displayed.
//TEST JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JOBSTEP EXEC PGM=IEBCOMPR //SYSUT1 DD DSNAME=IEBCOMPR.TEST.INPUT01,DISP=(SHR) //SYSUT2 DD DSNAME=IEBCOMPR.TEST.INPUT02,DISP=(SHR) //SYSPRINT DD SYSOUT=A //SYSIN DD * COMPARE MAXNAME=4,TYPORG=PO MEMBER NAME=A,(B,C),D /*
5.4. Return Codes
The results of the IEBCOMPR Batch application utility program are as follows:
-
Upon success:
It returns the code received from the Batch application.
-
In the case of an error:
It displays the error message to SYSPRINT DD and returns the code corresponding to the error.
Error codes that might occur to the IEBCOMPR are as follows:
Code Description 8
If unmatched record is 1 or more, the return code is 8.
This applies when the number of unmatched records is greater than the value specified at the LIMIT parameter.
-
In case of PDS, the following member will be handled. The return code is 8.
12
This applies when the number of unmatched records is greater than the value specified at the LIMIT parameter.
-
This applies to SDS.
The following cases are unrecoverable type errors,
-
Data Set related (pgmdd, open/close, read/write) error
-
SYSIN DD command syntax error
-
Other IEBCOMPR utility program error
16
The following is a system error.
-
OpenFrame system library initialization has failed
-
6. IEBCOPY
The utility is used to copy or merge entire or partial members of one or more PDSs.
The utility enables to perform the following tasks:
-
Copy or merge PDS
-
Inclusively copy and rename PDS members
-
Exclusively copy PDS members
-
Replace PDS members
6.1. DD Statements
The following describes each DD statement.
Statement | Description |
---|---|
SYSPRINT DD |
Defines a data set where IEBCOPY messages are saved. |
SYSUT1 DD or user_defined_name1 DD |
Defines the PDS data set. |
SYSUT2 DD or user_defined_name2 DD |
Defines the PDS output data set. |
SYSIN DD |
Defines commands of IEBCOPY. |
6.2. Command Usage
The IEBCOPY command can be configured in two ways. The command can be specified either in the PARM parameter of the JCL EXEC statement or in the JCL SYSIN statement.
Abbreviations for each command are as follows:
Command | Abbreviation |
---|---|
COPY |
C |
EXCLUDE |
E |
SELECT |
S |
OUTDD |
O |
INDD |
I |
LIST |
L |
MEMBER |
M |
EXEC PARM
The syntax of the PARM parameter in the EXEC statement is as follows:
//[stepname] EXEC PGM=IEBCOPY[,PARM=<parms>]
Parameter | Description |
---|---|
PARM |
Select one of:
|
COPY
The command copies a PDS member.
The syntax of the SYSIN DD COPY command is as follows:
[label] COPY OUTDD=ddname, INDD=[(]{ddname|(ddname,R)}[,...][)] [,LIST={YES|NO}]
Parameter | Description |
---|---|
OUTDD |
This parameter sets the ddname where the data set is output. |
INDD |
This parameter sets the ddname of the input data set. If a data set member already exists in the output data set, copying of that data set member is skipped unless the R (REPLACE) parameter is set. |
LIST |
This parameter writes the names of copied data members to SYSPRINT. The default is YES. If LIST is not specified, the EXEC PARM parameter setting is applied. |
INDD
It is a sub command of COPY, used after a COPY statement. It performs the COPY task in the order specified in the COPY statement.
INDD cannot perform EXCLUDE nor SELECT filtering on individual members of a data set. However, the EXCLUDE and SELECT filters can be applied on the input data sets themselves.
EXCLUDE
The EXCLUDE statement is specified after the COPY statement and excludes specified members from being copied. This command cannot be used together with the SELECT command. If the EXCLUDE and SELECT commands are not specified, all data sets are copied.
The syntax of the EXCLUDE statement is as follows:
[label] EXCLUDE MEMBER=[(]name1[,name2][,...][)]
Parameter | Description |
---|---|
MEMBER |
This parameter sets the names of members to be skipped when performing the COPY command. |
SELECT
The SELECT statement is specified after the COPY statement and selects members to copy from the input data set.
The syntax of the SELECT statement is as follows:
[label] SELECT MEMBER=({name1|(name1,newname1[,R])|(name1,,R)} [,{name2|(name2,newname2[,R])|(name2,,R)}][,...])
Parameter | Description |
---|---|
MEMBER |
This parameter sets the list of member names to copy from the source data set. Members of input data sets specified in the name fields are copied with the new names specified in the newname fields. If the newname fields are not specified, the names specified in the name fields are used. When the R (REPLACE) parameter is set and the new name already exists in the output data set, the output data set is overwritten with the input data set. Otherwise, members with duplicate names are skipped. |
6.3. Examples
The following example copies the entire PDS DATASET1 to PDS DATASET2.
//COPYALL JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JOBSTEP EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=A //SYSUT1 DD DSNAME=DATASET1,DISP=(SHR,KEEP) //SYSUT2 DD DSNAME=DATASET2,UNIT=disk,VOL=SER=200000, // DISP=(NEW,CATLG) //SYSIN DD DUMMY
As shown in the figure below, all members of DATASET1 (A, B, and F) are copied to PDS DATASET2.
The following example merges 4 different data sets. DATASET1, DATASET3, and DATASET4 are copied and merged to DATASET5. Following the INDD order defined in the SYSIN DD command, DATASET1 is copied first, followed by DATASET4 and finally, DATASET3.
//MERGE JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JOBSTEP EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=A //IN01 DD DSNAME=DATASET1,DISP=(SHR,KEEP) //IN02 DD DSNAME=DATASET3,DISP=(SHR,KEEP) //OUT01 DD DSNAME=DATASET5,DISP=(SHR,KEEP) //IN03 DD DSNAME=DATASET4,DISP=(SHR,KEEP) //SYSIN DD * COPYOPER COPY OUTDD=OUT01,INDD=IN01,INDD=IN03,INDD=IN02 /*
Prior to executing IEBCOPY, DATASET5 already has a member named A. When DATASET1 is copied, member A already exists in DATASET5. Since the REPLACE parameter is not set, A is skipped and B and F are copied. Next, DATASET4 is copied. Again, member B already exists in the OUTPUT, thus only member D and X are copied. Lastly, DATASET3 is copied. Since member F and X exist in the OUTPUT, only member C and Y are copied.
The figure below is a visual representation of the example above, and describes the entire process of copying and the final result.
The following example copies input data sets with an inclusive or exclusive filter.
//SELECT JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JOBSTEP EXEC PGM=IEBCOPY //IN01 DD DSNAME=DATASET4,DISP=(SHR,KEEP) //IN02 DD DSNAME=DATASET3,DISP=(SHR,KEEP) //OUT01 DD DSNAME=DATASET6,DISP=(OLD,KEEP) //SYSPRINT DD SYSOUT=* //SYSIN DD * COPYOPER COPY OUTDD=OUT01 INDD=IN01 EXCLUDE MEMBER=X INDD=IN02 SELECT MEMBER=((F,Z),(C,A,R),(Y,,R)) /*
Prior to the IEBCOPY call, DATASET6 has member A, K, and Y. First, DATASET4 is copied because it is specified in the first INDD (INDD=IN01). Due to the EXCLUDE statement, member X is skipped and only member B and D are copied. Second, DATASET3 is copied, based on the INDD=IN02 statement. Due to the SELECT statement, member F is copied to member Z and member C is copied to member A. Although member A already exists in DATASET6, it is overwritten since member A is marked with R (REPLACE). If the REPLACE parameter is not set, copying member A is skipped. Lastly, member Y in DATASET3 overrides member Y in DATASET6.
The figure below is a visual representation of the example above, and describes the entire process of copying and the final result.
The example below uses INDD statements to apply different filters on each INPUT.
//INDD01 JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JOBSTEP EXEC PGM=IEBCOPY //IN01 DD DSNAME=DATASET11,DISP=(SHR,KEEP) //IN02 DD DSNAME=DATASET12,DISP=(SHR,KEEP) //IN03 DD DSNAME=DATASET13,DISP=(SHR,KEEP) //OUT01 DD DSNAME=DATASET14,DISP=(OLD,KEEP) //SYSPRINT DD SYSOUT=* //SYSIN DD * COPYOPER COPY OUTDD=OUT01 INDD=IN01 EXCLUDE MEMBER=B INDD=IN02 SELECT MEMBER=((B,,R),(Y,N)) INDD=IN03 /*
In the below figure, the procedure is as follows: Copy all members of DATASET11 (IN01 DD) except member B. Then replace member B from DATASET12 (IN02 DD) and rename member Y to member N. Lastly, copy all non-duplicate members of DATASET13 (IN03 DD).
The following example uses INDD as a sub-command to the COPY command.
//INDD01 JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //JOBSTEP EXEC PGM=IEBCOPY //IN01 DD DSNAME=DATASET11,DISP=(SHR,KEEP) //IN02 DD DSNAME=DATASET12,DISP=(SHR,KEEP) //IN03 DD DSNAME=DATASET13,DISP=(SHR,KEEP) //OUT01 DD DSNAME=DATASET14,DISP=(OLD,KEEP) //SYSPRINT DD SYSOUT=* //SYSIN DD * COPYOPER COPY OUTDD=OUT01,INDD=(INO1,(IN02,R),IN03) /*
In the figure below, the procedure is as follows: Copy all members from DATSET11 (IN01 DD). However, skip any members with duplicate names in the output data set. Then copy all members of DATASET12 (IN02 DD). Member B' is replaced. Lastly, all members of DATASET13 (IN03 DD) are copied with the exception of the duplicate members.
6.4. Return Codes
The IEBCOPY utility shows the following batch execution results:
-
Upon success:
It returns the return code from the batch program.
-
In the case of an error:
It displays the error message to SYSPRINT DD and returns the code corresponding to the error.
Error codes that might occur to the IEBCOPY are as follows:
Code Description 12
Unrecoverable error. The cases include:
-
Data Set related (pgmdd, open/close, and read/write) error
-
SYSIN DD command syntax error
-
Other IEBCOPY program errors
16
System fault. The case is:
-
OpenFrame system library initialization failure
-
7. IEBDG
The utility is used to create a test data set by specifying a data pattern in SYSIN DD.
7.1. DD Statements
The following describes each DD statement.
Statement | Description |
---|---|
SYSPRINT DD |
Defines the data set that stores IEBDG messages. |
user_defined_name1 DD |
Describes the input data set or data set member that stores JCL. |
user_defined_name2 DD |
Describes the data set or data set member that will store newly created JCL. |
SYSIN DD |
Describes the IEBDG commands. |
7.2. Command Usage
The following are IEBDG commands that are set in SYSIN DD.
DSD
The command means the start of command that is executed through IEBDG. Sets the input data set that will be used to create test data, and the output data set that will output the test data. At least, one or more DSD must exist, and must end with the END statement.
The syntax of the DSD command is as follows:
[label] DSD OUTPUT=(ddname) [,INPUT=(ddname1[,ddname2][,...])]
Parameter | Description |
---|---|
OUTPUT |
Sets the output data set DD. |
INPUT |
Sets the data set DD that will be used for input. |
FD
The command sets the field type of output data that will output test data.
The syntax of the FD command is as follows:
[label] FD NAME=name ,LENGTH=length [,STARTLOC=starting-location] [,FILL={'character'|X'nn'}] [,{FORMAT=pattern[,CHARACTER=character] |PICTURE=length,{'character-string'|P'n'|B'n'}}] [,SIGN=sign] [,ACTION={FX|RO|RP|SL|SR|TL|TR|WV} [,INDEX=n[,CYCLE=n][,RANGE=n]]
Parameter | Description |
---|---|
NAME |
Sets the field name. This is used when specifying a field name by using the NAME statement of the CREATE command. |
LENGTH |
Sets the field length. |
STARTLOC |
Sets the start position of the field within a record. |
FILL |
Sets the value to fill the field by default. Enter a character by wrapping with single quotes (' ') or enter a hexadecimal value.
|
FORMAT |
Sets the pattern to fill the field. The following values can be used for the pattern.
|
CHARACTER |
Sets the start character of the pattern. |
PICTURE |
Users can define the pattern directly. Set the field length as many as set at LENGTH. If the value is longer than LENGTH, the latter pattern will be ignored. (Do not use with the FORMAT statement described previously) |
SIGN |
Determines the sign for a PACKED DECIMAL or binary field. |
ACTION |
Sets how the field content can be changed.
|
INDEX |
Sets a decimal number that will increase the field value whenever a record is added. This option can be used when FORMAT is ZD, PD, or BI, or when PICTURE is set. But the latter part of 'character-string' of PICTURE must be numbers.
|
REPEAT
The command sets how many times the CREATE command group will be executed repeatedly.
The syntax of the REPEAT command is as follows:
[label] REPEAT QUANTITY=number[,CREATE=number]
Parameter | Description |
---|---|
QUANTITY |
Sets how many times the CREATE command group will be executed repeatedly. |
CREATE |
Sets the number of CREATE commands that consist of a CREATE command group. (Default value: 1) |
CREATE
The command defines the records of output data set.
The syntax of the CREATE command is as follows:
[label] CREATE [QUANTITY=n] [,FILL={'character'|X'nn'}] [,INPUT={ddname|SYSIN[({cccc|$$$E})]}] [,PICTURE=length,startloc,{'character-string'| P'n'|B'n'}] [,NAME={(namelist)| (namelist-or-(copygroup))} [,EXIT=routinename]
Parameter | Description |
---|---|
QUANTITY |
Sets the number of records that will be created by the CREATE statement. (Default value: 1) |
FILL |
Sets the value to fill the field by default. Enter a character by wrapping with single quotes (' ') or enter a hexadecimal value.
|
INPUT |
Sets DD of data sets that will be used for input. Instead of DD, input data can be described in JCL directly through SYSIN, and the end of the data is '$$$E.' The 'cccc' function of SYSIN is not supported.
|
PICTURE |
Users defines the pattern directly. |
NAME |
Describes namelist that will be used for input. Only namelist or combined namelist and copygroup can be used.
The usage is as follows:
|
EXIT |
Not supported currently. |
END
The command pairs with the DSD command, and it means the end of the command.
The syntax of the END command is as follows:
[label] END
7.3. Examples
The following example shows how to use two CREATE commands to store OUTPUT DD according to each field.
The first CREATE command outputs one line with three field names (REC01NAME,REC01FD01,REC01FD02). The second CREATE command outputs two lines with four field names (EC02NAME,REC02FD01,REC02FD02,REC02FD03).
//GENDAT0 JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //STEP1 EXEC PGM=IEBDG //OUTPUT DD DSN=IEBDG.DATASET.OUT01,DISP=(NEW,CATLG,DELETE), // DCB=(RECFM=VB,LRECL=32760) //SYSIN DD DATA DSD OUTPUT=(OUTPUT) FD NAME=REC01NAME,LENGTH=12,PICTURE=12,'RECORD01 ' FD NAME=REC01FD01,LENGTH=7,PICTURE=7,'A000001',INDEX=1 FD NAME=REC01FD02,LENGTH=4993,FORMAT=AL,ACTION=TL FD NAME=REC02NAME,LENGTH=12,PICTURE=12,'RECORD02 ' FD NAME=REC02FD01,LENGTH=7,PICTURE=7,'A000001',INDEX=1,CYCLE=2 FD NAME=REC02FD02,LENGTH=8,PICTURE=8,'AM000001',INDEX=1 FD NAME=REC02FD03,LENGTH=4985,FORMAT=AL REPEAT QUANTITY=131072,CREATE=2 CREATE QUANTITY=1,NAME=(REC01NAME,REC01FD01,REC01FD02) CREATE QUANTITY=2,NAME=(REC02NAME,REC02FD01,REC02FD02,REC02FD03) END /* //SYSPRINT DD SYSOUT=*
The following is the results of the previous example. The total number of records is 393,216. Each record length is 5012 Bytes.
RECORD01 A000001ABCDEFGHIJKLMNOPQRSTUVWXYZ... RECORD02 A000001AM000001ABCDEFGHIJKLMNOPQR... RECORD02 A000001AM000002ABCDEFGHIJKLMNOPQR... RECORD01 A000002 BCDEFGHIJKLMNOPQRSTUVWXYZ... RECORD02 A000002AM000003ABCDEFGHIJKLMNOPQR... RECORD02 A000002AM000004ABCDEFGHIJKLMNOPQR... RECORD01 A000003 CDEFGHIJKLMNOPQRSTUVWXYZ... RECORD02 A000003AM000005ABCDEFGHIJKLMNOPQR... RECORD02 A000003AM000006ABCDEFGHIJKLMNOPQR... RECORD01 A000004 DEFGHIJKLMNOPQRSTUVWXYZ... RECORD02 A000004AM000007ABCDEFGHIJKLMNOPQR... RECORD02 A000004AM000008ABCDEFGHIJKLMNOPQR... RECORD01 A000005 EFGHIJKLMNOPQRSTUVWXYZ... RECORD02 A000005AM000009ABCDEFGHIJKLMNOPQR... RECORD02 A000005AM000010ABCDEFGHIJKLMNOPQR... RECORD01 A000006 FGHIJKLMNOPQRSTUVWXYZ... RECORD02 A000006AM000011ABCDEFGHIJKLMNOPQR... RECORD02 A000006AM000012ABCDEFGHIJKLMNOPQR... RECORD01 A000007 GHIJKLMNOPQRSTUVWXYZ... RECORD02 A000007AM000013ABCDEFGHIJKLMNOPQR... RECORD02 A000007AM000013ABCDEFGHIJKLMNOPQR... ... RECORD01 A131071 ... RECORD02 A131071AM262141ABCDEFGHIJKLMNOPQR... RECORD02 A131071AM262142ABCDEFGHIJKLMNOPQR... RECORD01 A131072 ... RECORD02 A131072AM262143ABCDEFGHIJKLMNOPQR... RECORD02 A131072AM262144ABCDEFGHIJKLMNOPQR...
The following is an example where two fields are specified using two CREATE statements and each ACTION is specified.
The first FIELD statement specifies a LENGTH of 10, a user-defined PICTURE pattern of 5 bytes in length, and grants RO as an ACTION. The second one specifies a LENGTH of 10, a custom PICTURE pattern of 5 bytes in length, and a WV as ACTION. A record is printed using two fields with the CREATE statement.
//IEBDGJ14 JOB //JSTEP010 EXEC PGM=IEBDG //SYSPRINT DD SYSOUT=* //OUTPUT01 DD DSN=OF71.IEBDG01.DATA01,DISP=(NEW,CATLG,CATLG), // DCB=(RECFM=FB,DSORG=PS,LRECL=40), // VOL=SER=DEFVOL //SYSIN DD * DSD OUTPUT=(OUTPUT01) FD NAME=RFDN001,LENGTH=10,PICTURE=5,'A0001',ACTION=RO FD NAME=RFDN002,LENGTH=10,PICTURE=5,'A0001',ACTION=WV REPEAT QUANTITY=1 CREATE QUANTITY=20,NAME=(RFDN001,RFDN002) END /*
The following is a record of the output data set created as a result of the previous example, and the record is printed moving along the pattern by ACTION of each field within 10 bytes given to the field
A0001 A0001.................... A0001 A0001 .................... A0001 A0001 .................... A0001 A0001 .................... A0001 A0001 .................... A0001 A0001 .................... A0001 A0001.................... A0001 A0001 .................... A0001 A0001 .................... A0001 A0001 .................... A0001 A0001 .................... A0001 A0001 .................... A0001 A0001.................... A0001 A0001 .................... A0001 A0001 .................... A0001 A0001 .................... A0001 A0001 .................... A0001 A0001 .................... A0001 A0001.................... A0001 A0001 ....................
The following is an example of printing records by specifying the NAME parameter in four CREATE statements.
The example illustrates the process of creating 4 string fields, specifying ACTION for each, specifying copygroup in the NAME parameter in the CREATE statement, and then recording the name of the field to be repeatedly printed.
//IEBDGJ03 JOB //JSTEP010 EXEC PGM=IEBDG //SYSPRINT DD SYSOUT=* //OUTPUT01 DD DSN=OF71.IEBDG01.DATA01,DISP=(NEW,CATLG,CATLG), // DCB=(RECFM=FB,DSORG=PS,LRECL=40), // VOL=SER=DEFVOL //SYSIN DD * DSD OUTPUT=(OUTPUT01) FD NAME=RFDN001,LENGTH=10,FORMAT=AL,ACTION=TL FD NAME=RFDN002,LENGTH=10,FORMAT=AL,ACTION=TR FD NAME=RFDN003,LENGTH=10,FORMAT=AL,ACTION=SL FD NAME=RFDN004,LENGTH=10,FORMAT=AL,ACTION=SR REPEAT QUANTITY=1,CREATE=4 CREATE QUANTITY=10,NAME=((COPY=4,RFDN001)) CREATE QUANTITY=10,NAME=((COPY=4,RFDN002)) CREATE QUANTITY=10,NAME=((COPY=4,RFDN003)) CREATE QUANTITY=10,NAME=((COPY=4,RFDN004)) END /*
The following is the result of the previous example, and 4 fields are repeatedly printed by the copygroup specified in the NAME parameter of the CREATE statement.
ABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJ BCDEFGHIJ BCDEFGHIJ BCDEFGHIJ BCDEFGHIJ CDEFGHIJ CDEFGHIJ CDEFGHIJ CDEFGHIJ DEFGHIJ DEFGHIJ DEFGHIJ DEFGHIJ EFGHIJ EFGHIJ EFGHIJ EFGHIJ FGHIJ FGHIJ FGHIJ FGHIJ GHIJ GHIJ GHIJ GHIJ HIJ HIJ HIJ HIJ IJ IJ IJ IJ J J J J ABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJ ABCDEFGHI ABCDEFGHI ABCDEFGHI ABCDEFGHI ABCDEFGH ABCDEFGH ABCDEFGH ABCDEFGH ABCDEFG ABCDEFG ABCDEFG ABCDEFG ABCDEF ABCDEF ABCDEF ABCDEF ABCDE ABCDE ABCDE ABCDE ABCD ABCD ABCD ABCD ABC ABC ABC ABC AB AB AB AB A A A A ABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJ BCDEFGHIJ BCDEFGHIJ BCDEFGHIJ BCDEFGHIJ CDEFGHIJ CDEFGHIJ CDEFGHIJ CDEFGHIJ DEFGHIJ DEFGHIJ DEFGHIJ DEFGHIJ EFGHIJ EFGHIJ EFGHIJ EFGHIJ FGHIJ FGHIJ FGHIJ FGHIJ GHIJ GHIJ GHIJ GHIJ HIJ HIJ HIJ HIJ IJ IJ IJ IJ J J J J ABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJ ABCDEFGHI ABCDEFGHI ABCDEFGHI ABCDEFGHI ABCDEFGH ABCDEFGH ABCDEFGH ABCDEFGH ABCDEFG ABCDEFG ABCDEFG ABCDEFG ABCDEF ABCDEF ABCDEF ABCDEF ABCDE ABCDE ABCDE ABCDE ABCD ABCD ABCD ABCD ABC ABC ABC ABC AB AB AB AB A A A A
For more information about IEBDG, refer to "IEBDG" in IBM OS/390 DFSMSdfp Utilities. |
7.4. Return Codes
The results of executing the IEBDG Batch application utility program are as follows:
-
Upon success:
It returns the code received from the Batch application.
-
In the case of an error:
It displays the error message to SYSPRINT DD and returns the code corresponding to the error.
Error codes that might occur to the IEBDG utility program are as follows:
Code Description 08
An error occurred while processing a control statement.
Suspends the data creation immediately and handles the next DSD statement.
12
An error occurred while processing input/output data sets.
Suspends the utility immediately.
16
Unrecoverable type errors. The following cases apply. Suspends the utility immediately.
-
SYSIN DD command syntax error
-
OpenFrame system library initialization failed
-
Other IEBDG utility program error
-
8. IEBEDIT
The utility is used to create or edit a JOB stream data set.
According to the command described with SYSIN DD, the JCL of an input data set creates a new JCL as an output data set by extracting JOB and STEP. All selected JOBs and STEPs are copied to the output data set in the same order in the input data set.
8.1. DD Statements
The following describes each DD statement.
Statement | Description |
---|---|
SYSUT1 DD |
Sets the input data set with JCL. |
SYSUT2 DD |
Sets the output JCL data set. |
SYSIN DD |
Enters commands of IEBEDIT. |
Data Set block sizes of SYSUT1, SYSUT2, and SYSIN must be in multiples of 80. |
8.2. Command Usage
The following IEBEDIT command can be specified in SYSIN DD:
EDIT
The command sets the filtering conditions of JOB STEPs to be included in the output data set. If EDIT is not set, the entire input data set is copied to an output data set.
The syntax of the EDIT command is as follows:
[label] EDIT [START=jobname] [,TYPE={POSITION|INCLUDE|EXCLUDE}] [,STEPNAME=(namelist)] [,NOPRINT]
Parameter | Description |
---|---|
START |
Specifies the jobname for the EDIT statement. Only one JOB is processed by the EDIT statement. If START is set without the TYPE or STEPNAME parameter, the entire JOB and the JOBSTEP are copied to the output data set. If the jobname is left empty on the first EDIT statement, the first JOB is selected by default. If the jobname is left empty in any subsequent EDIT statements, the next JOB of the JOBs specified in the previous EDIT statement is automatically selected. When a JOB is selected, its JOB STEPs are extracted to the output data set. It is not possible to extract JOB STEPs from multiple JOBs. |
TYPE |
Sets the filter on the input data set. One of the following values must be set:
|
STEPNAME |
Sets the JOB STEP namelist. STEPs can be listed in the following three ways:
Commas (,) and hyphens (-) can be mixed on a single list. |
NOPRINT |
Determines whether to print the results of data set processing to SYSPRINT. If enabled, the results of data set processing are printed to SYSUT2 only, not SYSPRINT. |
8.3. Examples
The following example EDITs the JCL given in SYSUT1 DD and outputs the result to SYSUT2 DD.
//JOB1 JOB CLASS=A //STEP1 EXEC PGM=IEBEDIT //SYSPRINT DD SYSOUT=* //SYSIN DD * EDIT START=,TYPE=POSITION,STEPNAME=T12 EDIT START=JOB2,TYPE=INCLUDE,STEPNAME=(T22,T23) /* //SYSUT1 DD DATA //JOB1 JOB CLASS=A //T11 EXEC PGM=IEFBR14 /TEMP1 DD TEMP1 //T12 EXEC PGM=IEFBR14 //TEMP2 DD TEMP2 //T13 EXEC PGM=IEFBR14 //JOB2 JOB CLASS=B //T21 EXEC PGM=IEBEDIT //TEMP3 DD TEMP3 //T22 EXEC PGM=IEBEDIT //TEMP4 DD TEMP4 //TEMP41 DD TEMP41 //T23 EXEC PGM=IEBEDIT //TEMP5 DD TEMP5 //T24 EXEC PGM=IEBEDIT //TEMP6 DD TEMP6 /* //SYSUT2 DD DSNAME=OFTEST.IEBEDIT.OUT2, // DISP=(NEW,CATLG),DCB=(RECFM=F,LRECL=80,BLKSIZE=80)
The first EDIT statement outputs all steps following T12 from JOB1. The second EDIT statement outputs T22 and T23 steps from JOB2.
Below is the resulting SYSUT2 JCL from the above example.
(EDIT START=,TYPE=POSITON,STEPNAME=T12) //JOB1 JOB CLASS=A //T12 EXEC PGM=IEFBR14 //TEMP2 DD TEMP2 //T13 EXEC PGM=IEFBR14 //JOB2 JOB CLASS=B (EDIT START=JOB2,TYPE=INCLUDE,STEPNAME=(T22,T23)) //JOB2 JOB CLASS=B //T22 EXEC PGM=IEBEDIT //TEMP4 DD TEMP4 //TEMP41 DD TEMP41 //T23 EXEC PGM=IEBEDIT //TEMP5 DD TEMP5
For more information on IEBEDIT, refer to IEBEDIT in "IBM OS/390 DFSMSdfp Utilities". |
9. IEBGENER
The utility is used to copy the ordered data sets, VSAM data sets, or PDS members. It offers the same functionality as the ICEGENER utility.
IEBGENER performs the following tasks:
-
Copies ordered data sets, VSAM data sets, or PDS members
-
Creates PDSs from ordered data sets, or VSAM data sets
-
Adds new members to an existing PDS
-
Edits input records
9.1. DD Statements
The following describes each DD statement.
Statement | Description |
---|---|
SYSPRINT DD |
Sets the input data set for the message from IEBGENER. |
SYSUT1 DD |
Sets the input data set (ordered data set, VSAM data sets, or PDS member). |
SYSUT2 DD |
Sets the output data set (ordered data set, VSAM data sets, or PDS member). |
SYSIN DD |
Configures commands of IEBGENER. |
9.2. Command Usage
First, enter the IEBGENER utility command in SYSIN DD. If nothing is entered, the SYSUT1 data set is copied to the SYSUT2 data set.
The following IEBGENER command parameters are configured in SYSIN DD:
GENERATE
The command sets the parameters of a MEMBER and a RECORD. The syntax of the GENERATE command is as follows:
[label] GENERATE [,MAXNAME=n] [,MAXFLDS=n] [,MAXGPS=n] [,MAXLITS=n]
Parameter | Description |
---|---|
MAXNAME |
This parameter sets the maximum number of members. The maximum value is 3276. |
MAXFLDS |
This parameter sets the maximum number of fields in a record. The maximum value is 4096. |
MAXGPS |
This parameter sets the maximum number of IDENTs in a record. The maximum value is 2520. |
MAXLITS |
This parameter sets the maximum number of literal characters in a record field. The maximum value is 2730. |
MEMBER
When the output record is constructed from many PDS members, the MEMBER statement is needed for each member in PDS.
The syntax of the MEMBER statement is as follows:
[label] MEMBER NAME=(name[,alias1][,alias2][,...])
Parameter | Description |
---|---|
NAME |
Specifies the name of members to be created in the output data set. |
Alias does not actually function, but supports to prevent an error in the MEMBER statements of the current IEBGENER utility. |
RECORD
Describes the processing rules for the input record.
The syntax of the RECORD statement is as follows:
[label] RECORD [IDENT=(length,'name',input-location)] [,FIELD=([length], [{input-location|'literal'}], [conversion], [output-location])] [,FIELD=...]
Parameter | Description |
---|---|
IDENT |
Sets an input record filter to copy only the matching records when a MEMBER statement is placed before a RECORD statement, this parameter. When a record’s input-location length and its name are the same, the record becomes the last record of a member or the last record for which FIELD is applied.
|
FIELD |
Sets the record editing information. It also writes the data or the literal of the specified length from the input record’s input-location to the output record’s output-location.
|
9.3. Examples
The following example copies an ordered data set.
Since SYSIN DD is not set, the ordered data set named TEST.INPUT is copied to TEST.COPY and the IEBGENER message is saved to the message class used in JOB.
//COPY JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //COPYSDS EXEC PGM=IEBGENER //SYSUT1 DD DSNAME=TEST.INPUT,DISP=(SHR,KEEP) //SYSUT2 DD DSNAME=TEST.COPY,DISP=(NEW,CATLG), // DCB=(RECFM=FB,LRECL=120 ,BLKSIZE=120) //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY
The following example creates new members in PDS from ordered data sets.
The ordered data set, TEST.INPUT, is split into MEMBER1, MEMBER2, and MEMBER3 and it is saved in PDS under the name TEST.PDS01.
//CREATE JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //NEWPDS EXEC PGM=IEBGENER //SYSUT1 DD DSNAME=TEST.INPUT,DISP=(SHR,KEEP) //SYSUT2 DD DSNAME=TEST.PDS01,DISP=(NEW,CATLG), // DCB=(DSORG=PO,RECFM=FB,LRECL=120,BLKSIZE=120) //SYSPRINT DD SYSOUT=* //SYSIN DD * GENERATE MAXNAME=3,MAXGPS=2 MEMBER NAME=MEMBER1 GROUP1 RECORD IDENT=(8,'firstxxx',30) MEMBER NAME=MEMBER2 GROUP2 RECORD IDENT=(8,'secondxx',30) MEMBER NAME=MEMBER3 /*
First, the TEST.INPUT’s records between record number 30 and 37 are searched for the 'firstxxx' value. Once the first match is found, all searched records up to the matched record (inclusive) are copied to MEMBER1. Then records are searched for 'secondxxx'.
All searched records after 'firstxxx' and up to 'secondxx' are copied to MEMBER2. The rest are copied to MEMBER3.
The following example adds new members to the existing PDS.
//MERGE JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //MERGEPDS EXEC PGM=IEBGENER //SYSUT1 DD DSNAME=TEST.INPUT2,DISP=(SHR,KEEP) //SYSUT2 DD DSNAME=IEBGENER.TEST.PDS01,DISP=(OLD,KEEP) //SYSPRINT DD SYSOUT=* //SYSIN DD * GENERATE MAXNAME=2,MAXGPS=1 MEMBER NAME=MEMX GROUP1 RECORD IDENT=(11,'endofrecord',15) MEMBER NAME=MEMY /*
From the TEST.INPUT2’s records (the ordered data set), each record’s data value between the 15th and 25th bytes are compared to 'endofrecord'. When a match is found, all records up to the matched record are copied to MEMX and the rest are copied to MEMY. Finally, MEMX and MEMY are added to PDS TEST.PDS01 as PDS members.
The following example edits the input record. TEST.INPUT3 record is edited then copied to TEST.EDIT01.
//EDIT JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //EDIT EXEC PGM=IEBGENER //SYSUT1 DD DSNAME=TEST.INPUT3,DISP=(SHR,KEEP) //SYSUT2 DD DSNAME=IEBGENER.TEST.EDIT01,DISP=(NEW,CATLG), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=80) //SYSPRINT DD SYSOUT=* //SYSIN DD * GENERATE MAXGPS=1,MAXFLDS=4,MAXLITS=10 RECORD IDENT=(8,'firstmem',1),FIELD=(50,76,,31), FIELD=(30,20,,1) RECORD FIELD=(70,41,,11),FIELD=(10,'**********',,1) /*
As specified in the IDENT statement in the example above, FIELD is applied to all records until a record that has the 'firstmem' name between 1st and 8th byte is found.
Thus as shown in the figure below, 50 bytes are copied starting from the 76th byte position in the input record to the 31st byte position in the output record. Also, 30 bytes are copied from the 30th byte position in the input record to the beginning of the output record.
Once the first IDENT statement is processed, the second RECORD statement is processed as shown in the figure below. The 70 bytes starting from the 41st byte position in the input record are copied to the 11th byte position in the output record and the first 10 bytes of the output record are copied to literal '**********'.
9.4. Environment Configuration
Specifies whether to set DCB of the output data set as sms class according to the acs rule of the output data set through the SET_OUTPUT_DCB_TO_SMS key of the ds subject and DATASET_DEFAULT section in the OpenFrame configuration or to set the same as the DCB information of the input data set.
For more about the ds subject configuration, refer to OpenFrame Configuration Guide. |
9.5. Return Codes
The utility prints the following batch execution results:
-
Upon success:
It returns the return code from the batch application.
-
In the case of an error:
It displays the error message to SYSPRINT DD and returns the code corresponding to the error.
The following errors may occur in the IEBGENER utility program:
Code Description 12
Unrecoverable error. The causes include:
-
Data Set related (pgmdd, open/close, read/write) errors
-
SYSIN DD command syntax error
-
Other IEBGENER program errors
16
System fault. The cause is:
-
OpenFrame system library initialization failure
-
A similar utility program is ICEGENER. |
10. IEBPTPCH
The utility is used to modify data in a format to actually print all or part of an ordered data set or PDS.
The IEBPTPCH utility program performs the following tasks:
-
Prints entered ordered data sets or PDS.
-
Prints selective members of PDS.
-
Edits record fields of the ordered data set or PDS and prints it.
10.1. DD Statements
The following describes each DD statement.
Statement | Description |
---|---|
SYSPRINT DD |
Sets the data set where IEBPTPCH messages are stored. |
SYSUT1 DD |
Sets the input data set of ordered data sets or PDS data sets. |
SYSUT2 DD |
Sets the output data set of ordered data sets. |
SYSIN DD |
Enters commands of IEBPTPCH. |
10.2. Command Usage
This section describes the IEBPTPCH commands used in SYSIN DD statements.
The command prints data. The PRINT statement must be specified first and cannot be specified multiple times.
The syntax of the PRINT command is as follows:
[label] PRINT [PREFORM=A] [,TYPORG={PS|PO}] [,CNTRL={n|1}] [,STRTAFT=n] [,STOPAFT=n] [,SKIP=n] [,MAXNAME=n] [,MAXFLDS=n] [,MAXGPS=n] [,MAXLITS=n] [,MAXLINE=n]
Parameter | Description |
---|---|
PREFORM |
Specifies the first byte of each record as a control character. A record has a control character when the data is in its print format. Data is in its print format when the data is printed in the same format. When PREFORM is set, all PRINT related parameters other than TYPORG are ignored. "A" represents the ASA Control Character. |
TYPORG |
Sets the input data type to either ordered data set (PS) or partitioned data set (PO). (Default value: PS) |
CNTRL |
Sets the line space value. If a line space is set to 3, data is written on the first line, and blank lines are printed on the second and third lines. The following data is also printed in this order. Currently, the maximum line space value is 3. Any value outside of this range defaults to 1. |
STRTAFT |
Skips n logical records in an ordered data set and prints from n+1st logical record. The value range of records does not exceed 32767. If the value exceeds, as many records as there are, but up to 32767 can be processed. |
STOPAFT |
Sets the number of logical records in an ordered data set to print. A maximum of 32767 logical records can be set. If a value greater than 32767 is set, it is set to 32767. If the IDENT of the STOPAFT statement and the RECORD statement are specified together, when the value set in STOPAFT is satisfied or the last of the record group separated by IDENT, the first of the two appears, data processing of the current input data set execution command is terminated. |
SKIP |
Prints every nth record. If a value greater than 32767 is set, it is set to 32767. |
MAXNAME |
Specifies the maximum number of members in the MEMBER statement. If there is a MEMBER command, it must be specified. The setting value cannot exceed 32767. |
MAXFLDS |
Sets the maximum number of FIELD parameters in a RECORD statement. The maximum value is 32,767. |
MAXGPS |
Sets the maximum number of IDENT parameters for a RECORD statement. The maximum value is 32,767. |
MAXLITS |
Sets the maximum number of literals in an IDENT parameter. The maximum value is 32,767. |
MAXLINE |
Specifies the maximum number of lines in a page to be printed. If a value greater than 32767 is set, it is set to 32767. (Default value: 60) |
TITLE
Specifies the title or sub-title to be printed.
IEBPTPCH has two ITEMs in the TITLE statement. The first ITEM statement sets the title name, and the second ITEM statement sets the sub-title name. The title and sub-title set here are printed on every page.
The syntax of the TITLE command is as follows:
[label] TITLE ITEM=('title'[,output-location]) [,ITEM=...]
Parameter | Description |
---|---|
ITEM |
Set title and output-location as follows:
|
MEMBER
If the input data set is PDS, the MEMBER command processes only specified members. The MAXNAME parameter in the PRINT statement must be set prior to setting the MEMBER statement.
The syntax of the MEMBER command is as follows:
[label] MEMBER NAME=membername
Parameter | Description |
---|---|
NAME |
Specifies the names of PDS members to print. |
RECORD
The command sets the RECORD group to print.
The syntax of the RECORD command is as follows:
[label] RECORD [IDENT=(length,'name',input-location)] [,FIELD=(length,[input-location],[conversion] [output-location])] [,FIELD=…]
Item | Description |
---|---|
IDENT |
Identifies the last record in a record group. The last record has its name value equal to the data length starting from the input-location. The last record is either the last record in a MEMBER or the last record to which FIELD is applied. In order to use the IDENT parameter, MAXGPS and MAXLITS must be set in the PRINT statement.
|
FIELD |
Edits a record to the command given in this parameter. The data length starting from the input location is written to the output-location in the output record. If the literal is specified, the literal length is written to the output-location in the output record. In order to use the FIELD parameter, MAXFLDS must be set in the PRINT statement.
|
CONVERSION |
Specifies information for record conversion. Four parameter values are available: CV, PZ, VC, and XE.
|
10.3. Examples
The following example formats selected MEMBERs to the print format and outputs them. From the members of IEBCOPY.TEST.INPUT01, only MEMBER2’s records are orderly output to the SYSOUT defined in SYSUT2.
Once the value 'ENDRECORD' is found in 8thbytes of data starting from the 21st byte in a record, output is stopped and the JOB is terminated. Then SYSOUT uses OUTPUT PROCESSING to print to a printer where a maximum of 30 lines are printed per page.
//TEST JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //NEWPDS EXEC PGM=IEBPTPCH //SYSUT1 DD DSNAME=IEBCOPY.TEST.INPUT01,DISP=(SHR,CATLG) //SYSUT2 DD SYSOUT=A //SYSPRINT DD SYSOUT=* //SYSIN DD * PRINT TYPORG=PO,CNTRL=1,MAXLINE=30,MAXNAME=1,MAXLITS=10,MAXGPS=3 MEMBER NAME=MEMBER2 RECORD IDENT=(8,'ENDRECORD',21) /*
10.4. Return Codes
The utility program prints the following batch execution results:
-
Upon success:
It returns the return code from the batch program.
-
In the case of an error:
Error messages are output to SYSPRINT DD and corresponding return codes are returned.
The following errors may occur in IEBTPCH:
Code Description 12
Unrecoverable error. The causes include:
-
Data Set related (pgmdd, open/close, read/write) error
-
SYSIN DD command syntax error
-
Other IEBPTPCH program errors
16
System fault. The cause is:
-
OpenFrame system library initialization failure
-
11. IEBUPDTE
The utility creates, updates, and copies resources (application sources, JCL sources, etc.). Each record can be modified, deleted, and inserted in the order of sequence numbers.
The IEBUPDTE utility program performs the following tasks:
-
Creates a new PDS.
-
Copies and replaces PDS members.
-
Edits records of a PDS member. (Replacing, adding and deleting records, and giving them sequence numbers)
Parameter Usage
The following parameters can be set for IEBUPDTE.
//EXEC PGM=IEBUPDTE[,PARM={NEW|MOD}]
Parameter | Description |
---|---|
PARM |
|
11.1. DD Statements
The following describes each DD statement.
Statement | Description |
---|---|
SYSPRINT DD |
Sets the data set where IEBUPDTE messages are stored. |
SYSUT1 DD |
Sets the input data set. |
SYSUT2 DD |
Sets the output data set. |
SYSIN DD |
Enters commands of IEBUPDTE. |
11.2. Command Usage
The following is the IEBUPDTE commands used in SYSIN DD statements.
All the commands should begin with "./", otherwise the sentence is considered as a DATA sentence. |
ADD, REPL, REPRO, CHANGE
Adds, replaces, copies, and edits records of the input data set, and creates the records to the output data set.
The syntax of the ADD, REPL, REPRO, and CHANGE commands are as follows:
./[label] FUNC [NAME=member-name] [,LIST=ALL] [,SEQFLD=nnn] [,COLUMN=n] [,UPDATE=INPLACE] [,NEW={PO|PS}] [,MEMBER=member-name] [,LEVEL=n] [,SOURCE=x] [,SSI=hhhhhhhh] [,INHDR=routine-name] [,INTLR=routine-name] [,OUTHDR=routine-name] [,OUTTLR=routine-name] [,TOTAL=(routine-name, size)]
Parameter | Description |
---|---|
FUNC |
Specifies ADD, REPL, REPRO and CHANGE. |
NAME |
Specifies the member name of the output PDS to create, copy, edit, and replace records. |
LIST |
Prints all the records output to the output data set to SYSPRINT. (Currently unsupported.) |
SEQFLD |
Specifies the location and length of a sequence number. The location is the first two-digit number, and the length is the last one-digit number. The location can be from 1 to 80, and the length can be from 1 to 8. (Default value: 738) |
COLUMN |
Specifies the location to which to replace data in a record. |
UPDATE |
Specifies when the input data set and the output data set are identical to each other, and modification occurs in the data sets. |
NEW |
Specifies DSORG of the output data set when DSORG of the input data set is different from that of the output data set. |
MEMBER |
Specifies a member name for output from SDS to PDS. |
LEVEL |
Specifies a change level when the output data is PDS. (Currently unsupported.) |
SOURCE |
Specifies whether the modification is made by the user or IBM, when the output data set is PDS. (Currently unsupported.) |
SSI |
Specifies system status information, when the output data set is PDS. (Currently unsupported.) |
INHDR |
Specifies a routine for processing a header label of the input user. (Currently unsupported.) |
INTLR |
Specifies a routine for processing the last label of the input user. (Currently unsupported.) |
OUTHDR |
Specifies a routine for processing a header label for the output user. (Currently unsupported.) |
OUTTLR |
Specifies a routine for processing the last label of the output user. (Currently unsupported.) |
TOTAL |
Specifies a total routine and the area size. (Currently unsupported.) |
NUMBER, DELETE
NUMBER and DELETE are used with ADD, REPL, REPRO, and CHANGE. They re-allocate sequence numbers of records (NUMBER), or delete a record corresponding to its specified sequence number (DELETE).
NUMBER is used to give a sequence number. DELETE is used to delete a record corresponding a specified sequence number.
The syntax of the NUMBER and DELETE commands are as follows:
./[label] NUMBER [NEW1=n] [,INCR=n] [,SEQ1={n|ALL}] [,SEQ2=n] [,INSERT=YES] ./[label] DELETE SEQ1=n [,SEQ2=n]
Parameter | Description |
---|---|
NEW1 |
Specifies an initial value for sequence numbers. |
INCR |
Specifies an increment value for sequence numbers. |
SEQ1 |
Specifies the sequence number to begin a CHANGE sentence. The parameter is available only for a CHANGE sentence. When INSERT is set to YES, it sets a position of a record to be newly added. To set positions of all the records, specify ALL. |
SEQ2 |
Specifies the sequence number to close a CHANGE sentence. The parameter is available only for a CHANGE sentence. It can be omitted to delete a single record. |
INSERT |
To add new records without sequence numbers, this parameter adds the records from the next number to the sequence number specified in SEQ1. |
ENDUP
The command sets the end of SYSIN.
./[label] ENDUP
ALIAS
The command is set to handle an alias. This command is not currently supported.
LABEL
The command is set to handle a user label. This command is not currently supported.
11.3. Examples
The following example creates a new PDS and its members.
//IEBUPDT1 JOB //STEP1 EXEC PGM=IEBUPDTE,PARM=NEW //SYSPRINT DD SYSOUT=A //SYSUT2 DD DSNAME=NEWPDS,DISP=(NEW,CATLG), // VOLUME=SER=DEFVOL,SPACE=(TRK,(50,,10)), // DCB=(RECFM=F,LRECL=80,BLKSIZE=80) //SYSIN DD DATA ./ ADD NAME=MEMB1 MEMB1 DATA1 00000010 MEMB1 DATA2 00000020 MEMB1 DATA3 00000030 ./ ADD NAME=MEMB2 MEMB2 DATA1 00000010 MEMB2 DATA2 00000020 MEMB2 DATA3 00000030 ./ ADD NAME=MEMB3 MEMB3 DATA1 00000010 MEMB3 DATA2 00000020 MEMB3 DATA3 00000030 ./ ENDUP /*
The first ADD sentence is to create the member 'MEMB1,' and has the following DATA sentences as records. The second ADD sentence is to create the member 'MEMB2,' and has the following DATA sentences as records. The third ADD sentence is to create the member 'MEMB3,' and has the following DATA sentences as records.
The following example copies and adds the members of the existing PDS to a new PDS.
//IEBUPDT2 JOB //STEP1 EXEC PGM=IEBUPDTE //SYSPRINT DD SYSOUT=* //SYSUT1 DD DSNAME=OLDPDS,DISP=SHR //SYSUT2 DD DSNAME=NEWPDS,DISP=(NEW,CATLG), // VOL=SER=DEFVOL,SPACE=(TRK,(100,,10)), // DCB=(RECFM=F,LRECL=80,BLKSIZE=4000) //SYSIN DD DATA ./ REPRO NAME=MEMB1 ./ REPRO NAME=MEMB2 ./ ADD NAME=MEMB3 ./ NUMBER NEW1=100,INCR=100 MEMB3 DATA1 MEMB3 DATA2 MEMB3 DATA3 ./ ENDUP /*
The first REPRO sentence is to copy MEMB1 of OLDPDS to NEWPDS. The second REPRO sentence is to copy MEMB2 of OLDPDS to NEWPDS. The ADD sentence creates MEMB3, and has the DATA sentences on the fifth to seventh lines as records. The NUMBER sentence gives records sequence numbers which start from 100, and increase by 100.
The following example gives a sequence number to a member of the existing PDS, and replaces some records.
//IEBUPDT3 JOB //STEP1 EXEC PGM=IEBUPDTE //SYSPRINT DD SYSOUT=A //SYSUT1 DD DSNAME=OLDPDS,DISP=(OLD,KEEP),VOL=SER=DEFVOL //SYSIN DD * ./ CHANGE NAME=MEMB1,UPDATE=INPLACE ./ NUMBER SEQ1=ALL,NEW1=100,INCR=50 CHANGE DATA1 00000200 CHANGE DATA2 00000600 ./ ENDUP /*
The first CHANGE sentence is to update the input data set for MEMB1. The NUMBER sentence creates new sequence numbers for all the records of MEMB1. The sequence numbers start from 100, and increase by 50. Each DATA sentence has a unique sequence number. A record corresponding to the old sequence number is replaced by a new one. With the UPDATE=INPLACE option specified, if no sequence number created from an old record is found, an error occurs.
The following example edits a member of PDS, and outputs it to SDS.
//IEBUPDT4 JOB //STEP1 EXEC PGM=IEBUPDTE //SYSPRINT DD SYSOUT=A //SYSUT1 DD DSNAME=PDS,DISP=(OLD,KEEP),VOL=SER=DEFVOL //SYSUT2 DD DSNAME=SDS,DISP=(NEW,KEEP),VOL=SER=DEFVOL, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=2000) //SYSIN DD * ./ CHANGE NEW=PS,NAME=MEMB1 CHANGE DATA1 00000200 ./ DELETE SEQ1=250,SEQ2=300 DELETE DATA2 00000275 ./ ENDUP /*
The first CHANGE sentence sets the output MEMB1 to SDS. The first DATA sentence is to replace a record whose sequence number is 200 by the specified data. The first DELETE sentence is to delete records from sequence number 250 to 300.
The second DATA sentence is to add the record whose sequence number is 275. As the records from sequence number 250 to 300 have been deleted, the record is added rather than replaced.
The following example adds a new record to PDS members.
//IEBUPDT5 JOB //STEP1 EXEC PGM=IEBUPDTE //SYSPRINT DD SYSOUT=A //SYSUT1 DD DSNAME=PDS,DISP=(OLD,KEEP),VOL=SER=DEFVOL //SYSUT2 DD DSNAME=PDS,DISP=(OLD,KEEP),VOL=SER=DEFVOL //SYSIN DD * ./ CHANGE NAME=MEMB1 ./ NUMBER SEQ1=150,NEW1=200,INCR=50,INSERT=YES INSERT DATA1 INSERT DATA2 INSERT DATA3 /*
The CHANGE sentence is to update MEMB1. The NUMBER sentence is to add new records after the record whose sequence number is 150, and the sequence number of the new records start from 200, and increment by 50.
The DATA sentences is to add records whose sequence numbers are 200, 250, and 300 respectively. If records between sequence number 200 and 300 already exist, the new records are added from sequence number 300. Such addition is repeated while a sequence number of the previously modified record is smaller than that of the next record.
11.4. Return Codes
The utility program prints the following batch execution results.
-
Upon success:
It returns the return code from the batch program.
-
In the case of an error:
Error messages are output to SYSPRINT DD and corresponding return codes are returned.
The following errors may occur in IEBUPDTE.
Code Description 12
Unrecoverable error. The causes include:
-
Data Set related (pgmdd, open/close, read/write) error
-
SYSIN DD command syntax error
-
OpenFrame system library initialization failure
-
Other IEBUPDTE program errors
-
12. IEHLIST
The utility extracts PDS data set information and lists of members in a PDS, or volume information and a list of data sets in a volume.
The utility program performs the following tasks:
-
Display PDS information and PDS member list.
-
Display disk information and data set list of a volume.
12.1. DD Statements
The following describes each DD statement.
Statement | Description |
---|---|
SYSPRINT DD |
Sets the data set where IEHLIST messages are stored. |
SYSIN DD |
Enters commands of IEHLIST. |
12.2. Command Usage
This section describes the IEHLIST commands used in SYSIN DD statements.
LISTPDS
The command displays the PDS information and the PDS member list.
The syntax of LISTPDS is as follows:
[label] LISTPDS DSNAME=(name[,name[,...]]) [,VOL=anyname=serial]
Parameter | Description |
---|---|
DSNAME |
Specifies the name of PDS data set. A maximum of 10 data sets can be specified. |
VOL |
Enters the serial number of the volume (volume name) that contains the data set specified in DSNAME. An arbitrary name must be given for the volume using the anyname parameter. The set anyname is for syntactical purpose only, thus it is ignored. |
LISTVTOC
The command displays the disk information and the data set list of a given volume.
The syntax of the LISTVTOC command is as follows:
[label] LISTVTOC [,VOL=anyname=serial] [,DSNAME=(name[,name[,...]])
Parameter | Description |
---|---|
VOL |
Enters the serial number of a volume. An arbitrary name must be given for the volume using the anyname parameter. The set anyname is for syntactical purpose only, thus it is ignored. |
DSNAME |
Specifies the name of a data set to display in the data set list. A maximum of 10 data sets can be specified. If the DSNAME parameter is not set, all data sets in the volume are searched and displayed in the data set list. |
12.3. Examples
The following example displays PDS information and the list of members in the PDS.
A summary of PDS DATASET1 and DATASET2 are printed to SYSPRINT.
//LISTPDS JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1), // USER=ROOT,PASSWORD=SYS1 //STEP01 EXEC PGM=IEHLIST //SYSPRINT DD SYSOUT=* //SYSIN DD * LISTPDS DSNAME=(DATASET1,DATASET2), VOL=disk=100000 /*
The following example displays volume disk information and the list of data sets in the volume.
Disk information is retrieved from a volume with serial number 100000, and the list of data sets in that volume is printed to SYSPRINT.
//LISTVOL JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //STEP01 EXEC PGM=IEHLIST //SYSPRINT DD SYSOUT=* //SYSIN DD * LISTVTOC VOL=disk=100000 /*
12.4. Return Codes
The utility program prints the following batch execution results:
-
Upon success:
It returns the return code from the batch program.
-
In the case of an error:
Error messages are output to SYSPRINT DD and corresponding return codes are returned.
The following errors may occur in IEHLIST:
Code Description 12
Unrecoverable error. The causes include:
-
Data Set related (pgmdd, open/close, read/write) error
-
SYSIN DD command syntax error
-
Other IEHLIST program errors
16
System fault. The cause is:
-
OpenFrame system library initialization failure
-
13. IEHPROGM
The utility is a tool to manage Non-VSAM data sets.
The IEHPROGM system utility program performs the following tasks:
-
Physically deletes a data set or a PDS member in a volume.
-
Catalogs or uncatalogs a data set.
The IDCAMS utility, described in IDCAMS, is similar to IEHPROGM. |
13.1. DD Statements
The following describes each DD statement.
Statement | Description |
---|---|
SYSPRINT DD |
Sets the data set where IEHPROGM messages will be stored. |
SYSIN DD |
Enters commands of IEHPROGM. |
13.2. Command Usage
This section describes the IEHPROGM commands used in SYSIN DD statements.
SCRATCH
The command deletes a data set or a PDS member that is physically stored as a file in the disk volume. If the data set is cataloged, the associated catalog entry is also deleted.
The syntax of the SCRATCH command is as follows:
[label] SCRATCH {VTOC|DSNAME=name},VOL=anyname=serial [,MEMBER=name][,SYS]
Parameter | Description |
---|---|
VTOC |
Deletes all data sets that exist in the specified volume. |
DSNAME |
Identifies the name of a data set to delete. |
VOL |
Specifies the disk volume of the data set specified in DSNAME. An arbitrary name must be given for the volume using the anyname parameter. The set anyname is for syntactical purpose only, thus it is ignored. |
MEMBER |
Deletes only the members of the PDS, and the name of the member to be deleted is specified. |
SYS |
Deletes only temporary data sets. For example, data sets that have a name starting with the ampersand (&) will be deleted. This parameter is available only when VTOC is specified. |
CATLG
Registers the basic information of Non-VSAM data set in the catalog.
The syntax of the CATLG command is as follows:
[label] CATLG DSNAME=name,VOL=anyname=serial
Parameter | Description |
---|---|
DSNAME |
Identifies the name of a data set to catalog. |
VOL |
Specifies the disk volume of the data set specified in DSNAME. An arbitrary name must be given for the volume using the anyname parameter. The set anyname is for syntactical purpose only, thus it is ignored. |
UNCATLG
Uncatalogs non-VSAM data sets registered in a catalog and delete the catalog entry for a data set in a catalog. However, it does not delete the physical data set file stored on a disk volume. To delete the physical file, use the SCRATCH command, and then use UNCATLG to delete any catalog entry associated with that file.
The syntax of the UNCATLG command is as follows:
[label] UNCATLG DSNAME=name
Parameter | Description |
---|---|
DSNAME |
Identifies the name of the data set to delete. |
13.3. Examples
The following example deletes the temporary data sets from VTOC that have serial number 100000.
//CATALOG JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //STEP1 EXEC PGM=IEHPROGM //SYSPRINT DD SYSOUT=* //VOLDD DD VOL=SER=100000,DISP=OLD //SYSIN DD * SCRATCH VTOC,VOL=SER=100000,SYS /*
The following example catalogs the TEST01 data set from the volume that has serial number 100000.
//CATALOG JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //STEP1 EXEC PGM=IEHPROGM //SYSPRINT DD SYSOUT=* //SYSIN DD * CATLG DSNAME=IEHPROGM.TEST01,VOL=SER=100000 /*
The following example deletes the TEST01 data set from the volume that has serial number 100000 and then deletes the cataloged TEST01 data set.
//CATALOG JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //STEP1 EXEC PGM=IEHPROGM //SYSPRINT DD SYSOUT=* //SYSIN DD * SCRATCH DSNAME=IEHPROGM.TEST01,VOL=SER=100000 UNCATLG DSNAME=IEHPROGM.TEST01 /*
13.4. Return Codes
The utility program prints the following batch execution results:
-
Upon success:
It returns the return code from the batch program.
-
In the case of an error:
Error messages are printed to SYSPRINT DD and corresponding return codes are returned.
The following errors may occur in IEHPROGM:
Code Description 8
Warning error. The possible causes include:
-
When data sets cannot be searched
12
Unrecoverable error. The causes include:
-
Data Set related (pgmdd, open/close, read/write) error
-
SYSIN DD command syntax error
-
Other IEHPROGM program errors
16
System fault. The possible causes include:
-
OpenFrame system library initialization failure
-
14. IFASMFDP
The utility is used to dump SMF data sets into general data sets and initialize the contents.
The IFASMFDP system utility program performs the following tasks:
-
Initializes SMF data sets.
-
Dumps SMF data sets into general user data sets.
The DFHJUP utility, described in DFHJUP, is similar to IFASMFDP. |
14.1. DD Statements
The following describes each DD statement.
Statement | Description |
---|---|
SYSOUT DD |
Specifies the data set in which IFASMFDP messages are stored. |
SYSIN DD |
Specifies commands of IFASMFDP. |
14.2. Command Usage
This section describes the IFASMFDP commands used in SYSIN DD statements.
INDD
The command specifies input data sets and the handling method.
The syntax of the INDD command is as follows:
INDD(ddname,OPTIONS(data))
Parameter | Description |
---|---|
INDD |
Specifies input data sets and the handling method. If this is omitted, the default is INDD(DUMPIN,OPTIONS(ALL)). |
ddname |
Specifies the ddnames for input data sets. |
data |
Specifies the handling method for the input data sets. One of the following can be selected:
|
OUTDD
The command specifies the list of output data sets and types of records to copy.
The syntax of the OUTDD command is as follows:
OUTDD(ddname,{TYPE(list),NOTYPE(list)})
Parameter | Description |
---|---|
OUTDD |
Specifies the range of output data sets and types of records to copy. If this is omitted, the default is OUTDD(DUMPOUT,TYPE(000:255)). |
ddname |
Specifies the ddnames of the output data sets. |
TYPE |
Enumerates record types to include in the list when copying the records to the output data sets. |
NOTYPE |
Enumerates record types to exclude in the list when copying the records to the output data sets. |
list |
Enumerates record types with the following 3 methods. The delimiter is a comma (,).
|
DATE
The command specifies the range of dates for records to copy.
The syntax of the DATE command is as follows:
DATE({yyddd|yyyyddd},{yyddd|yyyyddd})
Parameter | Description |
---|---|
DATE |
Copies the records written from the day specified by the first parameter to the day specified by the second parameter. If this is omitted, the default is DATE(1900000,2099366). |
yyddd |
Specifies the dddth day in 19yy. The range of ddd is between 001 and 366. |
yyyyddd |
Specifies the dddth day in yyyy. The range of ddd is between 001 and 366. |
START
The command specifies the start time for copying records.
The syntax of the START command is as follows:
START(hhmm)
Parameter | Description |
---|---|
START |
Specifies the start time in the format of hhmm. If this is omitted, the default is START(0000). |
hhmm |
hh denotes the hour (24 hour-base) and mm denotes the minute. |
END
The command specifies the end time for copying records.
The syntax of the END command is as follows:
END(hhmm)
Parameter | Description |
---|---|
END |
Specifies the end time in the format of hhmm. If this is omitted, the default is END(2400). |
hhmm |
hh denotes the hour (24 hour-base) and mm denotes the minute. |
SID
The command copies records that meet the specified system ID.
The syntax of the SID command is as follows:
SID(XXXX)
Parameter | Description |
---|---|
SID |
Copies SMF records written with a specific system ID to the output data sets. If this is omitted, the SID field is ignored. |
xxxx |
System ID that consists of one to four alphabetical characters. |
14.3. Examples
The following example dumps and clears the SMF data set given as INDD1, dumps the SMF data set given as INDD2, and creates OUTDD1, OUTDD2, and OUTDD3.
Only records created from January 1st, 2009 to January 2nd, 2009 are extracted. Record types 0, 2, 10, and 15 - 40 are stored in OUTDD1, and record types 10 - 255 are stored in OUTDD2 and OUTDD3.
//SMFDUMP JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) //STEP EXEC PGM=IFASMFDP //SYSOUT DD SYSOUT=* //INDD1 DD DSN=SMLOG.DATA1,DISP=SHR //INDD2 DD DNS=SMLOG.DATA2.DISP=SHR //OUTDD1 DD DSN=SMF.DUMP1,DISP=SHR,DCB=LRECL=32760 //OUTDD2 DD DSN=SMF.DUMP2,DISP=SHR,DCB=LRECL=32760 //OUTDD3 DD DSN=SMF.DUMP3,DISP=SHR,DCB=LRECL=32760 //SYSIN DD * INDD(INDD1,OPTIONS(ALL)) INDD(INDD2,OPTIONS(DUMP)) OUTDD(OUTDD1,TYPE(0,2,10,15:40)) OUTDD(OUTDD2,TYPE(10:255)) OUTDD(OUTDD3,TYPE(10:255)) DATE(2009001,2009002) /* //
14.4. Return Codes
The utility program outputs the following batch execution results:
-
Upon success:
It returns the return code from the batch program.
-
In the case of an error:
Error messages are printed to SYSPRINT DD and corresponding return codes are returned.
The following errors may occur in IFASMFDP:
Code Description 0
Indicates the utility program has performed successfully.
8
Indicates the utility program has stopped due to a significant error. It occurs in the following cases:
-
Script parsing failed
-
Data Set cannot be used
-
OpenFrame system library initialization failed
-