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
 

 

Remove junk values in a file and rite only the characters

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
KP1125

New User


Joined: 25 Jan 2017
Posts: 1
Location: India

PostPosted: Wed Jan 25, 2017 9:58 pm    Post subject: Remove junk values in a file and rite only the characters
Reply with quote

I executed an query and the output is copied to output file but their are junk values copied. I want to remove the junk characters and copy only text

Input file :

************
ARM........
UNIT.......
ARM........
OL........

Expected output file:
*******************
ARM
UNIT
ARM
OL

I tried many options but could not remove it completely as the query output is not of fixed length.

Advice how can we do it for variable length field.[/code]
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8086
Location: East Dubuque, Illinois, USA

PostPosted: Wed Jan 25, 2017 10:01 pm    Post subject:
Reply with quote

There is no such thing as "junk characters" or "junk values" -- period. Each and every character has a valid value in the collating sequence. The characters may not be printable but that does not mean they are "junk".

You should browse or edit the data set in hex mode so you can see precisely what the non-printing characters actually are. Once you know what they are, you can devise a way to remove them.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1717
Location: NY,USA

PostPosted: Wed Jan 25, 2017 10:57 pm    Post subject:
Reply with quote

An old saying " I couldn't repair your brakes, so I made your horn louder".
Being said, Correct your bad SQL (I assume query means SQL here ) , NOT to add anything you don't want than correcting anything later. If you can't do it yourself then add a new topic to DB2 section and share the problem.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP xls file from Mainfrmae kumarsatheeshc1 TSO/ISPF 5 Tue Jun 20, 2017 6:56 pm
No new posts Validate if a Value from the file is ... balacsv2 COBOL Programming 8 Mon Jun 19, 2017 11:52 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am
No new posts XML Parse for large file muralikrishnan_new COBOL Programming 3 Mon Jun 12, 2017 12:50 pm


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