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

i want to squeeze the spaces between two fields


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Tue Oct 30, 2007 1:30 am
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 Developer


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

PostPosted: Tue Oct 30, 2007 1:36 am
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: 2358
Location: Israel

PostPosted: Tue Oct 30, 2007 2:12 am
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
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
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: 1436
Location: Bangalore,India

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

Raak,

Follow the link -

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

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Tue Dec 16, 2008 3:54 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts Cobol program with sequence number ra... COBOL Programming 5
No new posts To Remove spaces (which is in hex for... JCL & VSAM 10
No new posts How to remove spaces in between. SYNCSORT 12
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
Search our Forums:

Back to Top