View previous topic :: View next topic
|
Author |
Message |
puneetvirmani143
New User
Joined: 24 Jul 2007 Posts: 55 Location: noida
|
|
|
|
Hi All,
I am having a Input File. Can I write a SORT statement to calculate what is the total value of "Net Value" and "Billing Quantity" fields for month of Jan, Feb and March in the input file ?
Month fields start from 18th position and is of length 2 ."NetValue" field: starts at 84th position and total of length 9 (6 digits ,then a "." and then 2 digits ) ."Billing Quantity" starts start at position 93 and is of length 9.
As per my knowledge SORT statement don't recognize a "." . So I think we have to add the 6 decimal separately in one SORT step and 2 digits (after decimal) in another SORT step. Then add both of them manually to reach at the final figure.
Can anybody tell me the exact syntax for Sort card to add the field values ?
Thanks
Puneet |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
puneetvirmani143 wrote: |
Hi ,
Thanks for your help.As pper you we can add decimal number but can I get the exact syntax for it ?
Thanks
Puneet |
What have you attempted so far? |
|
Back to top |
|
|
puneetvirmani143
New User
Joined: 24 Jul 2007 Posts: 55 Location: noida
|
|
|
|
Hi,
Below is the code I am using for my requirement but I am getting user abend S000 U0016 and message is INVALID INREC OR OUTREC STATEMENT OPERAND.
Code: |
//SYSIN DD *
OPTION ZDPRINT
INREC OVERLAY=(84:84,9,UFF,TO=ZD,LENGTH=09,
93:93,9,UFF,TO=ZD,LENGTH=09)
SORT FIELDS=(18,2,CH,A)
SUM FIELDS=(84,9,ZD,93,12,ZD)
OUTREC OVERLAY=(84:84,9,ZD,EDIT=(TTTTTTT.TT),
93:93,9,ZD,M10,LENGTH=9)
|
Can you tell me where I am wrong ? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
How about providing the actual sysout containing the error? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
puneetvirmani143,
The fact that you got the ICE104A message for those control statements indicates you do not have z/OS DFSORT V1R5 PTF UQ95213 or DFSORT R14 PTF UQ95213. That PTF has been available since Dec, 2004 so your site is way behind in DFSORT service. The control statements work fine with that PTF (except that you should have 93,9,ZD instead of 93,12,ZD in the SUM statement).
Ask your System Programmer to install z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006). That will get you all of the latest DFSORT function. |
|
Back to top |
|
|
|