Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
trouble in using SUM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: trouble in using SUM
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 Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Oct 08, 2008 2:17 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DATEADD query trouble Shripad AVhad DB2 8 Tue Sep 15, 2015 11:57 am
No new posts Trouble With Syncsort Gabriel Araujo Alves SYNCSORT 9 Tue May 06, 2014 6:47 pm
No new posts Trouble Scrolling TBDISPL in my Panel thesumitk TSO/ISPF 6 Mon Sep 09, 2013 3:03 pm
No new posts Trouble in executing query Shweta12j DB2 4 Thu Mar 21, 2013 11:41 am
No new posts Trouble Determining INCLUDE Statement... sqlcode1 JCL & VSAM 7 Tue Jun 21, 2011 10:46 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us