RECFM parameter - IBM-JCL

Parameter Type

Keyword, optional

Purpose

Use the RECFM parameter to specify the format and characteristics of the records in a new data set. All the format and characteristics must be completely described in one source, that is, in the data set label of an existing data set, in the DCB macro, in the DD DCB parameter, or in the DD RECFM parameter. However, the processing program can modify the RECFM field in the DCB.

Code the RECFM parameter when you want to (1) specify the record format for the data set or (2) with SMS, override the record format defined in the data class of the data set.

The syntax of the RECFM parameter is described in the following topics:

  • Coding RECFM for BDAM Access Method
  • Coding RECFM for BPAM Access Method
  • Coding RECFM for BSAM, EXCP, and QSAM Access Methods
  • Coding RECFM for QISAM Access Method
  • Coding RECFM for TCAM Access Method

1.Coding RECFM for BDAM Access Method

Syntax: BDAM Access Method

Coding RECFM for BDAM Access Method  Syntax: BDAM Access Method

2.Coding RECFM for BPAM Access Method

Syntax: BPAM Access Method

Coding RECFM for BPAM Access Method  Syntax: BPAM Access Method

3.Coding RECFM for BSAM, EXCP, and QSAM Access Methods

Syntax: BSAM, EXCP, and QSAM Access Methods

Coding RECFM for BSAM, EXCP, and QSAM Access Methods  Syntax: BSAM, EXCP, and QSAM Access Methods

4.Syntax: QISAM Access Method

Syntax: QISAM Access Method

Coding RECFM for TCAM Access Method
Syntax: TCAM Access Method

Coding RECFM for TCAM Access Method Syntax: TCAM Access Method

5.Overrides
RECFM overrides the record format specified in the data set label, and with SMS, RECFM overrides the record format defined in the DATACLAS parameter for the data set.

6.Relationship to Other Parameters
Do not code the following DD parameters with the RECFM parameter.

* DDNAME AMP DYNAM DATA RECORG DCB=DSORG DCB=RECFM

7.Examples of the RECFM Parameter

Example

//DD1B DD DSNAME=EVER,DISP=(NEW,KEEP),UNIT=3380, // RECFM=FB,LRECL=326,SPACE=(23472,(200,40))

In the example, the record format of fixed block (FB) is used for the new data set EVER.

Example

//SMSDS6 DD DSNAME=MYDS6.PGM,DATACLAS=DCLAS06,DISP=(NEW,KEEP), // RECFM=FB

In the example, the record format of fixed block (FB) overrides the record format defined in the data class for the data set.

RECORG Parameter

Parameter Type

Keyword, optional — use this parameter only with SMS

Without SMS, see the AMP parameter described.

Purpose
Use the RECORG parameter to specify the organization of the records in a new VSAM data set.

Code the RECORG parameter when you want to (1) specify the record organization for the data set or (2) override the record organization defined in the data class of the data set.

If SMS is not installed or is not active, the system syntax checks and then ignores the RECORG parameter.

1.Syntax

{KS} RECORG= {ES} {RR} {LS}

2.Subparameter Definition

KS
Specifies a VSAM key-sequenced data set.
ES
Specifies a VSAM entry-sequenced data set.
RR
Specifies a VSAM relative record data set.
LS
Specifies a VSAM linear space data set.

3.Defaults
If you do not specify RECORG, SMS assumes a physical sequential (PS) or
partitioned (PO) data set.

4.Overrides
The RECORG parameter overrides the record organization defined in the DATACLAS parameter for the data set.

5.Relationship to Other Parameters
Do not code the following DD parameters with the RECORG parameter.

* DDNAME DATA DSNTYPE DCB=DSORG DYNAM DCB=RECFM RECFM FREE=CLOSE

6.Example of the RECORG parameter

//SMSDS3 DD DSNAME=MYDS3.PGM,DATACLAS=VSAM1,DISP=(NEW,KEEP), // RECORG=KS

In the example, the record organization of key-sequenced (KS) overrides the record organization defined in the data class.

REFDD parameter

Parameter Type

Keyword, optional — use this parameter only with SMS

Without SMS, use the DCB=*.ddname form of the DCB parameter described.

