Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10327
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: 4650
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: 2086
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
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us