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: 8036
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: 1679
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 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
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm
No new posts Need help in reading and validating a... ABINAYATHULASI COBOL Programming 8 Tue Apr 18, 2017 11:42 am


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