Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us