Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Passing values to parms of a proc, which is called by parm
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: 8593
Location: Back in jolly old England

PostPosted: Mon Sep 08, 2008 5:34 pm    Post subject:
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    Post subject: Passing values to parms of a proc, which is called by parm
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: 2276
Location: @my desk

PostPosted: Mon Sep 08, 2008 7:02 pm    Post subject: Re: Passing values to parms of a proc, which is called by pa
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: 8593
Location: Back in jolly old England

PostPosted: Mon Sep 08, 2008 7:04 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Sep 08, 2008 7:41 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Sep 08, 2008 7:58 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Sep 09, 2008 5:58 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm
No new posts Jcl pram vs proc parms ashek15 JCL & VSAM 3 Thu Mar 30, 2017 6:50 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us