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
 
Unable to edit datasets using REXX

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

New User


Joined: 28 Oct 2013
Posts: 15
Location: India

PostPosted: Mon Mar 24, 2014 2:11 pm    Post subject: Unable to edit datasets using REXX
Reply with quote

I am trying to change a word, for ex. "REXX" to "HI" in multiple members of a PDS using REXX. But when ever I execute my code it simply opens the member in EDIT mode and does nothing. Then I press F3 and it simply opens the next member without doing anything..

Please find the code below -

/* REXX */

SAY "ENTER THE DSN NAME.. ONLY"
PULL DSN
SAY DSN
X = OUTTRAP('SS.')
"LISTDS '"DSN"' MEMBERS"
X = OUTTRAP('OFF')
DO I = 7 TO SS.0
PARSE VAR SS.I MEM
MEM=STRIP(MEM)
SAY "MEMBER NAME IS:" MEM
ADDRESS ISPEXEC "EDIT DATASET('"DSN"("MEM")')"
ADDRESS ISREDIT
"CHANGE REXX HI ALL"
"SAVE"
"MEND"
END
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10309
Location: italy

PostPosted: Mon Mar 24, 2014 2:43 pm    Post subject: Reply to: Unable to edit datasets using REXX
Reply with quote

see here for a TESTED mass change application
http://www.ibmmainframes.com/viewtopic.php?t=60794&highlight=masschg
Back to top
View user's profile Send private message
Soumick Sarkar

New User


Joined: 28 Oct 2013
Posts: 15
Location: India

PostPosted: Mon Mar 24, 2014 3:01 pm    Post subject: Reply to: Unable to edit datasets using REXX
Reply with quote

Thanks a lot for the link but can you please tell what is wrong with my code, as I think that would be more helpful as I am quite new to REXX icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10309
Location: italy

PostPosted: Mon Mar 24, 2014 3:43 pm    Post subject: Reply to: Unable to edit datasets using REXX
Reply with quote

what You see is the consequence of Your coding

Code:
ADDRESS ISPEXEC "EDIT DATASET('"DSN"("MEM")')"


if You want things done automatically You need to provide also an edit macro

see also here for a simpler snippet
http://www.ibmmainframes.com/viewtopic.php?t=25947&highlight=apply

on how to apply a macro to all the member of a pds

the previous snippet was about changing tokens without You writing any additional code

this last snippet is just an harness ...
You will have to write the inner edit macro for Your process

if You are new to REXX probably You are not up for the task
if Your shop has fileAID or FileMANAGER it would be much simpler to use them
search the forum for examples
Back to top
View user's profile Send private message
Soumick Sarkar

New User


Joined: 28 Oct 2013
Posts: 15
Location: India

PostPosted: Mon Mar 24, 2014 4:09 pm    Post subject: Reply to: Unable to edit datasets using REXX
Reply with quote

Thanks for pointing out that I have to use macro. Its working now icon_smile.gif
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 exec macro in the end of edit anatol CLIST & REXX 0 Fri Sep 22, 2017 5:10 am
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts How to Run Rexx Macro? Kalaivignesh CLIST & REXX 5 Fri Sep 01, 2017 9:08 pm

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