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

Move the fields to left justified using SORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
akshaiya

New User


Joined: 17 Sep 2005
Posts: 49

PostPosted: Thu Feb 15, 2007 7:30 pm
Reply with quote

Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
200612|50|    43557|      27277056.000|       258510372.310|       3541025.000
200612|51|    11632|       6375118.000|        58395328.150|        622217.978
******************************** Bottom of Data ********************************


I want to move the fields to left justified. Field delimiter should be moved accordingly. The output should be
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
200612|50|43557|27277056.000|258510372.310|3541025.000
200612|51|11632|6375118.000|58395328.150|622217.978
******************************** Bottom of Data ********************************


Is it possible?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Feb 15, 2007 7:53 pm
Reply with quote

Using DFSORT's SQZ function, you can squeeze out the blanks. Go to DFSORT/ICETOOL Reference Material to look up "Squeeze out blanks or other characters" in Smart DFSORT Tricks
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: Thu Feb 15, 2007 10:14 pm
Reply with quote

akshaiya,

Here's a DFSORT job that will do what you asked for. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use DFSORT's SQZ function. If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:

Use [URL] BBCode for External Links

Code:

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

New User


Joined: 17 Sep 2005
Posts: 49

PostPosted: Thu Feb 15, 2007 10:29 pm
Reply with quote

Thanks Frank and William.
Code:
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED
ICE000I 1 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 11:58 ON THU FEB
            OPTION COPY
            INREC BUILD=(1,80,SQZ=(SHIFT=LEFT))
                              $
ICE006A 0 OPERAND DEFINER ERROR
ICE052I 3 END OF DFSORT


But it gives maxcc=16.
Do i need to add some libraries to recognise SQZ
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: Thu Feb 15, 2007 11:27 pm
Reply with quote

I already covered this in my first post:

Quote:
You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use DFSORT's SQZ function. If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:

Use [URL] BBCode for External Links
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 8
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top