Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
siva102

New User

Joined: 28 Nov 2007
Posts: 64
Location: Chennai

 Posted: Tue Jun 24, 2008 12:12 pm    Post subject: Is it possible to do arithmatic operation on two \$ fields ?? 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

dick scherrer

Site Director

Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

 Posted: Tue Jun 24, 2008 12:22 pm    Post subject: 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.
siva102

New User

Joined: 28 Nov 2007
Posts: 64
Location: Chennai

 Posted: Tue Jun 24, 2008 12:30 pm    Post subject: 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
gcicchet

Senior Member

Joined: 28 Jul 2006
Posts: 1703
Location: Australia

Posted: Tue Jun 24, 2008 3:06 pm    Post subject:

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
siva102

New User

Joined: 28 Nov 2007
Posts: 64
Location: Chennai

 Posted: Tue Jun 24, 2008 4:34 pm    Post subject: Thanks gerry.
Frank Yaeger

DFSORT Moderator

Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

 Posted: Tue Jun 24, 2008 8:02 pm    Post subject: Siva, For more information on doing arithmetic with DFSORT, see: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/2.4.10?DT=20060615173822 If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from: www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Sum the fields in particular format f... sharana64 DFSORT/ICETOOL 9 Fri Jan 05, 2018 1:11 am Utility for search operation Gopalakrishna551 TSO/ISPF 11 Wed Jan 03, 2018 11:07 am SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us