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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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