jclb unit 3
DESCRIPTION
JCLTRANSCRIPT
![Page 1: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/1.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved.
![Page 2: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/2.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 2 of 58
UNIT Modifying EXEC Parameters
Analyzing Procedures
Changing EXEC Parameters
Override Statements
Nullification Statements
Addition Statements
Sequencing Multiple Changes
Topics:
![Page 3: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/3.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 3 of 58
Before using a procedure it is essential to ensure that it meets all the processing requirements. This mightinvolve some minor alterations to the procedure to ensure that it has all the requirements to execute the job.
This unit describes how to alter EXEC statement parameters at the time of job submission. The informationcontained in this unit can be applied to both in-stream and cataloged procedures.
Unit Introduction
Unit: Modifying EXEC Parameters
Introduction
![Page 4: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/4.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 4 of 58
At the end of this unit, you will be able to:
• Specify what factors determine if a procedure meets the requirements of a job
• Invoke a procedure, making temporary alterations to it if necessary
• Add, override or nullify parameters on procedure step EXEC statements
• Correctly sequence multiple changes to EXEC statement parameters
Unit Objectives
Unit: Modifying EXEC Parameters
Introduction
![Page 5: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/5.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 5 of 58
UNIT Modifying EXEC Parameters
Analyzing Procedures
Changing EXEC Parameters
Override Statements
Nullification Statements
Addition Statements
Sequencing Multiple Changes
Topics:
![Page 6: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/6.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 6 of 58
At the end of this topic, you will be able to:
• Analyze a procedure listing
Topic Objectives
Unit: Modifying EXEC Parameters Topic: Analyzing Procedures
Introduction
![Page 7: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/7.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 7 of 58
A procedure listing is obtained and examined toensure that it meets the following two criteria:
• The procedure invokes the proper programs in the desired sequence
• Most of the DD statements are usable without major alteration
Identifying Analysis Criteria
Unit: Modifying EXEC Parameters Topic: Analyzing Procedures
Concepts
![Page 8: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/8.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 8 of 58
Consider a case in which a company buys goodswholesale from several manufacturers andmarkets them retail to other customers.
Each week the customer order departmentcreates a transaction file that contains newcustomer orders for the week.
A list of orders to be filled is sent to thewarehouse and an invoice is sent to eachcustomer. The order list and associated invoicesare printed once a week.
Identifying Analysis Criteria - An Example
Unit: Modifying EXEC Parameters Topic: Analyzing Procedures
Continued…Concepts
![Page 9: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/9.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 9 of 58
A program named PROG1 checks the weeklyinput transactions against entries in a mastercustomer data set. Valid transactions are writtento a new data set used as input for anotherprogram named PROG2.
PROG1 refers to the following data sets:
DD1: Refers to the input transactions
DD2: Refers to the master customer data set
DD3: Refers to the transaction exception report
DD4: Refers to the set of valid transactions that are passed to PROG2
Identifying Analysis Criteria - An Example (cont’d)
Unit: Modifying EXEC Parameters Topic: Analyzing Procedures
Continued…Concepts
![Page 10: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/10.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 10 of 58
PROG2 reads the valid transactions passed fromPROG1 and creates an order list/invoice for eachcustomer.
PROG2 refers to the following data sets:
DD5: Refers to the set of valid transactions passed from PROG1
DD6: Refers to the order list/invoice for each customer
Identifying Analysis Criteria - An Example (cont’d)
Unit: Modifying EXEC Parameters Topic: Analyzing Procedures
Continued…Concepts
![Page 11: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/11.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 11 of 58
Shown on the right is the procedure namedTRANSACT that is used to accomplish this task.
A procedure listing is obtained to determine:
• If it uses the required programs in the required sequence
• If it uses appropriate data sets
Identifying Analysis Criteria - An Example (cont’d)
Unit: Modifying EXEC Parameters Topic: Analyzing Procedures
//PSTEP1 EXEC PGM=PROG1,TIME=(1,30)//DD1 DD DSN=INTRAN,DISP=SHR//DD2 DD DSN=MASTER,DISP=SHR//DD3 DD SYSOUT=A//DD4 DD DSN=&&VALID,// UNIT=SYSDA,DISP=(NEW,PASS),// SPACE=(TRK,(1,1))//PSTEP2 EXEC PGM=PROG2,TIME=5//DD5 DD DSN=&&VALID,// DISP=(OLD,DELETE)//DD6 DD SYSOUT=A
Concepts
![Page 12: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/12.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 12 of 58
Based on the analysis of the JCL in the previous example, do you think this is an appropriate procedure for the task, as described?
A. No, because not all data sets are taken into consideration.
B. There is not enough information to decide.
C. Yes, because both criteria are met.
Are We on Track?
Unit: Modifying EXEC Parameters Topic: Analyzing Procedures
Review
![Page 13: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/13.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 13 of 58
The listing for the procedure TRANSACTindicates the following:
The procedure executes 2 programs: PROG1 and PROG2.
PROG1 uses the following data sets:
• A cataloged data set named INTRAN(DD1 DD statement)
• A cataloged data set named MASTER(DD2 DD statement)
• SYSOUT class A output (DD3 DDstatement)
• A temporary data set named &&VALIDthat is passed to PROG2 (DD4 DD statement)
Analysis Explanation
Unit: Modifying EXEC Parameters Topic: Analyzing Procedures
Continued…
//PSTEP1 EXEC PGM=PROG1,TIME=(1,30)//DD1 DD DSN=INTRAN,DISP=SHR//DD2 DD DSN=MASTER,DISP=SHR//DD3 DD SYSOUT=A//DD4 DD DSN=&&VALID,// UNIT=SYSDA,DISP=(NEW,PASS),// SPACE=(TRK,(1,1))//PSTEP2 EXEC PGM=PROG2,TIME=5//DD5 DD DSN=&&VALID,// DISP=(OLD,DELETE)//DD6 DD SYSOUT=A
Concepts
![Page 14: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/14.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 14 of 58
PROG2 uses the following data sets:
• A temporary data set named &&VALID,which is passed from PROG1 (DD5 DDstatement)
• SYSOUT class A output (DD6 DDstatement)
In addition, a TIME parameter is included on thePSTEP1 and PSTEP2 EXEC statements torestrict the amount of time the programs arepermitted to use the central processor.
Analysis Explanation (cont’d)
Unit: Modifying EXEC Parameters Topic: Analyzing Procedures
Continued…
//PSTEP1 EXEC PGM=PROG1,TIME=(1,30)//DD1 DD DSN=INTRAN,DISP=SHR//DD2 DD DSN=MASTER,DISP=SHR//DD3 DD SYSOUT=A//DD4 DD DSN=&&VALID,// UNIT=SYSDA,DISP=(NEW,PASS),// SPACE=(TRK,(1,1))//PSTEP2 EXEC PGM=PROG2,TIME=5//DD5 DD DSN=&&VALID,// DISP=(OLD,DELETE)//DD6 DD SYSOUT=A
Concepts
![Page 15: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/15.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 15 of 58
The TRANSACT procedure listing is obtained and evaluated to ensure that the procedure executesall the required programs in the proper sequenceand the appropriate data sets are used to accomplish the application.
Analysis Explanation (cont’d)
Concepts
Topic: Analyzing ProceduresUnit: Modifying EXEC Parameters
![Page 16: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/16.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 16 of 58
Code a statement to invoke transact.
//JSTEP EXEC __________
Are We on Track?
Unit: Modifying EXEC Parameters Topic: Analyzing Procedures
Review
![Page 17: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/17.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 17 of 58
A procedure must meet which of the following criteria?
A. Most of the DD statements are usable as they are or might need some minor alteration.
B. The programs in the procedure are located in the same library.
C. It invokes the proper programs in the correct sequence.
D. The DD statements point to a single storage volume.
Are We on Track?
Unit: Modifying EXEC Parameters Topic: Analyzing Procedures
Review
![Page 18: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/18.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 18 of 58
Cataloged data set – A non-temporary data set for which the system has recorded the unit and volume on which the data set resides.
SYSOUT – A keyword that defines a print data set. It instructs the system to queue the output on a direct-access volume.
Temporary data set – A data set which stores data needed only for the duration of the job.
Glossary
Unit: Modifying EXEC Parameters Topic: Analyzing Procedures
Glossary
![Page 19: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/19.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 19 of 58
Now that you have completed this topic, you should be able to:
• Analyze a procedure listing
Topic Summary
Unit: Modifying EXEC Parameters Topic: Analyzing Procedures
Summary
![Page 20: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/20.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 20 of 58
UNIT Modifying EXEC Parameters
Analyzing Procedures
Changing EXEC parameters
Override Statements
Nullification Statements
Addition Statements
Sequencing Multiple Changes
Topics:
![Page 21: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/21.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 21 of 58
At the end of this topic, you will be able to:
• Identify the EXEC statement parameters that can be changed
• Explain how to implement changes to EXEC statement parameters
Topic Objectives
Unit: Modifying EXEC Parameters Topic: Changing EXEC Parameters
Introduction
![Page 22: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/22.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 22 of 58
A procedure listing helps a programmer to analyzethe procedure for its usability. In some cases aprocedure might satisfy all the basic requirementsfor usability, but might need some minoralterations.
This can be done by changing the EXEC and DD parameters when the procedure is invoked.
However, these alterations are applicable only forone invocation. They do not permanently modifythe procedure definition.
Coding Changes
Unit: Modifying EXEC Parameters Topic: Changing EXEC Parameters
Continued…Concepts
![Page 23: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/23.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 23 of 58
Changes can be made to procedure EXECstatement parameters such as TIME, ACCT, andPARM.
The programmer can change these parametersin the following ways:
• Override the parameters on theprocedure EXEC statement
• Nullify parameters on the procedureEXEC statement
• Add parameters to the procedure EXECstatement
Coding Changes (cont’d)
Unit: Modifying EXEC Parameters Topic: Changing EXEC Parameters
//STEP1 EXEC procedure name,parameter
//DD1 DD parameter
//DD2 DD parameter Override
Nullify
Add
New DD Statement
Concepts
![Page 24: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/24.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 24 of 58
General syntax for changes to EXEC statement parameters is as follows:
//JSTEP EXEC procedurename,// parameter.procstepname=value
Implementing coding changes to EXEC statements involves the following steps:
• Give the name of the EXEC statement parameter to be overridden, nullified or added, followed by a period.
• Give the name of the procedure step, followed by an equal sign.
• Give the new value for the parameter if overriding or adding a value. Do not code a value if the parameter is to be nullified.
Implementing Coding Changes
Unit: Modifying EXEC Parameters Topic: Changing EXEC Parameters
Changes are specified in the EXEC statement that invokes the procedure.
Concepts
![Page 25: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/25.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 25 of 58Review
Changing parameters at the time you invoke a procedure has what effect?
A. Changes apply to the number of invocations you specify in the JCL.
B. Changes apply to all procedures containing the edited parameters.
C. Changes apply once only to the current invocation.
D. Changes apply to all future invocations of the procedure.
Are We on Track?
Unit: Modifying EXEC Parameters Topic: Changing EXEC Parameters
Review
![Page 26: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/26.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 26 of 58
Which of the following changes can you make at the time you execute a procedure?
A. Temporarily add operands such as ACCT to procedure EXEC statements
B. Alter the library copy of the JCL contained in cataloged procedure
C. Override the PGM parameter on procedure EXEC
Are We on Track?
Unit: Modifying EXEC Parameters Topic: Changing EXEC Parameters
Review
![Page 27: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/27.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 27 of 58Introduction
Now that you have completed this topic, you should be able to:
• Identify the EXEC statement parameters that can be changed
• Explain how to implement changes to EXEC statement parameters
Topic Summary
Unit: Modifying EXEC Parameters Topic: Changing EXEC Parameters
Summary
![Page 28: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/28.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 28 of 58
UNIT Modifying EXEC Parameters
Analyzing Procedures
Changing EXEC parameters
Override Statements
Nullification Statements
Addition Statements
Sequencing Multiple Changes
Topics:
![Page 29: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/29.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 29 of 58
At the end of this topic, you will be able to:
• Explain how to override parameters in an EXEC statement that invokes a procedure
Topic Objectives
Unit: Modifying EXEC Parameters Topic: Override Statements
Introduction
![Page 30: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/30.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 30 of 58
An override statement is used to change anexisting parameter value.
Consider the TRANSACT procedure discussedin Unit 3, Topic 1 – Analyzing procedures. The procedure definition is shown on the right.
Note that the time that PROG1 can run is 1minute 30 seconds.
Assume that for a particular week, the transaction file to be processed is too large andthe time that PROG1 can run needs to beincreased to 3 minutes.
Overriding Statement Parameters
Unit: Modifying EXEC Parameters Topic: Override Statements
Continued…Concepts
//PSTEP1 EXEC PGM=PROG1,TIME=(1,30)//DD1 DD DSN=INTRAN,DISP=SHR//DD2 DD DSN=MASTER,DISP=SHR//DD3 DD SYSOUT=A//DD4 DD DSN=&&VALID,// DISP=(NEW,PASS),// UNIT=SYSDA,// SPACE=(TRK,(1,1))//PSTEP2 EXEC PGM=PROG2,TIME=5//DD5 DD DSN=&&VALID,// DISP=(OLD,DELETE)//DD6 DD SYSOUT=A
![Page 31: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/31.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 31 of 58
To override the original time parameter, theTRANSACT can be invoked with the followingEXEC statement:
//JSTEP EXEC TRANSACT,TIME.PSTEP1=3
Shown on the right is the resulting JCL.
Note the new parameter in the resulting JCL.However, this override is only temporary. Theprocedure definition does not change. The nexttime the procedure is invoked, it will revert to theoriginal definition.
Overriding Statement Parameters (cont’d)
Unit: Modifying EXEC Parameters Topic: Override Statements
//PSTEP1 EXEC PGM=PROG1,TIME=3//DD1 DD DSN=INTRAN,DISP=SHR//DD2 DD DSN=MASTER,DISP=SHR//DD3 DD SYSOUT=A//DD4 DD DSN=&&VALID,// DISP=(NEW,PASS),// UNIT=SYSDA,// SPACE=(TRK,(1,1))//PSTEP2 EXEC PGM=PROG2,TIME=5//DD5 DD DSN=&&VALID,// DISP=(OLD,DELETE)//DD6 DD SYSOUT=A
Concepts
![Page 32: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/32.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 32 of 58Review
Following is a portion of the JCL for a procedure named MYPROC.
//PSTEP1 EXEC PGM=PROGA,TIME=(3,30)//DD1 DD DSN=A,DISP=SHR//DD2 DD ...//PSTEP2 EXEC PGM=PGMB,TIME=5//DD3 DD ...
Code a statement to invoke the procedure named MYPROC. Assume you want to restrict the amount of time PROGA is permitted to use the CPU to 2 minutes.
//JSTEP EXEC ______________
Are We on Track?
Unit: Modifying EXEC Parameters Topic: Override Statements
Review
![Page 33: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/33.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 33 of 58Introduction
Now that you have completed this topic, you should be able to:
• Explain how to override parameters in an EXEC statement that invokes a procedure
Topic Summary
Unit: Modifying EXEC Parameters Topic: Override Statements
Summary
![Page 34: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/34.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 34 of 58
UNIT Modifying EXEC Parameters
Analyzing Procedures
Changing EXEC parameters
Override Statements
Nullification Statements
Addition Statements
Sequencing Multiple Changes
Topics:
![Page 35: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/35.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 35 of 58
At the end of this topic, you will be able to:
• Explain how to nullify parameters in an EXEC statement that invokes a procedure
Topic Objectives
Unit: Modifying EXEC Parameters Topic: Nullification Statements
Introduction
![Page 36: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/36.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 36 of 58
A procedure can be modified by nullifying an EXECstatement parameter.
Most installations have values that are assigned toEXEC statement parameters automatically. Forexample, a default value may be assigned for theTIME parameter.
The default values may be overridden when theprocedure is defined. To return to the installation’sdefault value, the programmer can code astatement that nullifies the parameter.
Nullifying EXEC Statement Parameters
Unit: Modifying EXEC Parameters Topic: Nullification Statements
To nullify a parameter means to change it back to the installation-defined default. Continued…
Concepts
![Page 37: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/37.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 37 of 58
The format for nullifying an EXEC statement parameter is:
//JSTEP EXEC procedurename,// parameter.procstepname=
Note that in the format, the programmer specifies the parameter and the procedure step in which it appears.Also note that no value is assigned to the parameter in the nullifying EXEC statement.
Nullifying EXEC Statement Parameters (cont’d)
Unit: Modifying EXEC Parameters Topic: Nullification Statements
Concepts
![Page 38: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/38.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 38 of 58
Consider the TRANSACT procedure discussedin Unit 3, Topic 1 – Analyzing procedures.
The procedure definition for PROG1 (in theprocedure step PSTEP1) has specified a CPUtime of 1 minute 30 seconds for processing atransaction file. This processing time may not beadequate for a larger file.
If the default time is adequate, the programmermight want to execute the procedure taking thesystem default time for PROG1.
Nullifying EXEC Statement Parameters – An Example
Unit: Modifying EXEC Parameters Topic: Nullification Statements
Continued…
//PSTEP1 EXEC PGM=PROG1,TIME=(1,30)//DD1 DD DSN=INTRAN,DISP=SHR//DD2 DD DSN=MASTER,DISP=SHR//DD3 DD SYSOUT=A//DD4 DD DSN=&&VALID,// DISP=(NEW,PASS),// UNIT=SYSDA,// SPACE=(TRK,(1,1))//PSTEP2 EXEC PGM=PROG2,TIME=5//DD5 DD DSN=&&VALID,// DISP=(OLD,DELETE)//DD6 DD SYSOUT=A
Concepts
![Page 39: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/39.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 39 of 58
To do this, the programmer needs to nullify theTIME specified in the procedure definition on thePSTEP1 EXEC statement.
The following EXEC statement which invokesTRANSACT would nullify the time parameter:
//JSTEP1 EXEC TRANSACT,TIME.PSTEP1=
The resulting JCL is shown on the right.
Nullifying EXEC Statement Parameters – An Example (cont’d)
Unit: Modifying EXEC Parameters Topic: Nullification Statements
//PSTEP1 EXEC PGM=PROG1//DD1 DD DSN=INTRAN,DISP=SHR//DD2 DD DSN=MASTER,DISP=SHR//DD3 DD SYSOUT=A//DD4 DD DSN=&&VALID,// DISP=(NEW,PASS),// UNIT=SYSDA,// SPACE=(TRK,(1,1))//PSTEP2 EXEC PGM=PROG2,TIME=5//DD5 DD DSN=&&VALID,// DISP=(OLD,DELETE)//DD6 DD SYSOUT=A
Concepts
![Page 40: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/40.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 40 of 58
Following is a portion of the JCL for a procedure named MYPROC.
//PSTEP1 EXEC PGM=PGMA//DD1 DD ...//PSTEP2 EXEC PGM=PGMB,TIME=5 //DD2 DD ...
Assume that for this use of the procedure, you want to return to the installation-defined CPU time limit for PROGB. Code the statement to invoke MYPROC.
//JSTEP EXEC __________
Are We on Track?
Unit: Modifying EXEC Parameters Topic: Nullification Statements
Review
![Page 41: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/41.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 41 of 58
Now that you have completed this topic, you should be able to:
• Explain how to nullify parameters in an EXEC statement that invokes a procedure
Topic Summary
Unit: Modifying EXEC Parameters Topic: Nullification Statements
Summary
![Page 42: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/42.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 42 of 58
UNIT Modifying EXEC Parameters
Analyzing Procedures
Changing EXEC parameters
Override Statements
Nullification Statements
Addition Statements
Sequencing Multiple Changes
Topics:
![Page 43: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/43.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 43 of 58
At the end of this topic, you will be able to:
• Explain how to add parameters in an EXEC statement that invokes a procedure
• Specify the steps involved in multiple addition ofparameters
Topic Objectives
Unit: Modifying EXEC Parameters Topic: Addition Statements
Introduction
![Page 44: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/44.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 44 of 58
Addition statements are used to add parameters to a procedure. The programmer can code additions on the
EXEC statement that invokes the procedure.
Consider the TRANSACT procedure discussed in Unit 3, Topic 1 – Analyzing procedures. Assume that aprogrammer wants to supply the current date for PROG1.
This parameter can be coded in the following way while invoking the procedure:
//JSTEP EXEC procedurename,// parameter.procstepname=value
//JSTEP EXEC TRANSACT,// PARM.PSTEP1=’01/29/99’
Adding Parameters to a Procedure
Unit: Modifying EXEC Parameters Topic: Addition Statements
Addition
Continued…Concepts
![Page 45: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/45.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 45 of 58
Parameters can be added to one or more procedure steps. In the TRANSACT procedure, the current datecan be supplied to PROG1 and PROG2 by means of the PARM parameter.
The code would be as follows:
//JSTEP EXEC TRANSACT,// PARM.PSTEP1=’01/29/99’,// PARM.PSTEP2=’01/29/99’
Note the following points when sequencing multiple EXEC statement additions:
• The additions are in procedure step sequence.
• A comma separates the name of the procedure from the first parameter addition, and the parameter additions from each other.
Adding Parameters to a Procedure (cont’d)
Unit: Modifying EXEC Parameters Topic: Addition Statements
Continued…Concepts
![Page 46: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/46.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 46 of 58
The TRANSACT procedure definition is shown onthe right.
Adding Parameters to a Procedure (cont’d)
Unit: Modifying EXEC Parameters Topic: Addition Statements
//PSTEP1 EXEC PGM=PROG1,TIME=(1,30)//DD1 DD DSN=INTRAN,DISP=SHR//DD2 DD DSN=MASTER,DISP=SHR//DD3 DD SYSOUT=A//DD4 DD DSN=&&VALID,// DISP=(NEW,PASS),// UNIT=SYSDA,// SPACE=(TRK,(1,1))//PSTEP2 EXEC PGM=PROG2,TIME=5//DD5 DD DSN=&&VALID,// DISP=(OLD,DELETE)//DD6 DD SYSOUT=A
Concepts
Continued…
![Page 47: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/47.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 47 of 58
The following EXEC statement supplies thecurrent date for PROG1 and PROG2:
//JSTEP EXEC TRANSACT,// PARM.PSTEP1=’01/29/91’,//
PARM.PSTEP2=’01/29/91’
The resulting JCL is shown on the right.
Adding Parameters to a Procedure (cont’d)
Unit: Modifying EXEC Parameters Topic: Addition Statements
//PSTEP1 EXEC PGM=PROG1,TIME=(1,30)// PARM=’01/29/91’//DD1 DD DSN=INTRAN,DISP=SHR//DD2 DD DSN=MASTER,DISP=SHR//DD3 DD SYSOUT=A//DD4 DD DSN=&&VALID,// DISP=(NEW,PASS),// UNIT=SYSDA,// SPACE=(TRK,(1,1))//PSTEP2 EXEC PGM=PROG2,TIME=5// PARM=’01/29/91’//DD5 DD DSN=&&VALID,// DISP=(OLD,DELETE)//DD6 DD SYSOUT=A
Concepts
![Page 48: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/48.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 48 of 58
Following is a portion of the JCL for a procedure named MYPROC.
//PSTEP1 EXEC PGM=PGMA,TIME=(1,30)//DD1 DD ...//PSTEP2 EXEC PGMB,TIME=5
Assume that for this invocation of MYPROC, you wish to add the date 01/11/99 to PROGA and PROGB. (You do so through the PARM parameter.)
Code the statement to invoke MYPROC.
Are We on Track?
Unit: Modifying EXEC Parameters Topic: Addition Statements
Review
![Page 49: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/49.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 49 of 58
Match the change types below with their descriptions.
1. Override A. Append existing code with new parameters
2. Nullify B. Change a parameter back to its default value
3. Addition C. Change an existing value
Are We on Track?
Unit: Modifying EXEC Parameters Topic: Addition Statements
Review
![Page 50: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/50.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 50 of 58
Now that you have completed this topic, you should be able to:
• Explain how to add parameters in an EXEC statement that invokes a procedure
• Specify the steps involved in multiple addition ofparameters
Topic Summary
Unit: Modifying EXEC Parameters Topic: Addition Statements
Summary
![Page 51: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/51.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 51 of 58
UNIT Modifying EXEC Parameters
Analyzing Procedures
Changing EXEC parameters
Override Statements
Nullification Statements
Addition Statements
Sequencing Multiple Changes
Topics:
![Page 52: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/52.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 52 of 58
At the end of this topic, you will be able to:
• Explain how to combine changes to EXEC statement parameters
• Specify the rules involved in sequencing multiple changes
Topic Objectives
Unit: Modifying EXEC Parameters Topic: Sequencing Multiple Changes
Introduction
![Page 53: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/53.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 53 of 58
It is possible to use EXEC statement overrides, nullifications, and additions for one or more procedure steps
at the same time. This can be done by combining the changes on the EXEC statement that invokes theprocedure.
For example, the programmer can change the time restrictions and can also supply the current date for aparticular PSTEP.
Combining Changes
Unit: Modifying EXEC Parameters Topic: Sequencing Multiple Changes
Concepts
![Page 54: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/54.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 54 of 58
The following rules must be followed while sequencing multiple changes:
• Specify alterations in procedure step sequence. The alterations for one step must be specifiedbefore the alterations for a subsequent step.
• Within any one step, alterations can be specified in any sequence.
• Alterations should be separated from each other by a comma.
Sequencing Multiple Changes
Unit: Modifying EXEC Parameters Topic: Sequencing Multiple Changes
Concepts
![Page 55: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/55.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 55 of 58
Consider the TRANSACT procedure discussedin Unit 3, Topic 1 – Analyzing procedures.The following alterations are to be made to theEXEC statement operands in the procedure:
• Increase the time restriction for PSTEP1 to 3 minutes
• Revert to the installation-defined TIME default for PSTEP2
• Add a PARM parameter value of 01/29/99 for the EXEC statements in PSTEP1 and PSTEP2
The JCL statements on the right show how tocombine these alterations on the EXEC statementthat invokes the procedure.
Sequencing Multiple Changes – An Example
Unit: Modifying EXEC Parameters Topic: Sequencing Multiple Changes
//JSTEP EXEC TRANSACT,TIME.PSTEP1=3,// PARM.PSTEP1=’01/29/99’,// TIME.PSTEP2=,// PARM.PSTEP2=’01/29/99’
Concepts
![Page 56: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/56.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 56 of 58
For the invocation of MYPROC, assume you want to make the following changes:
a. Revert to the installation-defined CPU time limit for PROGB.b. Restrict the amount of time PROGA can use the CPU to 2 minutes.c. Add a PARM value of ‘5/10/99’ to PROGA.
Put the following items in the correct sequence, following the sequencing rules for multiple changes to produce EXEC statement parameters.
A. // PARM.PSTEP=‘5/10/99’
B. // TIME.PSTEP1=2
C. //JSTEP EXEC MYPROC,
D. // TIME.PSTEP2=
Are We on Track?
Unit: Modifying EXEC Parameters Topic: Sequencing Multiple Changes
Review
![Page 57: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/57.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 57 of 58
Now that you have completed this topic, you should be able to:
• Explain how to combine changes to EXEC statement parameters
• Specify the rules involved in sequencing multiple changes
Topic Summary
Unit: Modifying EXEC Parameters Topic: Sequencing Multiple Changes
Summary
![Page 58: JCLb Unit 3](https://reader034.vdocuments.mx/reader034/viewer/2022042905/577cb4db1a28aba7118cbaa3/html5/thumbnails/58.jpg)
z/OS MVS JCL Intermediate
© Copyright IBM Corp., 2000, 2004. All rights reserved. Page 58 of 58
Now that you have completed this unit, you should be able to:
• Specify what factors determine if a procedure meets the requirements of a job
• Invoke a procedure, making temporary alterations to it if necessary
• Add, override or nullify parameters on procedure step EXEC statements
• Correctly sequence multiple changes to EXEC statement parameters
Unit Summary
Unit: Modifying EXEC Parameters
Summary