Page 1 of 1

Adding Trailer when comma or decimal point is involved

PostPosted: Thu Jul 12, 2018 3:23 pm
by Aech
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.

Re: Adding Trailer when comma or decimal point is involved

PostPosted: Thu Jul 12, 2018 6:36 pm
by steve-myers
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.

Re: Adding Trailer when comma or decimal point is involved

PostPosted: Thu Jul 12, 2018 7:55 pm
by Robert Sample
If you have a decimal point in addition to the commas, M18 instead of M12 should give you what you want.

Re: Adding Trailer when comma or decimal point is involved

PostPosted: Mon Jul 16, 2018 9:03 pm
by Aech
Thanks Robert, M18 worked as expected and I can see the desired results.

Much appreciated.

Re: Adding Trailer when comma or decimal point is involved

PostPosted: Mon Jul 16, 2018 9:18 pm
by Robert Sample
Glad to hear it worked.