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
 
How to add 9999.99 field?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to add 9999.99 field?
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 Moderator


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

PostPosted: Tue Jun 27, 2006 11:18 pm    Post subject:
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    Post subject: Re: How to add 9999.99 field?
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    Post subject: Re: How to add 9999.99 field?
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 Moderator


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

PostPosted: Wed Jun 28, 2006 8:51 pm    Post subject:
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    Post subject: Re: How to add 9999.99 field?
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    Post subject: Re: How to add 9999.99 field?
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    Post subject: Re: How to add 9999.99 field?
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 Moderator


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

PostPosted: Thu Jun 29, 2006 9:58 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to include a particular field val... sakrat DFSORT/ICETOOL 8 Fri Apr 06, 2018 8:27 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm

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