Page 1 of 1

Replace the a string with spaces without changing the recl

PostPosted: Wed Nov 08, 2017 4:50 pm
by jithu
Hi All,

I would like to replace input record with spaces once we found PIC clause in the input file.

Input file
Input file.PNG



Expected output

out put.PNG


File record length is 80
expecting Sort methodology.

Re: Replace the a string with spaces without changing the re

PostPosted: Wed Nov 08, 2017 4:58 pm
by enrico-sorichetti
DO NOT POST IMAGES !
no reason to waste 25K bytes when
a plain text cut and paste from Your 3270 emulator is more than enough
( no more than 1kb bytes )

Re: Replace the a string with spaces without changing the re

PostPosted: Wed Nov 08, 2017 5:05 pm
by jithu
Apologies for that . Will keep it in my mind.

Re: Replace the a string with spaces without changing the re

PostPosted: Wed Nov 08, 2017 6:50 pm
by NicC
Why do you want to do this? I ask because it may be easier to use the compile listing to extract variable names.

Re: Replace the a string with spaces without changing the re

PostPosted: Wed Nov 08, 2017 8:02 pm
by prino
NicC wrote:Why do you want to do this? I ask because it may be easier to use the compile listing to extract variable names.

Sheesh,don't you know by now? It's the requirement!

Re: Replace the a string with spaces without changing the re

PostPosted: Thu Nov 09, 2017 10:03 am
by jithu
NicC wrote:Why do you want to do this? I ask because it may be easier to use the compile listing to extract variable names.



That is my requirement. I am developing a logic to fetch all variables in the data division using sort. Now i am facing difficulties in formatting the data which i gave?

Re: Replace the a string with spaces without changing the re

PostPosted: Fri Feb 09, 2018 10:24 pm
by Aki88
Hello,

Fairly sure that you'd have found a solution for this by now; just in case you haven't, explore the usage of PARSE keyword in *SORT.
PARSE, coupled with ENDBEFR should give you the desired output.