Example:
//A1 PROC
//SA1 EXEC B1
//* END OF PROC A1
//B1 PROC
//SB1 EXEC C1
//* END OF PROC B1
//C1 PROC
//SC1 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=SOME.DATASET
//SYSUT2 DD SYSOUT=*
//* END OF PROC C1
//AJOB JOB MSGCLASS=X
//SYSOUT DD SYSOUT=*
//JS1 EXEC A1
//* can I override the SYSUT1 dataset in proc C1 ??
---
* Harry Myhre <har...@netcom.com>
Harry If I understood your question correctly, then you should be able
to override SYSUT1 of C1 in your job by :
//C1.SYSUT1 dd dsn=Another.dataset
Hope this helps. Just make sure you don't have any othet PROC with the
same name.
Good luck,
Anil Gupta
>Harry If I understood your question correctly, then you should be able
>to override SYSUT1 of C1 in your job by :
>
> //C1.SYSUT1 dd dsn=Another.dataset
>
>Hope this helps. Just make sure you don't have any othet PROC with the
>same name.
That didn't work. Here's some sample output.
EDIT ---- HM.TSO.JCL(AJ1) - 01.00 ---------------------------- COLUMNS 001 072
COMMAND ===> SCROLL ===> CSR
****** ***************************** TOP OF DATA ******************************
000001 //HMJOB JOB MSGCLASS=X
000002 //PATH JCLLIB ORDER=HM.TSO.JCL
000003 //AJS1 EXEC A1
000004 //*C1.SYSUT1 DD DISP=SHR,DSN=HM.PRI.PCONTROL (1ST SUGGESTION)
000005 //C1.SYSUT1 DD DISP=SHR,DSN=HM.PRI.PCONTROL (1ST SUGGESTION)
000006 //*1.B1.C1.SYSUT1 DD DISP=SHR,DSN=HM.PRI.PCONTROL
****** **************************** BOTTOM OF DATA ****************************
. . . . . . . . . . . . . . . . . . . . . . . . . . .
10 XXSYSOUT DD SYSOUT=*
11 XXSYSIN DD DUMMY
12 XXSYSPRINT DD SYSOUT=*
13 XXSYSUT1 DD DISP=SHR,DSN=PC.PRI.PCONTROL
14 XXSYSUT2 DD SYSOUT=*
XX*--------------------------- END OF B1 --------------
XX*--------------------------- END OF A1 --------------
15 //C1.SYSUT1 DD DISP=SHR,DSN=HM.PRI.PCONTROL
STMT NO. MESSAGE
3 IEFC001I PROCEDURE A1 WAS EXPANDED USING PRIVATE LIBRARY HM.TSO.JCL
5 IEFC001I PROCEDURE B1 WAS EXPANDED USING PRIVATE LIBRARY HM.TSO.JCL
7 IEFC001I PROCEDURE C1 WAS EXPANDED USING PRIVATE LIBRARY HM.TSO.JCL
15 IEFC611I OVERRIDDEN STEP NOT FOUND IN PROCEDURE
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ken Internet: kgun...@delphi.com
Packet: WB2KWC@WB2IBO.#NLI.NY.USA.NA
The ability to execute a procedure within a procedure depends on the JES
version of the installation. I'm not sure, but I think JES2 at about 4.0
introduced this capability.
As for overriding the data set name, try passing the name of the data set
as a parameter on the EXEC statement. I found that this works:
------------------------------------------------------------------------
//********************************************************************
//A1 PROC PC1='SOME.DATASET'
//SA1 EXEC B1,PC1=&PC1
// PEND
//*******************************************************************
//B1 PROC PC1='SOME.DATASET'
//SB1 EXEC C1,PC1=&PC1
// PEND
//********************************************************************
//C1 PROC PC1='SOME.DATASET'
//SC1 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=&PC1
//SYSUT2 DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
// PEND
//********************************************************************
//JS1 EXEC A1,
// PC1='SOME.OTHER.DATASET.THIS.TIME'
------------------------------------------------------------------------
John Talafous TALA...@TIMKEN.COM
The Timken Company Phone : (216)-471-3390
PO BOX 6927 Mail Drop BIC-01 Fax : (216)-471-4034
Canton, Ohio 44706-0927
You didn't provide enough info, but in your original post, the JCL had
a stepname (on the EXEC card) of SC1. You need to specify the name
of the step, not the name of the proc when overriding JCL.