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

Syncsort to remove the leading spaces


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Fri Jan 08, 2016 9:47 pm
Reply with quote

Hi,

I have a 10 bytes input numeric field(FB, LRECL=10) which can have 1-9 leading zeros.

I am using the below card to convert those leading zeros into blanks.

I am also using this ugly OUTREC card to remove those leading blanks. Could someone suggest me if I can improvise it.

Code:

INREC BUILD=(1,10,ZD,M12,LENGTH=10)
OUTREC FINDREP=(INOUT=(C'         ',C' ',
                       C'        ',C' ',
                       C'       ',C' ', 
                       C'      ',C' ',   
                       C'     ',C' ',   
                       C'    ',C' ',     
                       C'   ',C' ',     
                       C'  ',C' ')) 


This is the syncsort version I have.

Code:
SYNCSORT FOR Z/OS  1.4.2.0R    U.S. PATENTS: 4210961, 5117495 
                                ****  SYNCSORT FOR Z/OS R 1.4.2
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 27C17, MODEL 2827 710 


Regards
Amar
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Jan 08, 2016 10:52 pm
Reply with quote

Have a look at SQZ in your documentation.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Jan 08, 2016 11:10 pm
Reply with quote

This is not a JCL query - you mention syncsort so why can you not post in the Syncsort part of the forum (which is where I have moved the topic to).
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Sat Jan 09, 2016 2:16 am
Reply with quote

Sorry Nic Clouston, my mistake.

Bill,

That is the strange thing, I couldn't find that in the doc. I got that parm SQZ in Google and tried to search for it in the doc and it is not found. I know it works for DFSORT, so I thought it wouldn't work SYNCSORT. I tried it anyways and it works just fine.

Thank you for the help.


Regards
Amar
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Sat Jan 09, 2016 2:17 am
Reply with quote

By the way for any future references or hits of this post, the solution is given below.

Code:

OUTREC OVERLAY(1,10,SQZ=(SHIFT=LEFT,MID=X'40'))


Regards
Amar
Back to top
View user's profile Send private message
JAYACHANDRAN THAMPY

New User


Joined: 06 Jun 2006
Posts: 8

PostPosted: Fri Jan 15, 2016 4:10 pm
Reply with quote

I think to convert leading zeroes to blanks, you can use M10 edit mask

Code:
OUTREC OVERLAY=(1:1,10,ZD,M10,LENGTH=10) 
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Remove leading zeroes SYNCSORT 4
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
Search our Forums:

Back to Top