Page 1 of 1

Read data till a particular position in REXX.

Posted: Tue Jan 20, 2015 11:17 am
by Rexx
Hi,

I have a dataset of length 132. For a requirement, I want to read the contents only upto 80th column from it. Is there anyway to do it using ISPF edit macros/REXX?

Re: Read data till a particular position in REXX.

Posted: Tue Jan 20, 2015 11:54 am
by enrico-sorichetti
since zOS I/O is record oriented every read will return a full record
then You are free to process as many bytes as You need

Re: Read data till a particular position in REXX.

Posted: Tue Jan 20, 2015 2:10 pm
by Anuj Dhawan
I'm not a REXX expert however, can substring() be of some use here, no - Enrico?

Re: Read data till a particular position in REXX.

Posted: Tue Jan 20, 2015 2:39 pm
by enrico-sorichetti
Yes Anuj,

but ...
a generic question just deserves a technically correct but generic answer

really these questions make me wonder if the TS has ever read a manual on the subject ;)

Re: Read data till a particular position in REXX.

Posted: Sun May 17, 2015 6:37 pm
by Rexx1
Thanks substring() has helped me.

Re: Read data till a particular position in REXX.

Posted: Mon May 18, 2015 3:14 pm
by Anuj Dhawan
Thanks for the feedback - good luck.