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
 

 

Editing a particular column in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Editing a particular column in JCL
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Fri Jun 04, 2010 2:00 am    Post subject: Reply to: Editing a particular column in JCL
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    Post subject:
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

Site Director


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

PostPosted: Fri Jun 04, 2010 2:24 am    Post subject:
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    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Jun 04, 2010 2:29 am    Post subject: Reply to: Editing a particular column in JCL
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    Post subject:
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

Senior Member


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

PostPosted: Fri Jun 04, 2010 2:44 am    Post subject: Reply to: Editing a particular column in JCL
Reply with quote

Use the EXECIO command to read the JCL. See the REXX Reference manual:
http://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    Post subject: Reply to: Editing a particular column in JCL
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

Site Director


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

PostPosted: Sun Jun 06, 2010 1:47 am    Post subject: Reply to: Editing a particular column in JCL
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 6 Sun Nov 06, 2016 8:11 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Add system date inside of a PS file a... pramitdas DFSORT/ICETOOL 5 Sun Aug 28, 2016 12:06 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm


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