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

Control-M set a PARM value on a specific date


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dp33770

New User


Joined: 04 Jul 2007
Posts: 91
Location: Hyderabad

PostPosted: Thu Jan 08, 2009 6:23 pm
Reply with quote

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
View user's profile Send private message
dp33770

New User


Joined: 04 Jul 2007
Posts: 91
Location: Hyderabad

PostPosted: Thu Jan 08, 2009 11:26 pm
Reply with quote

we are using control m
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Jan 09, 2009 3:53 am
Reply with quote

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
View user's profile Send private message
dp33770

New User


Joined: 04 Jul 2007
Posts: 91
Location: Hyderabad

PostPosted: Fri Jan 09, 2009 11:25 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Jan 09, 2009 11:58 am
Reply with quote

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
View user's profile Send private message
dp33770

New User


Joined: 04 Jul 2007
Posts: 91
Location: Hyderabad

PostPosted: Fri Jan 09, 2009 2:00 pm
Reply with quote

Thanks a Lot
Back to top
View user's profile Send private message
dp33770

New User


Joined: 04 Jul 2007
Posts: 91
Location: Hyderabad

PostPosted: Fri Jan 09, 2009 2:02 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Sat Jan 10, 2009 4:28 am
Reply with quote

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
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top