Can you execute a PROC from another PROC?

Answers were Sorted based on User's Feedback



Can you execute a PROC from another PROC?..

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

Can you execute a PROC from another PROC?..

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

Can you execute a PROC from another PROC?..

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

Can you execute a PROC from another PROC?..

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

Can you execute a PROC from another PROC?..

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

Can you execute a PROC from another PROC?..

Answer / guest

yes

Is This Answer Correct ?    0 Yes 0 No

Can you execute a PROC from another PROC?..

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

Can you execute a PROC from another PROC?..

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

Post New Answer

More JCL Interview Questions

What does it mean by Restart and Checkpoint in JCL ? How are checkpoints being taken and what is their usage ? How to use Checkpoint macro on a JOBSTEP ?

0 Answers   IBM,


db2 maintains information about the data... a.in tables. b.in a set of tables known as db2 catalog. c.in db2 database. d.none of the above. 1 What is the maximum number of tables that can be stored on a Partitioned Table Space ? 1 what is contained in the DB2 node lock file? A) data base names B) data base users names C) license keys D) server names Accenture 5 Can a primary key have null values? If we try to insert a null value in a primary key column, will it work or give an error code? 6 When you are working with the project after coding what will u do? Like what type of documents u will prepare? How will u do testing? 2 how to delete perticular row from table for ex. how you will delete 3rd row from table please answer THANKS IN ADVANCE IBM 7 max number of columns in a db2 table? 6 What is package versioning? Please give an example. 1 What is the picture clause of the null indicator variable? 6 How do you filter out the rows retrieved from a Db2 table ? 1 What is DB2 (IBM Database 2)? 3 Can any one tell me about Restart logic in DB2.

2 Answers   Cap Gemini,


IN DFSORT sum fields=none is usec to remove duplicates.how to write the duplicates in another dataset?

2 Answers  


I have a JCL with 100 steps. I want run the Alternate steps in the JCL ( Like 2 ,4,6,8 etc.. ). How can I acheive this scenario? If It is by Cond Parameter can you provide the Condition code for that?

5 Answers   Polaris, Tech Mahindra, UST, Wipro,


wht is sysudump n sysout,sysprint ?

1 Answers   L&T,






What 3 guidelines do we have to follow when concatenating DD statements?

3 Answers  


In my job I have 6 steps. Step01,02,03...step06. after executing step02 i want to skip step03 and want to execute step04. and once step04 is done then I want to go back and execute step03. once step03 is completed I want execute step05, 06 and so on... can any one tell me how do i do that???

10 Answers   Perot Systems,


Explain the purpose of dd dummy statement?

0 Answers  


what is a null indicator in db2?

5 Answers   Fiserv, IBM,


What is JCL LIB ?

3 Answers   Xansa,


Explain about ISPFTTRC

1 Answers  


How to identify where file is empty or not? How many ways are there to identifying?

3 Answers   CTS,


Categories