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
 

 

Add Comments in all the members of PDS using REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
amolj

New User


Joined: 08 Nov 2006
Posts: 21
Location: india

PostPosted: Mon Nov 20, 2006 7:24 pm    Post subject: Add Comments in all the members of PDS using REXX
Reply with quote

hi all ....

i have two macros ...
to add comments in all the members of the pds

#################################
First macro : COMMENTS

/* REXX */
"ISREDIT MACRO (STRING)"
STRING = "PROCLIB"
"ISREDIT F FIRST" (STRING)
ADDRESS ISREDIT "(FRED) = "CURSOR
ADDRESS ISREDIT "LINE_BEFORE "FRED " =
'//*******************************************************************'"
ADDRESS ISREDIT "LINE_BEFORE "FRED+1"=
'//*F* FINANCIAL= '"
ADDRESS ISREDIT "LINE_BEFORE "FRED+2"=
'//*******************************************************************'"
ADDRESS ISREDIT "LINE_BEFORE "FRED+3"=
'//*******************************************************************'"
ADDRESS ISREDIT "LINE_BEFORE "FRED+4"=
'//*Z* CRITICAL PATH = '"
ADDRESS ISREDIT "LINE_BEFORE "FRED+5"=
'//*******************************************************************'"
ADDRESS ISREDIT "LINE_BEFORE "FRED+6"=
'//*******************************************************************'"
ADDRESS ISREDIT "LINE_BEFORE "FRED+7"=
'//*I* FILE NAME -> APPLICATION NAME '"
ADDRESS ISREDIT "LINE_BEFORE "FRED+8"=
'//*******************************************************************'"
ADDRESS ISREDIT "LINE_BEFORE "FRED+9"=
'//*******************************************************************'"
ADDRESS ISREDIT "LINE_BEFORE "FRED+10"=
'//*O* FILE NAME -> APPLICATION NAME '"
ADDRESS ISREDIT "LINE_BEFORE "FRED+11"=
'//*******************************************************************'"
ADDRESS ISREDIT "LINE_BEFORE "FRED+12"=
'//*******************************************************************'"
ADDRESS ISREDIT "LINE_BEFORE "FRED+13"=
'//*L* '"
ADDRESS ISREDIT "LINE_BEFORE "FRED+14"=
'//*******************************************************************'"
ADDRESS ISREDIT "LINE_BEFORE "FRED+15"=
'//*******************************************************************'"
ADDRESS ISREDIT "LINE_BEFORE "FRED+16"=
'//*W* DOWNSTREAM IMPACTS '"
ADDRESS ISREDIT "LINE_BEFORE "FRED+17"=
'//*W* APPLICATION NAME '"
ADDRESS ISREDIT "LINE_BEFORE "FRED+18"=
'//*******************************************************************'"
ADDRESS ISREDIT "LINE_BEFORE "FRED+19"=
'//*******************************************************************'"
ADDRESS ISREDIT "LINE_BEFORE "FRED+20"=
'//*B* BYPASS PROCEDURE '"
ADDRESS ISREDIT "LINE_BEFORE "FRED+21"=
'//*B* '"
ADDRESS ISREDIT "LINE_BEFORE "FRED+22"=
'//*B* '"
ADDRESS ISREDIT "LINE_BEFORE "FRED+23"=
'//*******************************************************************'"
"END"
EXIT

#######################################

Second Macro : PDSEDIT


/************************ REXX ********************************/
/* EDIT ALL MEMBERS OF THE CURRENTLY ALLOCATED PDS EXCEPT THE */
/* MEMBER BEING EDITED. PASS NAME OF EDIT MACRO AS ONLY PARM. */
/**************************************************************/
"ISREDIT MACRO (EDITMAC)"
/* IDENTIFY CURRENTLY OPEN PDS */
"ISREDIT (OPENPDS) = DATAID"
/* IDENTIFY CURRENTLY OPEN MEMBER */
"ISREDIT (OPENMBR) = MEMBER"
/* OPEN PDS FOR INPUT */
ADDRESS ISPEXEC
"LMOPEN DATAID("OPENPDS") OPTION(INPUT)"
MBR = ' '
SAVERC = 0
DO WHILE SAVERC = 0
"LMMLIST DATAID("OPENPDS") MEMBER(MBR) OPTION(LIST) STATS(NO)"
SAVERC = RC
IF (SAVERC = 0) & (MBR \= OPENMBR) THEN DO
"EDIT DATAID("OPENPDS") MEMBER("MBR") MACRO("EDITMAC")"
END
END
/* FREE AND CLOSE PDS */
"LMMLIST DATAID("OPENPDS") OPTION(FREE)"
"LMCLOSE DATAID("OPENPDS")"
END
EXIT

######################################

when i execute these Macro from the respective PDS member.... it successfully adds the comments in the members.... BUT everytime it edits a member i need to press F3 to go to next member of the PDS..... there are 1500 members in my PDS so i will have to press F3 1500 times... is there any way by which i can avoid pressing F3 everytime

....please help me i m new to rexx......
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Nov 20, 2006 8:13 pm    Post subject:
Reply with quote

At the end of COMMENT macro, add ADDRESS ISREDIT "END".

O.
Back to top
View user's profile Send private message
siddheart22

New User


Joined: 09 Oct 2006
Posts: 19
Location: Toronto

PostPosted: Tue Apr 10, 2007 2:58 pm    Post subject:
Reply with quote

Hi,

Can someone explain me the REXX code attached in this post above, line-by-line?
I am new to REXX, and would like to learn.

Thanks!!
Sid.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 10, 2007 3:24 pm    Post subject:
Reply with quote

If the inserted lines are always the same, why not just insert a member once rather than a line 20+ times.

"ISREDIT COPY member BEFORE pos"

or

"ISREDIT COPY 'pds name(member)' BEFORE pos"
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 -> TSO/ISPF 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. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am


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