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

Removing Junk Chareters in a File


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
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
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: 1702
Location: Australia

PostPosted: Thu Oct 28, 2010 3:01 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top