Procedures (PROCs) IQ for Freshers
What is a procedure?
A procedure is a reusable set of JCL statements defined once and called multiple times within a job or across various jobs.
How many types of PROCs available in JCL?
Procedures are of two types based on their definition and usage - Instream procedure and Cataloged procedure.
Name different JCL statements that are not allowed in the procedures?
It wont allow any statements other than CNTL, command, DD, ENDCNTL, EXEC, IF/THEN/ELSE/ENDIF, INCLUDE, OUTPUT JCL, and SET statements only.
Instream Procedure -
What is instream procedure?
An instream procedure is a type of procedure that is defined within the same JCL where it calls.
What is the use of instream procedure?
Reusablity within the JCL and reduces redundancy.
The maximum number of in-stream procedure you can code in any JCL is?
15
Which statement is used to end the in-stream procedure in a JCL?
PEND
Cataloged Procedure -
What is Cataloged Procedures?
Cataloged procedures are defined outside of the JCL and maintained independently of any JCL. The library can be a personal or system library of type PDS.
What are the advantages of using a catalogue in JCL?
Reusablity of JCL statement available for all JOBs and reduces redundancy.
The maximum number of cataloged procedure you can code in any JCL?
255
Nested Procedures -
What is nested procedures?
Nested procedures (PROC) are a technique to create a PROC that contains a call to another PROC.
How many levels of nested procedures can code in JCL?
15
Common Questions -
State difference between an instream and a catalogued Procs?
PROC definition is part of the JOB where it invoked. | PROC defintion is outside of the JOB where it invoked. |
PROC is available to the JOB where it defined. | PROC is available to all JOB by using the defintion library (PROCLIB). |
Its defintion should start with a PROC statement and end with a PEND statement. | Its defintion should start with a PROC statement and PEND is optional. |
Can code upto 15 instream procs in one JCL. | Can code upto 255 procs in one JCL. |
Frequently Asked Questions -
Explain what JCL Procedures?
What are the JCL procedures?
What do you mean by PROC?
What are the differences between instream and catalogue procedures?
What is the difference between CATALOGED procedure and IN-STREAM procedure?
Name some of the JCL statements that are not allowed in procs.?
What is the importance of catalogue procedures in real-time applications?