Negative sign is in last byte to be moved to first



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Negative sign is in last byte to be moved to first

Postby trilochan_p » Sat Apr 14, 2012 10:10 am

Hi,

I have amount numeric input data where negative sign is in last byte and i wants this sign symbol into front of the amount field as mentioned below.
Please help me on this.

INPUT DATA - STARTING FROM COLUMN POSITION - 106 TO 120 and negative sign symbol in 120th position.

----1----+----2
        642.32-
     27,310.52-
      8,272.06
    218,232.06-
  1,459,410.83-


OUTPUT DATA - REQUIRED STARTING FROM COLUMN POSITION - 106 TO 120
----1----+----2
        -642.32
     -27,310.52
       8,272.06
    -218,232.06
  -1,459,410.83
trilochan_p
 
Posts: 15
Joined: Tue Dec 06, 2011 2:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Negative sign is in last byte to be moved to first

Postby BillyBoyo » Sat Apr 14, 2012 4:22 pm

For testing I used your figures, pasted into SYSIN at column 1. So you'll need to change 1,15 to 106,15.

Look up SFF and EDIT/SIGNS in the manual.

For your next posting, please use the Code tags, which preserve spacing, for any data or code that you post.

//NUMEDIT  EXEC PGM=SORT
//SORTIN DD *
        642.32-
     27,310.52-
      8,272.06
    218,232.06-
  1,459,410.83-
//SYSOUT   DD SYSOUT=*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
 OPTION COPY
 INREC OVERLAY=(1:1,15,SFF,
       EDIT=(SIII,III,IIT.TT),SIGNS=(,-))
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post