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

Remove BLANKS present upfront


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
thisak

New User


Joined: 09 Jun 2006
Posts: 14

PostPosted: Wed Mar 14, 2012 8:07 pm
Reply with quote

I have 2 fields starting from postion 1 and another from 11.
I may get spaces in between digits (for eg. "5 0 234") and without disturbing them, I need to suppress leading blanks alone. I'm not sure how blank spaces will be there at starting.

The below code I have written replaces all space which I don't want.

INREC IFTHEN=(WHEN=INIT,OVERLAY=(1:1,10,JFY=(SHIFT=RIGHT),
11:11,5,JFY=(SHIFT=RIGHT))),
IFTHEN=(WHEN=INIT,FINDREP=(IN=C' ',OUT=C'0'))

Is there any correct way to attain this?
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Wed Mar 14, 2012 8:29 pm
Reply with quote

thisak,
Please provide sample input records and expected output. Try to cover all the situations. Also provide us with LRECL and RECFM for the input file and expected output.

Thanks,
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Mar 14, 2012 10:57 pm
Reply with quote

thisak,

Your description is thoroughly confusing. What do you mean by "without disturbing them"? What do you mean by "suppress leading blanks alone"?

You need to do a much better job of describing what it is you want to do before anyone can help you. Show an example of your input records and what you expect for output and explain the rules for getting from input to output.

To get you started, if you had these input records:

Code:

fld1------fld2-
5 0 234   5 0 2
  1 2 3     980
      0 05 34 1
    1    5 4 1


What would you expect for the output records?
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 Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Remove leading zeroes SYNCSORT 4
No new posts Delete file row if blanks in the firs... DFSORT/ICETOOL 5
No new posts How to remove block of duplicates DFSORT/ICETOOL 8
No new posts To Remove spaces (which is in hex for... JCL & VSAM 10
Search our Forums:

Back to Top