Amount field to make it to right align from left align



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Amount field to make it to right align from left align

Postby learner123 » Mon Jan 17, 2011 2:40 pm

Hi,

-3----+----4----+----
1000.0000000000
150.0000000000
550.0000000000
1000.0000000000
300.0000000000
350.0000000000
350.0000000000
1200.0000000000
-100.0000000000

My requirement is that all my amount fields are left aligned and i have to make them right aligned, how to do this using jcl sort. The amount fields are from 29th to 49th bytes (total 21 bytes).

Let me know if anybody has idea on this.
learner123
 
Posts: 1
Joined: Mon Jan 17, 2011 12:56 am
Has thanked: 0 time
Been thanked: 0 time

Re: Amount field to make it to right align from left align

 

Re: Amount field to make it to right align from left align

Postby Alissa Margulies » Mon Jan 17, 2011 10:05 pm

Here is an example that may help you:
//SORT  EXEC PGM=SORT 
//SYSOUT  DD SYSOUT=* 
//SORTIN  DD * 
1000.0000000000
150.0000000000
550.0000000000
1000.0000000000
300.0000000000
350.0000000000
350.0000000000
1200.0000000000
-100.0000000000   
//SORTOUT DD SYSOUT=* 
//SYSIN   DD *                 
  INREC BUILD=(1,15,JFY=(SHIFT=RIGHT))
  SORT FIELDS=COPY 
/*

If your input file is FB/80, then you should simply be able to modify the OUTREC statement as follows:
INREC BUILD=(1,28,29,21,JFY=(SHIFT=RIGHT),50,31)
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post