Pages

Wednesday, July 25, 2012

Additional Statement Parameters

Your basic jobstream is established, the stubs are coded, and your JOB statement is complete.
In this unit, you will learn about the EXEC statement parameters and see if any need to be added to your jobstream.

You will also learn about the parameters used for DD statements that deal with instream data sets, messages, and reports.

After completing this unit, you should be able to:

  • Add PROC or PGM parameters to EXEC statements

  • List other parameters that can be used on the EXEC statement

  • Use the *, DATA, and DUMMY positional parameters to define input in the DD statement

  • Code the SYSOUT keyword parameter to define output in the DD statement


Topic 6.1: The EXEC statement

*Reviewing the Statement
The program uses the EXEC statement to provide information about job steps.
//stepname   EXEC   parameters   comments
The EXEC statement format is shown above. Here's what each field means.
Examine the following table
Portion Description
stepname Name of the job step
EXEC The type of statement
parameters List of parameters and their values
or subparameters
comments Any comments you choose to add


*The Positional Parameters
The EXEC statement has two positional parameters that must be coded before any of the keyword parameters. (These positional parameters cannot be used at the same time.)
  • PGM: the program to be executed in the step

  • PROC: the procedure to be called, or procedure name, a shortened form of PROC=procedure name


*The PGM Parameter
PGM=program name
The PGM parameter designates the name of the program to be executed in this step.
PGM=CUST01
If you code the PGM parameter, do not code the PROC parameter on the same EXEC statement.
If the program specified in the PGM parameter can't be located, the step abnormally ends.

*The PROC Parameter
PROC=procedure name
or
procedure name
The PROC parameter designates the procedure to be executed in this job step. Notice that the PROC parameter has a short form or default which is the same as the PROC parameter with "PROC=" omitted.
EXEC PROC=LINK is the same as EXEC LINK
If you code the PROC parameter, do not code the PGM parameter on the same EXEC statement.


   //PRINTIT  JOB  0078963,TEST,TIME=(,45)
                    
   //SYSUT1   DD
   //SYSUT2   DD
   //SYSPRINT DD
   //SYSIN    DD
   //
*Completed EXEC Statement
Although your EXEC statement does not require any additional parameters, let's briefly review the PARM parameter and then see what other parameters are available.

*The PARM Parameter
PARM=information
The PARM parameter allows a program to receive input. The format, type, and content of the information are defined by the program.
PARM=ANNUAL is an example of the PARM parameter with a single subparameter.
Many utilities, compilers, linkage editors, as well as application programs use the PARM field to change the options in effect or signal special processing. One example is to indicate year-end processing.

*Same Keyword Parameters
Many of the keyword parameters from the JOB statement are also available on the EXEC statement. They include:
Examine the following table
ADDRSPC RD
COND REGION
PERFORM TIME

These parameters set specifications and limits as follows:
  • on the JOB statement for the entire job
  • on the EXEC statement for the job step



*Additional EXEC Parameters
Examine the following table
Parameter Description
ACCT Specifies the accounting information
ADDRSPC Indicates the type of storage the job needs
COND Sets the criteria to bypass or execute this step
DYNAMNBR Holds the number of data set allocations for reuse
PERFORM Assigns a performance group to a job step
RD Defines step restart and checkpoint processing
REGION Specifies the amount of storage the step needs
TIME Specifies the maximum CPU time the step may use



ACCT is like the accounting field on the JOB statement except that it is a keyword parameter rather than positional. It allows you to specify the accounting information for the step only.



ADDRSPC can be set to VIRT for steps that can run in virtual storage. These steps can be paged by the system. If you do not want the system to page a job step, set ADDRSPC to REAL. The system must place the job in central or real storage.



COND specifies the criteria that the return code is tested against for this job step. The system assumes that the step coded is to be processed unless the specified criteria are met. Since this parameter is hard to understand, you can use the IF/THEN/ELSE construct instead.



