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: 25
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

Active Member


Joined: 15 Aug 2015
Posts: 606
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
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1189

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 User


Joined: 01 Sep 2015
Posts: 495
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
This topic is locked: you cannot edit posts or make replies. Sort to include records of file 2 int... Java & MQSeries 1
No new posts VB file copy COBOL program gives erro... COBOL Programming 3
No new posts SORT for dynamic trailer record + CSV... DFSORT/ICETOOL 14
No new posts Same command as on commandline in REX... TSO/ISPF 6
No new posts Creating filelist ps file JCL & VSAM 2
Search our Forums:

Back to Top