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

SORT card to add the field values


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
puneetvirmani143

New User


Joined: 24 Jul 2007
Posts: 55
Location: noida

PostPosted: Tue Feb 19, 2008 7:50 pm
Reply with quote

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

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Feb 19, 2008 8:10 pm
Reply with quote

Have you looked int UFF & SFF?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Feb 19, 2008 9:26 pm
Reply with quote

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

New User


Joined: 24 Jul 2007
Posts: 55
Location: noida

PostPosted: Tue Feb 19, 2008 9:32 pm
Reply with quote

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

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Feb 19, 2008 9:36 pm
Reply with quote

How about providing the actual sysout containing the error?
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 Feb 19, 2008 10:26 pm
Reply with quote

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
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top