DYNAMNBR specifies the number (1-3273) of data set allocations that the system can hold for reuse.



PERFORM sets a job step's performance group. This determines a step's performance criteria — how quickly it is given CPU resources. Your installation defines the characteristics of each performance group and controls their use.



RD indicates if automatic step restart is to be performed by the operator if the step fails. It also controls the execution or suppression of the CHKPT macro instruction and the DD statement CHKPT parameter.



REGION specifies the amount of storage in either kilobytes (K) or megabytes (M) that a step requires. If this parameter is omitted, an installation default is assigned.



TIME is specified for the step in the same manner as for the job. You may specify the maximum time in minutes and/or seconds. If the step exceeds the time specified, the job abends — even if there is more time for the entire job.


Topic 6.2: The DD Statement

*The Jobstream So Far
Your basic jobstream is established, the stubs are coded and your JOB and EXEC statements are complete. It is now time to move on to the DD statements.
Here is the sample jobstream as you have coded it so far. The DD statements can be placed in any order as long as they follow the EXEC statement.
//PRINTIT  JOB  0078963,TEST,TIME=(,45)
//STEP1    EXEC PGM=IEBGENER
//SYSUT1   DD     
//SYSUT2   DD     
//SYSPRINT DD     
//SYSIN    DD     
//
*Reviewing the Statement
//ddname   DD   parameters   comments
The format of the DD (Data Definition) statement is shown here. The statement has these fields:
Examine the following table
Portion Description
ddname The data definition name
DD The type of statement
parameters List of parameters on the DD statement
comments Any comments you care to include


*The Positional Parameters
Let's look at what positional parameters you might use to complete the SYSIN DD statement. The SYSIN DD statement contains control parameters for the IEBGENER program. You can code these directly in your JCL as an instream data set.
Two positional parameters on the DD statement that are discussed here allow you to begin an instream data set.
  • * for instream data that doesn't contain JCL
  • DATA for instream data that contains JCL
Another positional parameter that you will see can be used when you do not require a data set for a particular run. For example, when your run of IEBGENER does not require any control parameters.
  • DUMMY for when a data set is not accessed


