View previous topic :: View next topic
|
Author |
Message |
prasadplease
New User
Joined: 02 Sep 2006 Posts: 31 Location: Mumbai
|
|
|
|
How to replace non-displayable data (Find P'.') with spaces in a sequential file.
I dont know the position of data, it can appear anywhere in the file. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Without knowing the original format of the data how can you even think to reconstruct it. |
|
Back to top |
|
|
prasadplease
New User
Joined: 02 Sep 2006 Posts: 31 Location: Mumbai
|
|
|
|
The field is alphanumeric having numeric data.
But some records in the file have junk/non-displayable data.
I create a report from this file using sort.
As a result, junk data (if any) is also copied into the report.
I am thinking of passing the report thru a sort step which will simply replace all junk with spaces.
I dunno if this approach will work, but i have 2 try. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Have you done the research to learn which "junk" values need to be replaced?
If there is only 1 or just a few, you might use ALTSEQ to change these to spaces. |
|
Back to top |
|
|
prasadplease
New User
Joined: 02 Sep 2006 Posts: 31 Location: Mumbai
|
|
|
|
Thanks Dick....
I replaced the junk/non-displayable data from the file with spaces using ALTSEQ
Code: |
//SYSIN DD *
SORT FIELDS=COPY
ALTSEQ CODE=(0040)
OUTREC FIELDS=(1,525,TRAN=ALTSEQ)
/* |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome - good to hear it worked - thanks for letting us know
However, it would be far better to correct the code that generates the bad data rather than wasting system resources to fix it later - fwiw.
d |
|
Back to top |
|
|
|