IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Passing values to parms of a proc, which is called by parm


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Satish5

New User


Joined: 12 Nov 2007
Posts: 38
Location: Texas, USA

PostPosted: Mon Sep 08, 2008 5:26 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Mon Sep 08, 2008 5:34 pm
Reply with quote

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
View user's profile Send private message
Satish5

New User


Joined: 12 Nov 2007
Posts: 38
Location: Texas, USA

PostPosted: Mon Sep 08, 2008 6:56 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Sep 08, 2008 7:02 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Mon Sep 08, 2008 7:04 pm
Reply with quote

Yes, please clarify what you need to do.
Back to top
View user's profile Send private message
Satish5

New User


Joined: 12 Nov 2007
Posts: 38
Location: Texas, USA

PostPosted: Mon Sep 08, 2008 7:21 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Mon Sep 08, 2008 7:41 pm
Reply with quote

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
View user's profile Send private message
Satish5

New User


Joined: 12 Nov 2007
Posts: 38
Location: Texas, USA

PostPosted: Mon Sep 08, 2008 7:55 pm
Reply with quote

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 icon_sad.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Mon Sep 08, 2008 7:58 pm
Reply with quote

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
View user's profile Send private message
Satish5

New User


Joined: 12 Nov 2007
Posts: 38
Location: Texas, USA

PostPosted: Tue Sep 09, 2008 4:48 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Tue Sep 09, 2008 5:58 pm
Reply with quote

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
View user's profile Send private message
Satish5

New User


Joined: 12 Nov 2007
Posts: 38
Location: Texas, USA

PostPosted: Wed Sep 10, 2008 10:41 am
Reply with quote

Lets see how this problem is solved.
Thanks for you help.

Thanks,
Satish
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Starting a PROC with parameters from ... CLIST & REXX 6
No new posts System add a USER parm when job submi... TSO/ISPF 4
No new posts Passing containers on START command CICS 4
No new posts how to eliminate null indicator value... DB2 7
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
Search our Forums:

Back to Top