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
 

 

Control-M set a PARM value on a specific date

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
dp33770

New User


Joined: 04 Jul 2007
Posts: 92
Location: Hyderabad

PostPosted: Thu Jan 08, 2009 6:23 pm    Post subject: Control-M set a PARM value on a specific date
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: 92
Location: Hyderabad

PostPosted: Thu Jan 08, 2009 11:26 pm    Post subject:
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: 1703
Location: Australia

PostPosted: Fri Jan 09, 2009 3:53 am    Post subject:
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: 92
Location: Hyderabad

PostPosted: Fri Jan 09, 2009 11:25 am    Post subject:
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: 1703
Location: Australia

PostPosted: Fri Jan 09, 2009 11:58 am    Post subject:
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: 92
Location: Hyderabad

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

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

New User


Joined: 04 Jul 2007
Posts: 92
Location: Hyderabad

PostPosted: Fri Jan 09, 2009 2:02 pm    Post subject:
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: 1703
Location: Australia

PostPosted: Sat Jan 10, 2009 4:28 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts PA02 - Programmtically control attent... dodithegreat IMS DB/DC 1 Thu Apr 06, 2017 8:33 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm


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