Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Is it possible to do arithmatic operation on two $ fields ??

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
siva102

New User


Joined: 28 Nov 2007
Posts: 64
Location: Chennai

PostPosted: Tue Jun 24, 2008 12:12 pm    Post subject: Is it possible to do arithmatic operation on two $ fields ??
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Tue Jun 24, 2008 12:22 pm    Post subject:
Reply with quote

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
View user's profile Send private message
siva102

New User


Joined: 28 Nov 2007
Posts: 64
Location: Chennai

PostPosted: Tue Jun 24, 2008 12:30 pm    Post subject:
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Jun 24, 2008 3:06 pm    Post subject:
Reply with quote

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
View user's profile Send private message
siva102

New User


Joined: 28 Nov 2007
Posts: 64
Location: Chennai

PostPosted: Tue Jun 24, 2008 4:34 pm    Post subject:
Reply with quote

Thanks gerry.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Tue Jun 24, 2008 8:02 pm    Post subject:
Reply with quote

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
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us