View previous topic :: View next topic
|
Author |
Message |
Satish5
New User
Joined: 12 Nov 2007 Posts: 38 Location: Texas, USA
|
|
|
|
Hi,
There is a catalogged proc-CATPROC and an inline proc INPROC.
INPROC is executing CATPROC.
I am trying to execute INPROC multiple times with different parm values using following code. But it is not working.
//ESYLIB JCLLIB ORDER=(ABC.TEST.PROCLIB)
//*
//INPROC PROC
//PROC0010 EXEC CATPROC,
// GEN1=(-10),
// GEN2=(-10),
// ORD=ABC-10
.
.
.
.
//STEP0090.PARMIN DD DATA
KK 198243 XYX12 (-10)
/*
// PEND
// EXEC INPROC,GEN1=(-15),GEN2=(-25)
Also I want to know how to replace -10 in ORD=ABC-10 by ORD=ABC-15(or whatever value is passed) for every step.
Please help me with this problem.
Thank You.
Satish |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Ok, so it is not working. This leaves countless possibilities for why it does not work.
In which way does this not work ? and please post the output. |
|
Back to top |
|
|
Satish5
New User
Joined: 12 Nov 2007 Posts: 38 Location: Texas, USA
|
|
|
|
Thanks for prompt reply, I got the sol for first prob.
Prob was that even after passing values thru // EXEC INPROC,GEN1=(-15),GEN2=(-25) values of GEN1 and GEN2 in CATPROC remians same.
I did following
// GEN1=&GEN3,
// GEN2=& EN4,
// EXEC INPROC,GEN3=(-15),GEN4=(-25)
and it worked fine.
But havent found a solution for 2nd problem "I want to know how to replace -10 in ORD=ABC-10 by ORD=ABC-15(or whatever value is passed) for every step."
Thank You.
Satish |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Satish5 wrote: |
But havent found a solution for 2nd problem "I want to know how to replace -10 in ORD=ABC-10 by ORD=ABC-15(or whatever value is passed) for every step." |
Satish,
Could you please tell what exactly you are trying to achieve by replacing -"10 in ORD=ABC-10 by ORD=ABC-15" or how it is going to be used in your proc?
Thanks,
Arun |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Yes, please clarify what you need to do. |
|
Back to top |
|
|
Satish5
New User
Joined: 12 Nov 2007 Posts: 38 Location: Texas, USA
|
|
|
|
There is an existing (CATPROC) which is generating value of parm ORD dynamically. I want to call this CATPROC in INPROC and replace just the gdg version '-10' part of 'ABC-10' by passing value thru EXEC statement as follows
// EXEC INPROC,GEN1=(-15),GEN2=(-25), ORD=XXXXX
Please let me know if still you have any doubt about problem, I will try my best to clear it.
Thank You.
Satish |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Why on earth are you running a proc within a proc. That is just so bad news.
From your post it seems that INPROC executes on CATPROC. Why not just execute CATPROC ? |
|
Back to top |
|
|
Satish5
New User
Joined: 12 Nov 2007 Posts: 38 Location: Texas, USA
|
|
|
|
CATPROC is an existing proc which I do not want to mess with. CATPROC is written to execute only 1 version of GDG at a time. I want to call CATPROC using INPROC and execute for all versions of GDG. Please suggest if you have a better method to achieve this without disturbing any functionality of existing CATPROC. Sadly I do not know REXX |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Why not just run something like this from your own JCL library.
Code: |
//STEP01 EXEC CATPROC,GEN1=(-10),GEN2=(-10),ORD=ABC-10
//STEP02 EXEC CATPROC,GEN1=(-11),GEN2=(-11),ORD=ABC-11
//STEP03 EXEC CATPROC,GEN1=(-12),GEN2=(-12),ORD=ABC-12
//STEP04 EXEC CATPROC,GEN1=(-13),GEN2=(-13),ORD=ABC-13
|
|
|
Back to top |
|
|
Satish5
New User
Joined: 12 Nov 2007 Posts: 38 Location: Texas, USA
|
|
|
|
CATPROC has 9 steps. Something is overridden in all the steps and this makes approx 50 lines in calling CATPROC. Now I want to call CATPROC for 40 versions of GDG and thus it will make approx. 2000 lines in JCL. This much long JCL will be difficult to maintain and will have less readability. So I am calling CATPROC in an INPROC and passsing values using parms.
Now another challengeI can not override SYSIN in CATPROC from INPROC but I have to pass data that may change for every run.
//ESYLIB JCLLIB ORDER=(ABC.TEST.PROCLIB)
//*
//INPROC PROC
//PROC0010 EXEC CATPROC,
// GEN1=&GEN3,
// GEN2=&GEN4,
// ORD=ABC-10
//STEP0010.SYSIN DD DATA
$$DD01 SORT FIELDS=(1,10,BI,A).
.
.
.
//STEP0090.PARMIN DD DATA
KK 198243 XYX12 (-10)
/*
// PEND
// EXEC INPROC,GEN3=(-15),GEN4=(-25) |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Quote: |
Now another challengeI can not override SYSIN in CATPROC from INPROC but I have to pass data that may change for every run. |
Yep, another reason to use single level procs as I suggested last time. You CAN NOT override statements contained in a second level proc.
Looks like it may well be the 2000 JCL lines then. |
|
Back to top |
|
|
Satish5
New User
Joined: 12 Nov 2007 Posts: 38 Location: Texas, USA
|
|
|
|
Lets see how this problem is solved.
Thanks for you help.
Thanks,
Satish |
|
Back to top |
|
|
|