View previous topic :: View next topic
|
Author |
Message |
Manny5
New User
Joined: 10 Nov 2008 Posts: 12 Location: Pune
|
|
|
|
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 |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
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 |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
Hi Manny,
From the first program, write the date to a file and from GCA94210 read the file to get date. |
|
Back to top |
|
|
Manny5
New User
Joined: 10 Nov 2008 Posts: 12 Location: Pune
|
|
|
|
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 |
|
|
Manny5
New User
Joined: 10 Nov 2008 Posts: 12 Location: Pune
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Manny5,
How about writing the date to a PDS member as,
and INCLUDE ing this member in other JCLs |
|
Back to top |
|
|
Manny5
New User
Joined: 10 Nov 2008 Posts: 12 Location: Pune
|
|
|
|
Let me give it a shot. hope this works.
arcvns wrote: |
Manny5,
How about writing the date to a PDS member as,
and INCLUDE ing this member in other JCLs |
|
|
Back to top |
|
|
Manny5
New User
Joined: 10 Nov 2008 Posts: 12 Location: Pune
|
|
|
|
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
arcvns wrote: |
Manny5,
How about writing the date to a PDS member as,
and INCLUDE ing this member in other JCLs |
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
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 |
|
|
Manny5
New User
Joined: 10 Nov 2008 Posts: 12 Location: Pune
|
|
|
|
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,
and INCLUDE ing this member in other JCLs |
|
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Try wrapping quotes around the &PARM2....... |
|
Back to top |
|
|
Manny5
New User
Joined: 10 Nov 2008 Posts: 12 Location: Pune
|
|
|
|
Tried it and it caused more problems
//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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Manny5
New User
Joined: 10 Nov 2008 Posts: 12 Location: Pune
|
|
|
|
Hey thanks a Ton. It worked this time
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 |
|
|
|