IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to add 9999.99 field?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mohitsaini
Warnings : 1

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Tue Jun 27, 2006 9:03 pm
Reply with quote

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

DFSORT Developer


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

PostPosted: Tue Jun 27, 2006 11:18 pm
Reply with quote

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

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Wed Jun 28, 2006 12:02 pm
Reply with quote

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

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Wed Jun 28, 2006 5:26 pm
Reply with quote

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

DFSORT Developer


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

PostPosted: Wed Jun 28, 2006 8:51 pm
Reply with quote

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

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Thu Jun 29, 2006 2:52 pm
Reply with quote

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

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Thu Jun 29, 2006 3:16 pm
Reply with quote

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

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Thu Jun 29, 2006 3:27 pm
Reply with quote

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

DFSORT Developer


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

PostPosted: Thu Jun 29, 2006 9:58 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts S0C7 - Field getting overlayed COBOL Programming 2
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
Search our Forums:

Back to Top