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: 1231
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: 2011
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: 712
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 How to split large record length file... DFSORT/ICETOOL 8
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top