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
 
To read line by line in jcl,proc and manipulate the same

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
rashmi1482

New User


Joined: 22 May 2007
Posts: 3
Location: Bangalore

PostPosted: Sat Dec 26, 2009 8:30 pm    Post subject: To read line by line in jcl,proc and manipulate the same
Reply with quote

Hi,
I want to create a REXX tool change a prod jcl to test jcl by changing some jcl parameters and passing some symbolic parameters to the jcl. I want to pass an environment variable and jobname from an ispf panel and then the REXX tool should make the appropriate changes to the prod
jcl.

Also I want to read each line of a proc and if a parmlib member is encountered , the tool should go to the parmlib and search in the member for a string, if found the parmlib should be changed and a symbolic parameter should be introduced for the same in proc.

Also some steps should be commented out based on a parmlib member and exec pgm.

Please let me know if there is anyway of doing this thru REXX.

Also please send me the link of some rexx tool development materials.

Thanks,
Rashmi
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Sat Dec 26, 2009 9:41 pm    Post subject: Reply to: To read line by line in jcl,proc and manipulate th
Reply with quote

since You asked for a Yes/no answer, thats what You are going to get
Yes... it can be done ( if You have the skill )

for the rexx manuals here they are ( not the last ones, but enough to get started
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/IKJ4BK80

if You want to search for the latest fashion here is the whole manuals shebang
http://www-03.ibm.com/systems/z/os/zos/bkserv/index.html

if You want to see rexx in action here is a pointer to a jcl parser I wrote
http://ibmmainframes.com/viewtopic.php?t=32494
Back to top
View user's profile Send private message
rashmi1482

New User


Joined: 22 May 2007
Posts: 3
Location: Bangalore

PostPosted: Sun Dec 27, 2009 1:06 pm    Post subject: Reply to: To read line by line in jcl,proc and manipulate th
Reply with quote

Hi,

Could you helpme on how to go about reading each line of a jcl with REXX because this the first thing that needs to be implemented in my case.

My idea is
1. Ge to the job name and the environmnet name from a panel.
2. Go to the job and make changes depending on the environment using rexx.
3. For this read line by line of jcl and make changes to the required parameters.

Please help me on how to read line by line of the jcl.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Sun Dec 27, 2009 1:14 pm    Post subject: Reply to: To read line by line in jcl,proc and manipulate th
Reply with quote

If You are so new to rexx that You cannnot read a line from a pds member or sequential dataset,

it would be wiser to review You planning in order to provide time for training.

I posted the link to the docs, You might also search the forums for "EXECIO",
You will find lots of samples and hints on reading
( also on using edit macros to achieve what You want )

I do not judge I state
why everybody wants to build tools without having the basic skills ??
Back to top
View user's profile Send private message
mtaylor

Active User


Joined: 20 Feb 2009
Posts: 108
Location: Kansas City

PostPosted: Mon Dec 28, 2009 7:29 pm    Post subject:
Reply with quote

This topic comes up pretty frequently. What the op is asking for is a tool to refactor jcl. My question is; why rexx on the mainframe? Why not transfer the jcl to a pc, do the changes there, and transfer back to the mainframe? Then you have access to all the tools and languages in the pc world like python etc and aren't limited to only rexx?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1777
Location: Bloomington, IL

PostPosted: Thu Dec 31, 2009 2:48 am    Post subject:
Reply with quote

mtaylor wrote:
This topic comes up pretty frequently. What the op is asking for is a tool to refactor jcl. My question is; why rexx on the mainframe? Why not transfer the jcl to a pc, do the changes there, and transfer back to the mainframe? Then you have access to all the tools and languages in the pc world like python etc and aren't limited to only rexx?


  1. You aren't limited to just Rexx on the mainframe, although 90% of the posters here have apparently only ever heard of "Rexx" and "JCL".
  2. That same 90% would be pressed to their limits to do that transfer once. Asking them to automate it for hundreds of data sets transferred and modified by dozens of users would reduce them to tears of frustration.
  3. Hi, Opal!
Back to top
View user's profile Send private message
valyk

Active User


Joined: 16 Apr 2008
Posts: 104
Location: South Carolina

PostPosted: Tue Jan 05, 2010 12:41 am    Post subject:
Reply with quote

It just so happens that I had a need to do something very similar for our CICS regions:

Code:
/* Search proc for parmlib */
READ_PROC:
  ADDRESS TSO
  "ALLOC DATASET('"INPROC"("IN_NAME")') FILE(INPROC) SHR"
  "EXECIO * DISKR INPROC (FINIS STEM INPROC."
  "FREE FILE(INPROC)"

  DO I = 1 TO INPROC.0
    IF POS('PARMLIB('||OUT_NAME,INPROC.I) > 0 THEN DO
      PARSE VAR INPROC.I 'DSN=' INPARM '('

      CALL READ_PARM
    END
  END
RETURN

/* Read parmlib and search for GRPLIST parameters */
READ_PARM:
  ADDRESS TSO
  "ALLOC DATASET('"INPARM"("IN_NAME")') FILE(INPARM) SHR"
  "EXECIO * DISKR INPARM (FINIS STEM INPARM."
  "FREE FILE(INPARM)"

  DO I = 1 TO INPARM.0
    IF POS('GRPLIST=(',INPARM.I) > 0 THEN
      PARSE VAR INPARM.I 'GRPLIST=(' IBMLIST ',' PRODUCT ',' JOB ')' .
  END
RETURN
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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts LIBDEF not working in called proc packerm CLIST & REXX 0 Fri Sep 15, 2017 7:22 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm

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