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
 

 

Syncsort to remove the leading spaces

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 189
Location: INDIA

PostPosted: Fri Jan 08, 2016 9:47 pm    Post subject: Syncsort to remove the leading spaces
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7234

PostPosted: Fri Jan 08, 2016 10:52 pm    Post subject: Reply to: Syncsort to remove the leading spaces
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: 1715
Location: UK

PostPosted: Fri Jan 08, 2016 11:10 pm    Post subject:
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: 189
Location: INDIA

PostPosted: Sat Jan 09, 2016 2:16 am    Post subject:
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: 189
Location: INDIA

PostPosted: Sat Jan 09, 2016 2:17 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm


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