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

Remove junk values in a file and rite only the characters


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jan 25, 2017 10:01 pm
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

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Wed Jan 25, 2017 10:57 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
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
Search our Forums:

Back to Top