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: 2180
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 SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am


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