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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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