View previous topic :: View next topic
|
Author |
Message |
sai.dara
New User
Joined: 24 Aug 2007 Posts: 12 Location: Hyderabad
|
|
|
|
Hi Friends,
Good Morning!
I am in need of getting the number of records in a file. But I do not have access to open the file. Can I get the exact count using REXX or IBM SYS tables or VTOC data.
I could retrieve the Block size, space used, space allocated using REXX.
In the same way can I get the exact record count ?
Thanks in advance,
thanks and Regards,
sai |
|
Back to top |
|
|
Succor
New User
Joined: 20 Feb 2009 Posts: 96 Location: Bangalore :)
|
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You can write an algorithm to calculate the number of records in a sequential dataset based on it's attributes: LRECL, BLKSIZE, %USED etc. However, this won't work for all cases, and it's pretty complex to achieve.
O. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
if you don't have authority to access the file, why are you doing record counts? |
|
Back to top |
|
|
diwa_thilak
Active User
Joined: 13 Jul 2006 Posts: 205 Location: At my desk
|
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
in 99.999+% of the cases, there is no way to do this accurately without reading the data sets. You might be able to do this for fixed block standard (FBS) data sets if you can be assured that there are no short blocks, but the last block is almost always short. DS1LSTAR (part of the DSCB) might help with that, but since almost no one uses FBS data sets, I doubt that even matters. |
|
Back to top |
|
|
|