View previous topic :: View next topic
|
Author |
Message |
chweety
New User
Joined: 03 Jun 2010 Posts: 5 Location: hyderabad
|
|
|
|
HI,
I have to modify a JCL in a particular place using REX...
My JCL is as follows
//Chweety PROC MSGOUT='*',QDUMP='*'
//*
//*
//*
//***************
//** Chweety1 **
//***************
//*
//Chwwety1 EXEC PGM=******,REGION=5000K,
//* PARM='UPDT,YYMMDD'
// PARM='UPDT,100602'
//SYSUDUMP DD SYSOUT=&QDUMP
//DSPLEX DD SYSOUT=&MSGOUT
//SYSOUT DD SYSOUT=&MSGOUT
//DSPLD DD SYSOUT=&MSGOUT,
I need to change the PARM value (Which is highlighted in RED color) here with current date. format should be YYMMDD
Note : We cant achieve this by doing "C ALL" as the date changes every day.
I have seen a similar posts by mainframebegginer but that post was incomplete. i did't get anything from there.
Can anyone please help? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
usually the best way to implement these jcl changes is to use the symbol substitution facility of Your scheduling product
fast, effective, no need to write any code,
You only have to ask Your scheduling support telling the rules |
|
Back to top |
|
|
chweety
New User
Joined: 03 Jun 2010 Posts: 5 Location: hyderabad
|
|
|
|
Thanks sorichetti for your valuable response.
Yes, you are rite i can do that. but there are some other PS files which needs to be updated with current date.
Can you please guide me in doing these changes in JCL? i m just curious about this and want to learn some tricks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Post what you have and what you want and someone may have a suggestion. |
|
Back to top |
|
|
chweety
New User
Joined: 03 Jun 2010 Posts: 5 Location: hyderabad
|
|
|
|
Hi,
I have written a code which enter into the JCL... but i am not sure how to tell my program to go to PARM value ( Date value,as shown in my first post).
How to go there and update the parm value to current date?
Hope his helps ..please let me know if any other details are required. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Rather straight-forward, presuming that you've read the contents of the JCL into a stem variable named jcl.
Code: |
/* REXX */
...
Parse Value Date(O) With yy"/"mm"/"dd
Do z = 1 To jcl.0
Parse Var jcl.z slash parm "'"theparm"'" .
If slash = "//" & parm = "PARM=" & Left(theparm,4) = "UPDT" Then
Do
jcl.z = "// PARM='UPDT,"yy""mm""dd"'"
End
Say jcl.z
End
|
|
|
Back to top |
|
|
chweety
New User
Joined: 03 Jun 2010 Posts: 5 Location: hyderabad
|
|
|
|
wowww ... seems like you have solved this in seconds Superk.....
one thing is not yet clear for me...."presuming that you've read the contents of the JCL into a stem variable named jcl" .... what does this actually mean?
Contents ..Can you please tell me what do you mean by contents? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
Back to top |
|
|
chweety
New User
Joined: 03 Jun 2010 Posts: 5 Location: hyderabad
|
|
|
|
Sorry for my late response....
I have an urgent work so i flyed to someother place where i didnt have access to internet.
I am now replying from my phone.
I am really very sorry guys..Thanks a lot for your responses. i will be back on June14th and will try to implement the solutions you have provided.
Thanks again. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good luck
Someone will be here when you return,
d |
|
Back to top |
|
|
|