Can you execute a PROC from another PROC?
Answers were Sorted based on User's Feedback
Answer / sivakumar sekharannair
We can execute a proc from another proc. I tried and
executed sucessfully.
my job steps:
//PROCLIB JCLLIB ORDER=PROGMR.SIVANAIR.JCLLIB
//JOBLIB DD DSN=UAUT.NDVR.PGMLOAD,DISP=SHR
//STEP001 EXEC AUT001
first proc steps:
//AUT001 PROC
//STEP001 EXEC PGM=AUT0EMP,COND=(0,LE)
//EMPLOY1 DD DSN=PROGMR.SBPD.EMP.DATA.SAMPLE1,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//STEP002 EXEC AUT002
Second proc steps:
//AUT002 PROC
//STEP001 EXEC PGM=AUT0EMP
//EMPLOY1 DD DSN=PROGMR.SBPD.EMP.DATA.SAMPLE1,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
JOb log:
JOBNAME STEPNAME PROCSTEP RC EXCP CPU SRB CLOCK
AAUT001D STEP001 STEP001 00 48 .00 .00 .00
VS0010I AAUT001D 08.206 C STEP002 STEP001 ** R0000 **
AAUT001D STEP002 STEP001 00 48 .00 .00 .00
EF404I AAUT001D - ENDED -
Is This Answer Correct ? | 20 Yes | 2 No |
Answer / satyasivaji.ch
yha we can excute proc with in a proc(nested procedures),you
can code up to 15 levels of procedure we can execute.
Is This Answer Correct ? | 6 Yes | 3 No |
Answer / tanji
Answer to #5:
Need to give the lib of all the proc in the jcllib,With
that the second and subsequent proc will be identifies the
the executing proc.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / guest
I did not know the answer and my interviewer said NO. Later
I tried and executed PROC from a PROC, three levels deep.
Manuals do not state any limit on PROC calling PROC, or nesting.
Is This Answer Correct ? | 6 Yes | 5 No |
Answer / sachin
Please tell me shive
job knows where is first proc reside using JCLLIB
but how the proc2 will know where is proc3 reside.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / kingmanish
First of all what is a PROC.
Its just a set of reusable JCL statements.
Now calling PROC within a PROC will defeat the concept of
PROCs itself.
So if we call a PROC within a PROC it would work and we can
do that.
But that is not a good practice.
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / nikhil
You can code only exec pgm=pgm-name in a PROC but not exec
procname in any kind of PROC.
Is This Answer Correct ? | 0 Yes | 5 No |
in step1 of a jcl,disp=(mod,delete,delete) step02 exec pgm=ccc,cond=(0,le) will step02 be executed? i)never ii)always iii) iv)... i dont remember options
IN-STREAM DATA NOT ALLOWED IN PROC how can come out from this problem
how can i code cond parameter in procedures ? i have a jclk calling a proc which has 10 steps i want to execute from step 5 to step 10 where can i code restrat parameter or cond parameter for ths
Suppose there r total 10 steps. Out of which i want to execute only the 7th step. How can i do that....????
How does -818 sql error occur? Why does it happen and what can be done to overcome this error code?
what is alternate index?
Do we need to code DCB parameters when using DISP position as MOD?
How can the submitting users racf authority be overridden in a job stream?
What is difference between Return Code, user completion code, Abend code and reason Code?
ihave ten flatfile in that iwant to concatinate all the files except file 5,6 into output file by uing jcl? how to do this? give me detail yntax for tis?
how to run batch program without jcl?
What is the function of job statement in jcl?