IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to modify file content using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Nileshkul

New User


Joined: 09 May 2016
Posts: 43
Location: India

PostPosted: Tue Sep 14, 2021 5:47 pm
Reply with quote

Apologies in case some thread already present on this.

I need to remove some punctuation marks/invalid data from a PS file read by REXX. How this can be achieved via REXX? Any pointers would be useful.

Thanks - Nilesh
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1335
Location: Bamberg, Germany

PostPosted: Tue Sep 14, 2021 6:03 pm
Reply with quote

Please, show sample Input and desired Output and make use of code tags when doing so.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2141
Location: USA

PostPosted: Tue Sep 14, 2021 6:47 pm
Reply with quote

Nileshkul wrote:
Apologies in case some thread already present on this.

I need to remove some punctuation marks/invalid data from a PS file read by REXX. How this can be achieved via REXX? Any pointers would be useful.

Thanks - Nilesh

1) What is your level of knowledge about REXX?
2) Why REXX, not any of 100500 other tools?
3) Your goal can be achieved via REXX by means of using various REXX statements, and functions. Do you know what a REXX statement is? Do you know what a REXX function is?
4) A PS dataset (not file!!!) cannot be changed in-place. Another (updated) dataset needs to be created. Do you understand this? If not, you must start from learning the basics of zOS, before going to REXX.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 734
Location: Denmark

PostPosted: Tue Sep 14, 2021 9:11 pm
Reply with quote

EXECIO DISKR to read the dataset to a stem or the stack.
Use the POS function to find data, then use the DELSTR function to remove it.
EXECIO DISKW to write the dataset from the stem or stack.
You can use EXECIO DISKRU and EXECIO DISKW to read and rewrite one record at a time, but DISKR, process the data, then DISKW is probably simpler and safer.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Run rexx with JCL Job CLIST & REXX 1
No new posts Run rexx in batch job CLIST & REXX 7
No new posts Does anyone know rexx for VSE CLIST & REXX 3
No new posts Unable to interpret a hex value to De... COBOL Programming 7
No new posts TSO ALLOC In REXX Needs Improvement JCL & VSAM 3
Search our Forums:

Back to Top