View previous topic :: View next topic
|
Author |
Message |
gretchen
New User
Joined: 29 Jul 2009 Posts: 7 Location: Kansas
|
|
|
|
I just need a simple mainframe REXX program that will read a sequential file as input, strip all the punctuation and spaces out of one of the fields, and then write the entire record back out.
Can anyone help? Our REXX programmer is out until next Tuesday and I need to get this completed before then.
Thanks! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
gretchen
New User
Joined: 29 Jul 2009 Posts: 7 Location: Kansas
|
|
|
|
yup, i understand that. i've been checking out REXX commands all day (including the ones you noted) trying to learn it myself. but just got to thinking that this was such a basic issue that someone must have one laying around that they could easily post. thanks anyway. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
a quick and dirty approach for procesiing a dataset with a couple thousandth record could be
Code: |
Address TSO "EXECIO * READ INDD ( STEM DATA. FINIS
coun = data.0
Do i = 1 to coun
head = substr(data.i,1,len0 - 1)
from = substr(data.i,1+len0,leng)
tail = substr(data.i,1+len0+leng)
temp = TRANSLATE(from," ",".,!?")
dest = SPACE(temp,0)
data.i = head || left(dest,leng) || tail
end
Address TSO "EXECIO "coun" WRITE OUTDD ( STEM DATA. FINIS |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello gretchen and welcome to the forum,
If this is a high-volume file, suggest you reconsider using rexx. . . Rexx is possibly the worst possible choice for "copying" large files.
Depending on your requirement, you may be able to do what you need using your sort product or some other available utility. . . |
|
Back to top |
|
|
|