View previous topic :: View next topic
|
Author |
Message |
dp33770
New User
Joined: 04 Jul 2007 Posts: 91 Location: Hyderabad
|
|
|
|
Hi,
I have a job which is scheduled to run daily.
But on 1st day of each year (eg. Jan 1st 2007, Jan 1st 2008, ...) the job needs to send a PARM value to a cobol pgm.
Can anyone help me in letting me know how this can be achieved |
|
Back to top |
|
|
dp33770
New User
Joined: 04 Jul 2007 Posts: 91 Location: Hyderabad
|
|
|
|
we are using control m |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
The auto edit facility offers this facility in Control-M.
I suggest you read the JCL and AutoEdit facility section in the Control-M User Manual.
If you show an example of the PARM format I might be able to give you a helping hand.
Gerry |
|
Back to top |
|
|
dp33770
New User
Joined: 04 Jul 2007 Posts: 91 Location: Hyderabad
|
|
|
|
Its a simple PARM of 10 char Long.
Usually the parm is like 'AAAABBBBBB' but on 1st of every year I need to paas 'CCCCBBBBBB'.
So in the cobol prog if it finds 'CCCC' it will act accordingly. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
below is an example of what your JCL will need to be amended to
Code: |
//**********************************************************************
//* %%SET %%MMDD = %%SUBSTR %%$ODATE 5 4
//*
//* %%IF %%MMDD EQ 0101
//* %%SET %%PARMVAL = CCCCBBBBBB
//* %%ELSE
//* %%SET %%PARMVAL = AAAABBBBBB
//* %%ENDIF
//**********************************************************************
//STEP0001 EXEC PGM=COBOLPGM,
// PARM='%%PARMVAL'
|
So whenever the month and day of the year of the ODATE is equal to 0101, the parm will be CCCCBBBBBB else it will be
AAAABBBBBB.
Gerry |
|
Back to top |
|
|
dp33770
New User
Joined: 04 Jul 2007 Posts: 91 Location: Hyderabad
|
|
|
|
Thanks a Lot |
|
Back to top |
|
|
dp33770
New User
Joined: 04 Jul 2007 Posts: 91 Location: Hyderabad
|
|
|
|
Do i need to change anything else other than
PARM='%%PARMVAL' in the JCL.
I believe everything else will be written in Ctl-M |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
you need to place all of the code I provided into your JCL.
You cannot include those %% statements inside a PROC as these variables are resolved by Control-M at submission time.
You can still pass values to a PROC but as symbolic parameters.
Gerry |
|
Back to top |
|
|
|