Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Syncsort to replace Non-Displayable data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort to replace Non-Displayable data
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 12, 2009 5:49 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Aug 12, 2009 9:35 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Thu Aug 13, 2009 7:45 pm    Post subject: Reply to: Syncsort to replace Non-Displayable data
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us