Adding Trailer when comma or decimal point is involved



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Adding Trailer when comma or decimal point is involved

Postby Aech » Thu Jul 12, 2018 3:23 pm

Hi,
So, I have been playing around the Header and Trailer options in OUTFIL. From what I could gather from the manuals is, if I have to take a total amount (or sum) of my data like below with a comma

25,800 or 5,200


Then I would say in OUTFIL

TOT=(01,6,PD,M12,LENGTH=10)


which should give me the result I require.

If I have a decimal point in my data like below

66.00 or 3.55


Then I could say in OUTFIL as

TOT=(01,4,BI,EDIT=(IIIIT))


which should give me what I want

But, what if my data looks like below with a mixture of both commas and decimal points

1,100.15 or 10.00


Could you guys let me know if my required result is 1,110.15 then how can I achieve this. Do I have to reformat my data to remove the comma or decimal point ? or is there any way I would get a summation of the number with mixture of these symbols.
Aech
 
Posts: 11
Joined: Mon Mar 05, 2018 2:50 pm
Has thanked: 6 times
Been thanked: 0 time

Re: Adding Trailer when comma or decimal point is involved

Postby steve-myers » Thu Jul 12, 2018 6:36 pm

JCL is the control statements you use to direct the system to assign the resources required to run the programs required to perform the tasks you require.

JCL cannot manipulate your data in any way.

Based on your use of OUTFIL, I suspect this topic belongs in the DFSORT/ICETOOL/ICEGENER forum or the Syncsort/Synctool forum.

I will transfer this topic to the DFSORT forum for you. If you use Syncsort, you can transfer this topic to the Syncsort/Synctool forum yourself.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Adding Trailer when comma or decimal point is involved

Postby Robert Sample » Thu Jul 12, 2018 7:55 pm

If you have a decimal point in addition to the commas, M18 instead of M12 should give you what you want.

These users thanked the author Robert Sample for the post:
Aech (Mon Jul 16, 2018 9:04 pm)
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Adding Trailer when comma or decimal point is involved

Postby Aech » Mon Jul 16, 2018 9:03 pm

Thanks Robert, M18 worked as expected and I can see the desired results.

Much appreciated.
Aech
 
Posts: 11
Joined: Mon Mar 05, 2018 2:50 pm
Has thanked: 6 times
Been thanked: 0 time

Re: Adding Trailer when comma or decimal point is involved

Postby Robert Sample » Mon Jul 16, 2018 9:18 pm

Glad to hear it worked.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post