IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Syncsort to replace Non-Displayable data


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prasadplease

New User


Joined: 02 Sep 2006
Posts: 31
Location: Mumbai

PostPosted: Wed Aug 12, 2009 5:46 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 12, 2009 5:49 pm
Reply with quote

Without knowing the original format of the data how can you even think to reconstruct it.
Back to top
View user's profile Send private message
prasadplease

New User


Joined: 02 Sep 2006
Posts: 31
Location: Mumbai

PostPosted: Wed Aug 12, 2009 5:54 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Aug 12, 2009 9:35 pm
Reply with quote

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
View user's profile Send private message
prasadplease

New User


Joined: 02 Sep 2006
Posts: 31
Location: Mumbai

PostPosted: Thu Aug 13, 2009 12:26 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Aug 13, 2009 7:45 pm
Reply with quote

You're welcome - good to hear it worked - thanks for letting us know icon_smile.gif

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top