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

Calculate average record length in a variable block file


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
parvezyunus

New User


Joined: 30 May 2006
Posts: 2

PostPosted: Mon Apr 02, 2007 2:51 pm
Reply with quote

How can you calculate average record length in a variable block file ?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Apr 02, 2007 2:58 pm
Reply with quote

Do you mean the actual average of all records in the file or the record length that JCL or IDCAMS would expect to find ?
Back to top
View user's profile Send private message
parvezyunus

New User


Joined: 30 May 2006
Posts: 2

PostPosted: Mon Apr 02, 2007 3:05 pm
Reply with quote

the actual average of all records in the file
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Mon Apr 02, 2007 3:15 pm
Reply with quote

Use Sort to sum the lengths and count the recs and gen a trailer with the total lengths divided by the total count.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Apr 02, 2007 7:34 pm
Reply with quote

Hello,

If you run a sort, it will give you both the byte count and record count of the sorted data. If you divide, you get the average length.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top