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
 

 

Removing Junk Chareters in a File

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
View previous topic :: :: View next topic  
Author Message
Anbutheone

New User


Joined: 08 Oct 2008
Posts: 15
Location: Bangalore

PostPosted: Thu Oct 28, 2010 10:36 am    Post subject: Removing Junk Chareters in a File
Reply with quote

Hi All,

I have a requirement to copy a file after replacing all the jink charecters present in the file.

We came to a conclusion that anything less than hex value X'40' is junk. and if any field contains such data, the next step in our job is abending.

So we want to replace all the fields with the value less than x'40' to spaces (X'40').

Is there any way to do it otherthan adding a COBOL program?

i checked in FileAid, but in this, itseems we cannot replace a charecter unless if we know the exact position or the exact value.

Thanks in advance.
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Oct 28, 2010 3:01 pm    Post subject:
Reply with quote

Hi,

here is a FILEAID that will do what you asked for
Code:
//STEP0001 EXEC PGM=FILEAID                                             
//SYSPRINT DD SYSOUT=*                                                 
//DD01     DD DSN=input-file                                           
//DD01O    DD DSN=output-file                                           
//SYSIN    DD *                                                         
$$DD01 COPYALL OUT=0,                                                   
 EA=(001,0,X'3F,3E,3D,3C,3B,3A,39,38,37,36,35,34,33,32,31,30',X'40'),   
 EA=(001,0,X'2F,2E,2D,2C,2B,2A,29,28,27,26,25,24,23,22,21,20',X'40'),   
 EA=(001,0,X'1F,1E,1D,1C,1B,1A,19,18,17,16,15,14,13,12,11,10',X'40'),   
 EA=(001,0,X'0F,0E,0D,0C,0B,0A,09,08,07,06,05,04,03,02,01,00',X'40')   
//*                                                                     


Gerry
Back to top
View user's profile Send private message
Anbutheone

New User


Joined: 08 Oct 2008
Posts: 15
Location: Bangalore

PostPosted: Thu Oct 28, 2010 3:04 pm    Post subject:
Reply with quote

Thanks Gerry.

I will try this.
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 -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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