Can you execute a PROC from another PROC?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How would you understand error(execution phase)?

643


What are the utility programs in jcl?

658


how you will the direct the data to spool using sysout option?

1775


What is the function of the dd avgrec keyword in sms datasets?

852


How can return codes be tested before execution of a job step?

939






What is the function of dd disp parameter?

667


how to run batch program without jcl?

10104


How does jcl act on a cobol code?

662


what is DSN parameter and DISP parameter is used for?

689


A dd statement consists of 4 fields. Name them?

942


1) SORT FIELDS=(20,4,CH,D,10,3,CH,D) OUTREC FIELDS=(7:20,4,C' FUTURE ',20,2,10,3,1Z,1,9,13,7, 24,57,TRAN=LTOU,6X'FF') This example illustrates how a fixed-length input data set can be sorted and reformatted for output. The SORTIN LRECL is 80 bytes. The reformatted output records are fixed length with a record size of 103 bytes. SOLRF (the IBM-supplied default) is in effect, so unless the SORTOUT LRECL is specified or available, it will automatically be set to the reformatted record length of 103. in the above example i have some doubts that a) sort fields=(20,4,CH,D,10,3,CH,D) -what exactly it does and this fields related to output record fields or input record fields b)outrec used to refprmat the records after sorting that means could please reply me as soon as possible Thanks. Venkat

7100


which utility is used a dummy utility?

808


I have mainpgm(abc) this is the only cobol pgm(non-db2).And this pgm calling subpgm name "acd" this also only cobol(non- Db)and this pgm calling some other subpgm this pgm has cobol-db2 pgm. 1) IF you calling static mode how to run and how to compile? 2) IF you calling dynamic mode how to run and how to compile? plz suggestion me.

1967


what is the use of IEBGENER utility?

670


how do you code a null statement?

789