View previous topic :: View next topic
|
Author |
Message |
Shanmugavel
New User
Joined: 15 Dec 2006 Posts: 7 Location: CHENNAI
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Is there some reason you can't do this with a bit of code? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You can also use the SPACE function of REXX.
O. |
|
Back to top |
|
|
Shanmugavel
New User
Joined: 15 Dec 2006 Posts: 7 Location: CHENNAI
|
|
|
|
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 |
|
|
raak
Active User
Joined: 23 May 2006 Posts: 166 Location: chennai
|
|
|
|
Is there any command in SYNCSORT which corresponds to the SQZ command in DFsort??
PS : I know i am replying to an old post .. just got curious to know this...didnt see any discussion on this topic elsewhere... |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
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 |
|
|
|