Purpose

Use the REFDD parameter to specify attributes for a new data set by copying attributes of a data set defined on an earlier DD statement in the same job.

The following attributes are copied to the new data set from (1) the attributes specified on the referenced DD statement, and (2) for attributes not specified on the referenced DD statement, from the data class of the data set specified by the referenced DD statement:

  • Data set organization
  • – Record organization (RECORG) or
    – Record format (RECFM)
  • Record length (LRECL)
  • Key length (KEYLEN)
  • Key offset (KEYOFF)
  • Type, PDS or PDSE (DSNTYPE)
  • Space allocation (AVGREC and SPACE)

Only RECFM and LRECL apply to tape data sets. REFDD does not copy DCB attributes from the data set label.

If SMS is not installed or is not active, the system checks the syntax and then ignores the REFDD parameter. The retention period (RETPD) or expiration date (EXPDT) is not copied to the new data set.

Note: Do not use the REFDD parameter to copy attributes from a temporary data set (&&dsname), partitioned data set if a member name is included, and relative generation number for a GDG.

1.Syntax

{*.ddname } REFDD= {*.stepname.ddname } {*.stepname.procstepname.ddname}

2.Subparameter Definition

*.ddname
*.stepname.ddname
*.stepname.procstepname.ddname
Specify a backward reference to an earlier DD statement. The referenced DD statement cannot name a cataloged data set or refer to another DD statement.

*.ddname
Specifies the ddname of an earlier DD statement in the same step.

*.stepname.ddname
Specifies the ddname of a DD statement in an earlier step, stepname, in the same job.

*.stepname.procstepname.ddname
Specifies the ddname of a DD statement in a cataloged or in-stream procedure called by an earlier job step. Stepname is the name of the job step that calls the procedure and procstepname is the name of the procedure step that contains the DD statement.

Do not reference a DD * or a DD DATA statement.

3.Overrides
Any attributes specified on the referenced DD statement override the
corresponding data class attributes of the referenced data set.

Any attributes you specify on the referencing DD statement with the following parameters override the corresponding attributes obtained from the referenced DD statement and the data class attributes of the referenced data set.

RECORG (record organization) or RECFM (record format)
LRECL (record length)
KEYLEN (key length)
KEYOFF (key offset)
DSNTYPE (type, PDS or PDSE)
AVGREC (record request and space quantity)
SPACE (average record length, primary, secondary, and directory quantity)

4.Relationship to Other Parameters

Do not code the following DD parameters with the REFDD parameter.

DYNAM LIKE

5.Examples of the REFDD Parameter

Example

In the example, the data set attributes used for MYDS7.PGM are obtained from the referenced data set MYDS6.PGM.

Example

In the example, the data set attributes used for MYDS8.PGM are obtained from the referenced data set MYDS6.PGM. Also, the logical record length of 1024 overrides the logical record length obtained from the referenced data set.

RETPD Parameter

Parameter Type

Keyword, optional

Purpose
Use the RETPD parameter to specify the retention period for a new data set to help reduce the chance of later accidental deletion. After the retention period, the data set can be deleted or written over by another data set.

If the DD statement contains DISP=(NEW,DELETE) or the DISP parameter is omitted to default to NEW and DELETE, the system deletes the data set when the step terminates normally or abnormally, even though a retention period is also specified.

Do not specify RETPD for a temporary data set. The RETPD parameter achieves the same result as the EXPDT parameter.

Code the RETPD parameter when you want to (1) specify a retention period for the data set or (2) with SMS, override the retention period defined in the data class for the data set.

1.Syntax

RETPD=nnnn
  • The RETPD parameter can have a null value only when coded on a DD which either:
  • – Overrides a DD in a procedure
    – Is added to a procedure.

2.Subparameter Definition
nnnn
Specifies the retention period, in days, for the data set. The nnnn is one through four decimal digits (0 - 9999). The system adds nnnn to the current date to produce an expiration date. For SMS data sets, the system adds nnnn to the data set creation date to produce an expiration date. The calculated expiration date uses 365-day years and 366-day leap years.

