View previous topic :: View next topic
|
Author |
Message |
mohitsaini Warnings : 1 New User
Joined: 15 May 2006 Posts: 92
|
|
|
|
Hi All,
I want to add data in 9999.99 field coming from a file.
For ex the input file would look like:
asdf1234.55
addf1452.25
So basically I want to add 1234.55 and 1452.25.
Can anyone help me with that.
Any kind of help would be really appreciated.
-- Mohit |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You didn't say what you expect for output, so I'll assume you just want an extra record with the total. Here's a DFSORT job that will give you that:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB)
//SORTOUT DD DSN=... output file (FB)
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,
TRAILER1=(TOT=(5,7,UFF,EDIT=(IIIIIIIT.TT)))
/*
|
SORTOUT would have:
Code: |
asdf1234.55
addf1452.25
2686.80
|
If that's not what you want, then you need to explain clearly what you do want. |
|
Back to top |
|
|
mohitsaini Warnings : 1 New User
Joined: 15 May 2006 Posts: 92
|
|
|
|
Hey Frank,
Well, that is exactly what I wanted.
Thanks a lot !!!!
Try now I am trying your soln ... as soon as I get it working I will let you now.
thanks once again
-Mohit |
|
Back to top |
|
|
mohitsaini Warnings : 1 New User
Joined: 15 May 2006 Posts: 92
|
|
|
|
Hey Frank,
It is not working at all bcoz UFF is not supported by my system.
Can you suggest some other way of doing it.
Regards,
Mohit |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
If you have DFSORT (ICExxxs messages), then you need z/OS DFSORT PTF UQ95214 or DFSORT R14 PTF UQ95213 in order to use UFF. These PTFs have been available since Dec, 2004. Ask your System Programmer to install z/OS PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006). That will get you all of the current DFSORT function.
If you don't have DFSORT, then I can't help you. |
|
Back to top |
|
|
mohitsaini Warnings : 1 New User
Joined: 15 May 2006 Posts: 92
|
|
|
|
Hi Frank,
Thanks for your reply.
Actually I have got this thing working .... without ICExxxx. Actually I am using SYNCSORT.
What I am doing is ... first I am moving the decimal to the right like
9999.99 --> 999999. ... Step 1
Then I am summing up all the values in the field and then putting the '.' back where it originally belonged lke
9999.99 -- Step 2
Hope I have made myself clear enough.
Regards,
- Mohit |
|
Back to top |
|
|
IQofaGerbil
Active User
Joined: 05 May 2006 Posts: 183 Location: Scotland
|
|
|
|
I think you find that Frank's reply will be along the lines of;
I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort. |
|
Back to top |
|
|
mohitsaini Warnings : 1 New User
Joined: 15 May 2006 Posts: 92
|
|
|
|
Is that so Frank?
No I don't think so .... Being an IBMer I know that IBMers are known for their versatility.
- Mohit
mosaini2@in.ibm.com |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Mohit,
Yes, that's exactly right (it's a direct quote from me that I've posted many times on this board). I assume the reason you're using Syncsort is that you're on contract to another company that uses it. I'm not. I'm a DFSORT developer and I don't support competitive products. |
|
Back to top |
|
|
|