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

Editing a particular column in JCL


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chweety

New User


Joined: 03 Jun 2010
Posts: 5
Location: hyderabad

PostPosted: Fri Jun 04, 2010 1:54 am
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jun 04, 2010 2:00 am
Reply with quote

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

New User


Joined: 03 Jun 2010
Posts: 5
Location: hyderabad

PostPosted: Fri Jun 04, 2010 2:22 am
Reply with quote

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jun 04, 2010 2:24 am
Reply with quote

Hello,

Post what you have and what you want and someone may have a suggestion.
Back to top
View user's profile Send private message
chweety

New User


Joined: 03 Jun 2010
Posts: 5
Location: hyderabad

PostPosted: Fri Jun 04, 2010 2:28 am
Reply with quote

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

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Jun 04, 2010 2:29 am
Reply with quote

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

New User


Joined: 03 Jun 2010
Posts: 5
Location: hyderabad

PostPosted: Fri Jun 04, 2010 2:37 am
Reply with quote

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

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Jun 04, 2010 2:44 am
Reply with quote

Use the EXECIO command to read the JCL. See the REXX Reference manual:
www-03.ibm.com/systems/z/os/zos/bkserv/r11pdf/#tsoe
Back to top
View user's profile Send private message
chweety

New User


Joined: 03 Jun 2010
Posts: 5
Location: hyderabad

PostPosted: Sun Jun 06, 2010 1:18 am
Reply with quote

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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Jun 06, 2010 1:47 am
Reply with quote

Good luck icon_smile.gif

Someone will be here when you return,

d
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
No new posts first column truncated in search result IBM Tools 13
No new posts Split a record with data in a differe... DFSORT/ICETOOL 8
Search our Forums:

Back to Top