Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8200
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: 1827
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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us