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
 

 

Dynamic data to Parm parameter in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Manny5

New User


Joined: 10 Nov 2008
Posts: 12
Location: Pune

PostPosted: Fri Nov 28, 2008 2:02 pm    Post subject: Dynamic data to Parm parameter in JCL
Reply with quote

I am trying to pass dynamic data to Parm parameter in JCL.

For example
//STEP00200 EXEC PGM=GCA94210,PARM='10-30-08'

I need to use previous month last date as input to the parm. I already have a program which provide me with that date. Problem here is how do I pass it to Parm parameter in next step.

I already tried CEEOPTS option. I was also not able to make data passed from COBOL to JCL using linkage section.

Are there any better way to achieve this?
Could anyone confirm if that works and also provide me with code?

Thanks,
Manny
Back to top
View user's profile Send private message

Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Fri Nov 28, 2008 2:16 pm    Post subject:
Reply with quote

Quote:
I need to use previous month last date as input to the parm

Why don't you take that date in program itself?

Please note that nothing can be passed to JCL from program, except RETURN CODE.
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Fri Nov 28, 2008 2:18 pm    Post subject:
Reply with quote

Hi Manny,
From the first program, write the date to a file and from GCA94210 read the file to get date.
Back to top
View user's profile Send private message
Manny5

New User


Joined: 10 Nov 2008
Posts: 12
Location: Pune

PostPosted: Fri Nov 28, 2008 2:21 pm    Post subject: Hey wait a sec.
Reply with quote

Before you all go any further.

The program i am using is called by 10 different program and i need to use the Parm input method for at least 9 steps in JCL. I cannot touch those modules.

I should have mentioned this before.
Back to top
View user's profile Send private message
Manny5

New User


Joined: 10 Nov 2008
Posts: 12
Location: Pune

PostPosted: Fri Nov 28, 2008 2:21 pm    Post subject: Re: Hey wait a sec.
Reply with quote

I mean 10 different JCL's with thier own input parm date

Manny5 wrote:
Before you all go any further.

The program i am using is called by 10 different program and i need to use the Parm input method for at least 9 steps in JCL. I cannot touch those modules.

I should have mentioned this before.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Fri Nov 28, 2008 2:45 pm    Post subject:
Reply with quote

Manny5,

How about writing the date to a PDS member as,
Code:
//             PARM='mm-dd-yy'
and INCLUDE ing this member in other JCLs
Back to top
View user's profile Send private message
Manny5

New User


Joined: 10 Nov 2008
Posts: 12
Location: Pune

PostPosted: Fri Nov 28, 2008 3:05 pm    Post subject:
Reply with quote

Let me give it a shot. hope this works.



arcvns wrote:
Manny5,

How about writing the date to a PDS member as,
Code:
//             PARM='mm-dd-yy'
and INCLUDE ing this member in other JCLs
Back to top
View user's profile Send private message
Manny5

New User


Joined: 10 Nov 2008
Posts: 12
Location: Pune

PostPosted: Fri Nov 28, 2008 6:51 pm    Post subject:
Reply with quote

I tried this, however the PDS has to be some library not just any PDS.

At least this is the way its working for me. My job wont have access to write to any library icon_sad.gif

arcvns wrote:
Manny5,

How about writing the date to a PDS member as,
Code:
//             PARM='mm-dd-yy'
and INCLUDE ing this member in other JCLs
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Nov 28, 2008 7:06 pm    Post subject: Reply to: Dynamic data to Parm parameter in JCL
Reply with quote

usually this kind of parameter is resolved by using the definitions provided by the scheduler

last day of the month, first day, same for previous,next, previous quarter amd so on...
usually substitution services are provided for all the relevant date tokens
relevant to the organization calendar
Back to top
View user's profile Send private message
Manny5

New User


Joined: 10 Nov 2008
Posts: 12
Location: Pune

PostPosted: Fri Jan 02, 2009 3:16 pm    Post subject:
Reply with quote

Hi I was able to make it work when Parm is somthing like

PARM=10-31-07.

However its throwing me errors when i am trying to put something like this PARM='GCA94220,1,10-31-07' .

THis is what it shows on JEM

//STEP0100 INCLUDE MEMBER=PMA94220
I1// SET PARM2='GCA94220,1,12-31-08'
//STP9421A EXEC PGM=XA071090,PARM=&PARM2
--STP9421A EXEC PGM=XA071090,PARM=GCA94220,1,12-31-08
***ERROR - DSS3020E - MISSING EQUAL SIGN ON EXEC PARM
***ERROR - DSS3020E - MISSING EQUAL SIGN ON EXEC PARM


Could you please help on this one?

Thansk,
Manny5


arcvns wrote:
Manny5,

How about writing the date to a PDS member as,
Code:
//             PARM='mm-dd-yy'
and INCLUDE ing this member in other JCLs
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Fri Jan 02, 2009 4:41 pm    Post subject:
Reply with quote

Try wrapping quotes around the &PARM2.......
Back to top
View user's profile Send private message
Manny5

New User


Joined: 10 Nov 2008
Posts: 12
Location: Pune

PostPosted: Fri Jan 02, 2009 4:54 pm    Post subject:
Reply with quote

Tried it and it caused more problems icon_sad.gif

//STEP0100 INCLUDE MEMBER=PMA94220
I1// SET PARM2=''GCA94220,1,12-31-08''
***ERROR - DSS6151E - INCORRECT USE OF APOSTROPHE ON "SET " STATEMENT
***ERROR - DSS2045E - SYMBOLIC NAME "1,12-31-08'" LONGER THAN 8
CHARACTERS
***ERROR - DSS2093E - "1,12-31-" NOT PROPERLY DELIMITED - MISSING EQUAL
//STP9421A EXEC PGM=XA071090,PARM=&PARM2
***ERROR - DSS3150E - INVALID CHARACTER IN PARM FIELD



CICS Guy wrote:
Try wrapping quotes around the &PARM2.......
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Fri Jan 02, 2009 5:03 pm    Post subject:
Reply with quote

Make that the &PARM2 of the EXEC statement.......
Or should that be parentheses? Or both? Or either?
Examples of the PARM Parameter
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Jan 02, 2009 5:04 pm    Post subject:
Reply with quote

Code:
// SET PARM2='GCA94220,1,12-31-08'
//STP9421A EXEC PGM=XA071090,PARM='&PARM2'
You had a fifty-fifty chance but picked the wrong one to change.
Back to top
View user's profile Send private message
Manny5

New User


Joined: 10 Nov 2008
Posts: 12
Location: Pune

PostPosted: Fri Jan 02, 2009 5:13 pm    Post subject:
Reply with quote

Hey thanks a Ton. It worked this time icon_smile.gif



Robert Sample wrote:
Code:
// SET PARM2='GCA94220,1,12-31-08'
//STP9421A EXEC PGM=XA071090,PARM='&PARM2'
You had a fifty-fifty chance but picked the wrong one to change.
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 Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm


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