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

Dynamic data to Parm parameter in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 792
Location: Chennai, India

PostPosted: Fri Nov 28, 2008 2:16 pm
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
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
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
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: 2481
Location: @my desk

PostPosted: Fri Nov 28, 2008 2:45 pm
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Fri Nov 28, 2008 7:06 pm
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
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: 2146
Location: At my coffee table

PostPosted: Fri Jan 02, 2009 4:41 pm
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
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: 2146
Location: At my coffee table

PostPosted: Fri Jan 02, 2009 5:03 pm
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: 8700
Location: Dubuque, Iowa, USA

PostPosted: Fri Jan 02, 2009 5:04 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts db2 vs static data COBOL Programming 1
No new posts System add a USER parm when job submi... TSO/ISPF 4
No new posts External data queue (changes?) CLIST & REXX 0
No new posts Pull data using date difference betwe... DB2 6
No new posts fast data scrambling PL/I & Assembler 10
Search our Forums:

Back to Top