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 BLANKS present upfront

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Remove BLANKS present upfront
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: 578
Location: USA

PostPosted: Wed Mar 14, 2012 8:29 pm    Post subject:
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 Moderator


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

PostPosted: Wed Mar 14, 2012 10:57 pm    Post subject:
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    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 Remove Special Characters from Mainfr... Rodger Zhang All Other Mainframe Topics 6 Wed Jul 06, 2016 1:12 am
No new posts Remove header only knobi SYNCSORT 5 Mon Feb 15, 2016 10:42 pm
No new posts Check if a member is present in libra... enrico-sorichetti All Other Mainframe Topics 1 Wed Feb 03, 2016 12:29 pm
No new posts Append to file, but also remove old r... Garry Carroll JCL & VSAM 3 Mon Jan 25, 2016 8:05 pm
No new posts Remove intermediate spaces Pallavi Vishwanath SYNCSORT 1 Fri Jan 15, 2016 2:45 am


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