View previous topic :: View next topic
|
Author |
Message |
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
Hi all,
could any one send me the SORT card to do some arithmatic operation on two fields having $ values.
ex :-
POS 4 to 9 10 to 14
i/p $25.40 $20.30
and i need the output from location 16 to 20.
please let me know if anyone got the answer.
Thanks,
Siva |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
$20.30 will not fit in pos 10-14.
What happens if there is a value less than $10 or over $100?
Please post more complete example data. |
|
Back to top |
|
|
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
Hi dick,
Thanks for the reply....
I dont have much more idea abt the SORT card. But my requirement is to do some addition or substraction on the $ values.
So for a simple understanding i only gave like that.
So could u please let me know more abt how to do the task with some example.
Thanks in advance
Best Regards,
Siva |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
here's some examples
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
$19.31 $99.32
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTREC OVERLAY=(16:01,6,UFF,SUB,8,6,UFF,EDIT=(S$TT.TT),SIGNS=(,-))
/* |
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
$99.31 $99.32
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTREC OVERLAY=(16:01,6,UFF,ADD,8,6,UFF,EDIT=($TTT.TT))
/*
|
Gerry |
|
Back to top |
|
|
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
Thanks gerry. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
|