*The * Parameter
The * parameter specifies that data for a processing program immediately follows the DD statement.
This parameter provides one method for reading instream data sets. It reads data without // or /* in positions 1 and 2.
The following JCL statements use the * parameter:
//STEP1      EXEC  PGM=READDATA  
//MYDATA  DD    *  
instream data that doesn't contain JCL  
/*
The system reads the statements following a //ddname DD * statement as instream data until another JCL statement (//) or a delimiter (/*) statement is encountered.

*The DATA Parameter
If you need to include JCL statements as part of your instream data set you must use the DATA parameter and end the input with a /* delimiter.
The following JCL statements use the DATA parameter:
//STEP1       EXEC  PGM=READDATA  
//MYDATA  DD      DATA  
instream data that contains JCL
//RPT           DD     SYSOUT=A               
/*
The system reads the statements following a //ddname DATA statement as instream data, including other JCL statements (//), until a delimiter (/*) statement is encountered.

*The DUMMY Parameter
Sometimes a data set will not be used for a particular run of a jobstream. For example, your run of the IEBGENER program does not require any control parameters. In this case, use the DUMMY parameter.
The DUMMY parameter specifies that
  • No device or external storage space is allocated.
  • No disposition processing is performed.
  • No input or output operations are performed for the data set if it is sequential.
However, if your program requires DCB (Data Control Block) information you must code a DCB parameter. You don't have to worry about this now, as it is not required. You'll see the DCB parameter later.




*One Keyword Parameter
Now, review one keyword parameter that you need to define your output print data sets — SYSUT2 and SYSPRINT.
SYSOUT assigns the data set to an output class.
Many other keyword parameters are available for the DD statement. You will cover the more commonly used ones in a later course.

*The SYSOUT Parameter
SYSOUT=class
The SYSOUT parameter directs printed output to the appropriate print class, form, or special program for output. The class specifies the output queue that the output is placed in until it is selected by a printer. Class is a one position, alphanumeric character that can have the values A-Z, 0-9, or *.
//PRINTFIL  DD SYSOUT=A
Find out the valid classes at your installation. Using invalid class assignments can result in
  • Your print job not being selected for print
  • Your print job printing at the wrong location
  • Operator problems



   //PRINTIT  JOB  0078963,TEST,TIME=(,45)
   //STEP1    EXEC PGM=IEBGENER
  
   //SYSUT2   DD   SYSOUT=A
   //SYSPRINT DD   SYSOUT=A
   //SYSIN    DD   DUMMY
   //
*Other DD Parameters
Most of the coding is done. You just have one statement to go — the SYSUT1 DD statement. This is the statement that accesses your input data set.
Let's look briefly at the other parameters that the DD statement has. The parameters are separated into four categories — frequently used, infrequently used, controlling output, and used by SMS (Storage Management Subsystem).

*Frequently Used Parameters
The following list of parameters are ones that you will see and/or code frequently in JCL.
Examine the following table
Parameter Description
DCB Completes the data control block for the data set
EXPDT Specifies the expiration date
LABEL Gives information about the data set label
LRECL Indicates the logical record length
RECFM Specifies the format and characteristics of records
RETPD Specifies the data set retention period
SPACE Requests space for a new data set on DASD (disk)
UNIT Requests a device for the data set
VOLUME Identifies the volume(s) where the data set resides
DISP Describes the status of the data set
DSNAME Identifies the data set name
BLKSIZE Specifies the length of a block



The DCB parameter contains many subparameters such as BLKSIZE (block size), LRECL (logical record length), and RECFM (record format). These specify the data set attributes contained in the data control block.



Use EXPDT to specify the date when the data set can be deleted or written over by another data set.



LABEL is used for both tape and disk data sets. It can specify the data set sequence number, type of label, password, if the data set is opened for input or output, and the expiration date or retention period.



Code LRECL to specify the length of the records in a new data set.



RECFM specifies if the records in a new data set have fixed, variable, or undefined length; if they are blocked; and other less frequently used characteristics such as containing machine code control characters.



Use RETPD to specify the number of days a data set is kept before it can be deleted or written over by another data set.



The SPACE parameter specifies the amount of space in tracks, cylinders, blocks or average record length required for a data set on a direct access storage device (DASD). Both a primary and secondary allocation can be specified.



The UNIT parameter can request a device specifically by number, by its generic name, or by a group name. It can also tell the system how many devices to allocate to the data set and whether the volume should be mounted when the data set is allocated or deferred until it is opened.



The VOLUME parameter specifies the volume serial number, if it is a private volume, whether it should be retained after the data set is closed for further processing, the volume sequence number of a multi-volume data set, and the maximum number of volumes an output data set requires.



DISP assigns a status of NEW, OLD, MOD, or SHR. It also tells the system what to do with the data set if the step ends normally or abnormally.



DSNAME gives a name for the system to assign to a new data set or to use to locate an existing data set.



BLKSIZE specifies the maximum length for a block in bytes.


*Infrequently Used Parameters
This list contains parameters that you may come across infrequently, if at all.
Examine the following table
Parameter Description
AMP Completes the access method control block for VSAM data sets
ACCODE Specifies or changes the accessibility code
CHKPT Writes a checkpoint at each end-of-volume except the last
CNTL References a previous CNTL/ENDCNTL group
DDNAME Postpones data set definition until later in the job step
DLM Specifies a special delimiter for instream data
DSID Identifies 3540 diskette data sets
FREE Specifies when data set resources are closed
HOLD Holds a SYSOUT data set until it is released
KEYLEN Specifies the key length of a new data set
DYNAM Increases dynamically-controlled resources held for reuse
PROTECT Requests RACF protection for a data set
QNAME Designates a data set containing TCAM messages
SUBSYS Specifies the subsystem to process the data set
TERM Indicates a TSO user data set



The AMP parameter contains many subparameters such as CROPS (checkpoint/restart) and RECFM (record format). These specify the information contained in the access method control block for VSAM data sets.



The ACCODE parameter specifies or changes the accessibility code for ISO/ANSI/FIPS Version 3 tape output data sets only. The code is written to tape. If the code is authorized, the job can use the data set. If not, the job is abnormally terminated.



The CHKPT parameter requests that a checkpoint be written when an end-of-volume condition is reached for either input or output multi-volume data sets. A checkpoint is not written for the last end-of-volume condition.



The CNTL statement references a CNTL/ENDCNTL group defined earlier in the jobstream. The system executes the program control statements contained within the group.



The DDNAME parameter is placed on a DD statement in either a job step or procedure step to reference a data set defined later in the job set. This parameter also lets you do a backward reference to a DD statement defined earlier.



Use the DLM parameter when you want to end your instream data other than with the standard /* or // delimiters.



The DSID parameter specifies the ID of an input or output data set on a 3540 diskette.



The FREE parameter specifies if a data set's resources are to be freed when the data set is closed or at the end of the step.



The HOLD parameter holds a SYSOUT data set. A TSO user can then retrieve the data set and view its contents at the terminal. The data set is held until it is released by the system operator.



KEYLEN specifies the number of bytes used for a key in a new data set.



DYNAM provides compatibility with older systems. It increases the control value by one.



Use PROTECT to request RACF protection for a disk data set, a tape data set or a tape volume if RACF is active.



TCAM is a telecommunications access method. Use QNAME to tell the system that the DD statement defines a data set that contains TCAM messages.



The SUBSYS parameter identifies the subsystem you want to process the data set. You can also specify parameters passed to the subsystem.



The TERM parameter specifies that the data set is either coming from or going to a TSO user's terminal.


*Output Parameters
This list of parameters controls output.
Examine the following table
Parameter Description
BURST Directs the output to the proper stacker on a 3800
CHARS Names a character-arrangement table for a 3800
COPIES Specifies the number of copies of the data set to print
DEST Specifies a SYSOUT data set's output destination
FCB Defines the forms control used in printing
FLASH Specifies the forms overlay used
MODIFY Specifies the copy-modification module used while printing
OUTLIM Limits records written to the SYSOUT data set
OUTPUT Links an OUTPUT JCL statement with a SYSOUT data set
UCS Specifies the character set used in printing
SPIN Specifies when SYSOUT output can print



Use the BURST parameter to direct the output to a stacker on the 3800 printer. You can burst the output into separate sheets or keep it in continuous fanfold style.



The SYSOUT data set can use one or more character-arrangement tables to translate output when printing to a 3800. The CHARS parameter can also request a high-density dump.



The COPIES parameter specifies the number of copies of a data set that are printed. If you are using a 3800 printer you can also specify how many copies of each page are to print before the next page is printed.



The DEST parameter specifies the local or remote device or node where the sysout data set is sent.



FCB specifies the carriage control tape for 1403 printers, the data protection image for 3525 card punch, or the forms control buffer for most other printers. The FCB image specifies the lines per inch and page size used in printing.



On a 3800 printer the FLASH parameter specifies the name of the form to be overlaid while printing. You can also specify the number of copies to print.



The MODIFY parameter is used on the 3800 printer to name the copy-modification module that is used to orchestrate printing. The module can specify legends, column headings, where and on which copies the data is printed.



The OUTLIM parameter specifies the number of records written to a spooled data set.



The OUTPUT parameter references an OUTPUT JCL statement that contains output processing parameters for the data set. The data set is processed with options from this DD and the OUTPUT JCL statement.



The UCS parameter specifies the universal character set image, print train for impact printer, or character-arrangement table for 3800 printers used for printing SYSOUT data sets.



SPIN specifies whether the output from SYSOUT data sets can print immediately upon unallocation or must wait until the end of the job.


*Storage Management Subsystem
In a later course you will get a brief introduction to a facility called SMS, or the Storage Management Subsystem. Data sets managed by this facility are much easier to allocate. Let's look at some Storage Management Subsystem parameters.
Be careful if you use them. SMS parameters are installation-dependent and must be defined correctly or they will be ignored in your JCL.

*SMS Parameters
Here are the parameters used by SMS.
Examine the following table
Parameter Description
DATACLAS Identifies the data class for the data set
STORCLAS Indicates the storage class for the data set
MGMTCLAS Specifies the management class for the data set
AVGREC Requests the space allocation for the data set in records
DSNTYPE Specifies the data set as a PDS, PDSE, HFS or FIFO
KEYOFF Specifies the key offset for a new VSAM data set
LIKE Specifies the attributes from a model data set
RECORG Specifies how a VSAM data set's records are organized
REFDD Specifies the attributes from a DD-defined data set
SECMODEL Specifies the RACF profile



DATACLAS specifies the data class for the data set. The data class is defined by the storage administrator.



STORCLAS specifies the storage class for the data set. The storage class is defined by the storage administrator.



MGMTCLAS specifies the management class for the data set. The management class is defined by the storage administrator.



When you define a new data set you can request that the space allocated be calculated by the number of records you anticipate creating. AVGREC overrides the space defined by the data set's data class.



The DSNTYPE parameter specifies the data set type or overrides the data class DSNTYPE. It can specify either a PDS, PDSE, HFS or FIFO. A PDSE is similar to a PDS but contains only data. An HFS is similar to a PDSE and is used by OpenMVS. The FIFO is where data is written on a first-in- first-out basis and is also called a named pipe.



KEYOFF is used to override the Relative Key Position (RKP) of a VSAM key-sequenced data set. Using KEYOFF, the first byte of a VSAM logical record is position zero.



The LIKE parameter copies the attributes for a new data set from a model data set. This data set must exist and be cataloged. The copied attributes can be overridden on your JCL.



RECORG specifies the record organization in a VSAM data set. This parameter can override the record organization defined by a data class.



The REFDD parameter copies the attributes for a new data set from a data set defined on a prior DD statement in the jobstream. These attributes override any defined by the data set's data class. These attributes can also be overridden on your JCL.



SECMODEL copies an existing RACF profile for a new data set when there is no default profile or when you want to change the default profile.


Topic 6.3: Unit 6 Summary

In this unit you learned the following:
  • The format of the EXEC statement is
    //stepname   EXEC   parameters   comments

  • The PGM parameter designates the name of the program to be executed in this step.

  • The PROC parameter designates the procedure to be executed in this job step. The PROC parameter has a short form, or default, which is the same as the PROC parameter with "PROC=" omitted.

  • The PARM parameter allows a program to receive input. The format, type, and content of the information are defined by the program.

  • Many of the keyword parameters from the JOB statement are also available on the EXEC statement. These parameters set specifications and limits as follows:

    on the JOB statement for the entire job
    on the EXEC statement for the job step

  • The format of the DD statement is
    //ddname   DD   parameters    comments

  • The * parameter specifies that data for a processing program immediately follows the DD statement. The system reads the statements following a //ddname DD * statement as instream data until another JCL statement (//) or a delimiter (/*) statement is encountered.

  • If you need to include JCL statements as part of your instream data you must use the DATA parameter. The system reads the statements following a //ddname DATA statement as instream data, including other JCL statements (//), until a delimiter (/*) statement is encountered.

  • Sometimes a data set will not be used for a particular run of a jobstream. In this case, use the DUMMY parameter.

  • The SYSOUT parameter directs printed output to the appropriate print class, form or special program for output. The class specifies the output queue that the output is placed in until it is selected by a printer.

No comments:

Post a Comment