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

trouble in using SUM


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Wed Oct 08, 2008 1:42 am
Reply with quote

Hi, I have a file. Position 76 length 1 is a flag of which I want to know how many are of type X, R, N and so on...

I have coded my sort statement like this:

Code:

  INREC FIELDS=(76,1,2:C'=',100,5) 
  SORT FIELDS=(1,1,CH,D)       
  SUM FIELDS=(3,5,ZD)           


but this isn't working. I have tried understanding how Summarizing works but seems too heavy icon_sad.gif .. can anyone please guide.
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: Wed Oct 08, 2008 2:17 am
Reply with quote

Unless you have a valid ZD value of 00001 in positions 100-104 of every record, that won't work. However, these DFSORT statements would work:

Code:

  OPTION ZDPRINT                       
  INREC FIELDS=(76,1,2:C'=',C'00001') 
  SORT FIELDS=(1,1,CH,D)               
  SUM FIELDS=(3,5,ZD)                 
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Wed Oct 08, 2008 1:06 pm
Reply with quote

thanks Frank! that worked for me icon_smile.gif
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Cobol 4 - The trouble with computing ... COBOL Programming 1
No new posts DATEADD query trouble DB2 8
No new posts Trouble With Syncsort SYNCSORT 9
No new posts Trouble Scrolling TBDISPL in my Panel TSO/ISPF 6
No new posts Trouble in executing query DB2 4
Search our Forums:

Back to Top