Note: If you code RETPD and the calculated expiration date is December 31, 1999, the expiration date is set to January 1, 2000.

3.Overrides
With SMS, RETPD overrides the retention period defined in the DATACLAS parameter for the data set. With SMS, both the retention period specified on RETPD and defined in the data class for an SMS-managed data set can be limited by a maximum retention period defined in the management class for the data set.

4.Relationship to Other Parameters
Do not code the following DD parameters with the RETPD parameter.

* DYNAM DATA EXPDT DDNAME SYSOUT

5.Deleting a Data Set Before its Retention Period Passes
To delete a data set before the retention period has passed, use one of the following:

  • For data sets cataloged in an integrated catalog facility catalog, use the DELETE command, as described in z/OS DFSMS Access Method Services for Catalogs.
  • For data sets not cataloged in an integrated catalog facility catalog, use the IEHPROGM utility, as described in z/OS DFSMSdfp Utilities.
  • For a non-VSAM data set, use the SCRATCH macro with the OVRD parameter, as described in z/OS DFSMSdfp Advanced Services.
  • The system operator can reply ²u² to the IEC507D message prompt to delete unexpired data sets.
  • You can override the retention period for SMS-managed DASD data sets by specifying OVRD_EXPDT(YES) in the IGDSMSxx SYS1.PARMLIB member and specifying DELETE on the DD DISP statement. The data set will be deleted whether or not the retention period has passed.

6.Examples of the RETPD Parameter

Example

//DD1 DD DSNAME=HERBI,DISP=(NEW,KEEP),UNIT=TAPE, // VOLUME=SER=T2,LABEL=(3,NSL),RETPD=188

In the example, the data set is not eligible for being deleted or written over for 188 days.

Example

//SMSDS2 DD DSNAME=MYDS2.PGM,DATACLAS=DCLAS02,DISP=(NEW,KEEP), // RETPD=732

In the example, the retention period of 732 days overrides the retention period defined in the data class for the data set.

RLS parameter

Parameter Type

Keyword, optional

Purpose

You can, on a system that includes MVS/DFSMS Version 1 Release 3 or higher, use the RLS parameter to specify the level of record sharing, or sharing protocol, for a VSAM data set containing records that must be shared.

Note: RLS is most useful for an existing application. For a new or heavily-modified application, you can request record-level sharing in application code and do not need to specify RLS on the DD statement.

1.Syntax

RLS= {NRI} {CR }

2.Subparameter Definition

NRI
Specifies ²no read integrity² (NRI). The application can read all records. Use this subparameter if the application can read uncommitted changes made to a data set by another application. NRI provides better performance than the CR subparameter because it avoids the overhead of obtaining a lock when reading a record from the data set.

CR
Specifies ²consistent read² (CR). This subparameter requests VSAM to obtain a SHARE lock on each record the application reads. This ensures the application will not read uncommitted changes made to a data set by another application. VSAM obtains the lock while processing a GET NUP request, and releases the lock before completing the GET request. An application that processes a data set allocated with RLS=CR may require modification if it tries to read changes to the data set.

3.Overrides
Specifying RLS does not override any other JCL parameter.

4.Relationship to Other Parameters
Do not code the following DD parameters with the RLS parameter:

* DSNTYPE PATHDISP AMP DYNAM QNAME BURST FLASH SEGMENT CHARS FREE SPIN COPIES MODIFY SYSOUT DATA OUTPUT TERM DCB (see Note) PATH UCS DDNAME PATHOPTS DLM PATHMODE

Note: You can code RLS with DCB as long as the only DCB subparameters you specify are KEYLEN and LRECL.

5.Examples of the RLS Parameter

Example

// EXEC PGM=BATCHPRG //DD1 DD DSN=A,RLS=NRI,DISP=SHR

When the program BATCHPRG opens DD1, the data set is to be processed as a shared resource. NRI specifies that an application can read uncommitted changes made by other applications.

Example

// EXEC PGM=BATCHPRG //DD2 DD DSN=B,RLS=CR,DISP=SHR

When the program BATCHPRG opens DD2, the data set is to be processed as a shared resource. CR specifies that an application can read only committed changes made by other applications.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM-JCL Topics