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
 

 

i want to squeeze the spaces between two fields

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Shanmugavel

New User


Joined: 15 Dec 2006
Posts: 7
Location: CHENNAI

PostPosted: Mon Oct 29, 2007 12:20 pm    Post subject: i want to squeeze the spaces between two fields
Reply with quote

if i don know the length of the field
say for example,

INPUT:
Code:
----|----|----|----|----|----|----|----|----|----|----|----|----|----|
SYNCSORT                                    SORT  OK   
SYNC            SORT     

OUTPUT:
Code:
----|----|----|----|----|----|----|----|----|----|----|----|----|----|
SYNCSORT SORT OK
SYNC SORT

i want to squeeze the spaces between two fields.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Oct 30, 2007 1:30 am    Post subject:
Reply with quote

Hello,

Is there some reason you can't do this with a bit of code?
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: Tue Oct 30, 2007 1:36 am    Post subject:
Reply with quote

Shanmugavel,

If you have access to DFSORT, you can use this DFSORT job. I used 70 for the maximum length of the records but you can change that if appropriate.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(1,70,SQZ=(SHIFT=LEFT,MID=C' '))
/*
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Oct 30, 2007 2:12 am    Post subject:
Reply with quote

You can also use the SPACE function of REXX.

O.
Back to top
View user's profile Send private message
Shanmugavel

New User


Joined: 15 Dec 2006
Posts: 7
Location: CHENNAI

PostPosted: Tue Oct 30, 2007 10:38 am    Post subject: Reply to: i want to squeeze the spaces between two fields
Reply with quote

Hi,

We don have DFSORT installed in our machine. so, SQZ function wont works.

We have SYNCSORT alone.

the fields are variable one.
say SAM--------100-----
RAGHUL----4----

THe output should be SAM|100|
RAGHUL|4|
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Wed Nov 28, 2007 12:00 pm    Post subject:
Reply with quote

Is there any command in SYNCSORT which corresponds to the SQZ command in DFsort??


PS : I know i am replying to an old post icon_biggrin.gif .. just got curious to know this...didnt see any discussion on this topic elsewhere...
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Wed Nov 28, 2007 12:13 pm    Post subject:
Reply with quote

Raak,

Follow the link -

http://ibmmainframes.com/about11080.html
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Tue Dec 16, 2008 3:54 am    Post subject:
Reply with quote

raak wrote:
Is there any command in SYNCSORT which corresponds to the SQZ command in DFsort??

SyncSort for z/OS 1.3 supports the SQZ function.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Sum Fields ballaswaroop DFSORT/ICETOOL 4 Tue May 02, 2017 11:07 am
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm


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