MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Add ing a record count to records in a set

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
jbrasher
Beginner


Joined: 26 Apr 2007
Posts: 5
Topics: 2

PostPosted: Tue Feb 12, 2008 4:26 pm    Post subject: Add ing a record count to records in a set Reply with quote

I've got the following file:

123 123
123 456
123 789
123 012

124 876
124 943
124 124
124 086

I'd like to add the count of 'subsidary' records to the 'prime record' and all 'subsidiary' records.

I've gotten the count into the 'prime' record:
123 123 0003
123 456 0000
123 789 0000
123 012 0000

124 876 0000
124 943 0000
124 124 0003
124 086 0000

by using some examples of splice but I'm stuck with replecating the count
to each set of records, i.e.,

123 123 0003
123 456 0003
123 789 0003
123 012 0003

124 876 0000
124 943 0003
124 124 0003
124 086 0003

Any help or pointers would be appreciated Smile

Thanks,
_________________
John
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Tue Feb 12, 2008 4:58 pm    Post subject: Reply with quote

jbrasher,

Please SEARCH before posting . Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?p=10320#10320

The only change you would need is use COUNT-1 instead of count.

Code:

  OPTION EQUALS                             
  SORT FIELDS=(01,03,CH,A)                   
  OUTFIL REMOVECC,NODETAIL,                 
  SECTIONS=(01,03,                           
  TRAILER3=(01,03,7X,COUNT-1=(M11,LENGTH=4)))


Hope this helps..
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jbrasher
Beginner


Joined: 26 Apr 2007
Posts: 5
Topics: 2

PostPosted: Tue Feb 12, 2008 7:33 pm    Post subject: Reply with quote

Kolusu,

Thanks for the help.

I found that example and that's what I used to get the counts that I have
but what I'm looking to do is have the count of the 'secondary' records IN
each of the secondary records also.

The original file is keep the same except that there is a count of the number of secondary records in each set in each record.

Does that make sense? Smile
_________________
John
Back to top
View user's profile Send private message
jbrasher
Beginner


Joined: 26 Apr 2007
Posts: 5
Topics: 2

PostPosted: Wed Feb 13, 2008 9:42 am    Post subject: Reply with quote

Kolusu,

Sigh, some days you know you should have been a plumber ... Embarassed

Some other processing I had to do to this file got me looking at it the wrong way.
I had the answer all along.

Thank you for your help.
_________________
John
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group