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 

How to get number of bytes used in a Tape file

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


Joined: 03 Dec 2002
Posts: 27
Topics: 14

PostPosted: Fri Jan 10, 2003 6:36 am    Post subject: How to get number of bytes used in a Tape file Reply with quote

Hi,

I need any simple method for finding the number of bytes written in a Tape file. Also is there anyway for getting the record count in a tape file without using Sort?

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


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

PostPosted: Fri Jan 10, 2003 6:42 am    Post subject: Reply with quote

Narsimha,

The following JCL will give you the desired results.Look at the SYSOUT messages from this job.It gives the filesize in bytes as well as the count of records.

Code:

//COUNT  EXEC  PGM=SORT                           
//SYSOUT  DD SYSOUT=*                             
//SORTIN  DD DSN=INPUT DATASET,                                     
//           DISP=SHR
//SORTOUT DD DUMMY                               
//SYSIN   DD *                                 
  SORT FIELDS=(1,1,CH,A)
/*


Hope this helps...

cheers

kolusu

PS: There is already a topic to find the no: of records in a file.
http://www.mvsforums.com/helpboards/viewtopic.php?t=7
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Narsimha
Beginner


Joined: 03 Dec 2002
Posts: 27
Topics: 14

PostPosted: Fri Jan 10, 2003 7:06 am    Post subject: Reply with quote

Hi Kolusu,

I found the record count. I am pasting the SYSOUT here. Please highlight the statements which mentions the tape file size? I want to know how many bytes are being used and how many bytes is the total capacity of the file.
***********************************
23,424K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
0 BYTES RESERVE REQUESTED, 23,328K BYTES USED
20K BYTES OF EMERGENCY SPACE ALLOCATED
SORTIN : RECFM=VBM ; LRECL= 8205; BLKSIZE= 32760
SORTOUT : RECFM=VBM ; LRECL= 8205; BLKSIZE= 32760
CONTROL FIELD WITHIN RDW
22,396K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
0 BYTES RESERVE REQUESTED, 22,396K BYTES USED
G=2672,SEGLEN=3088
TURNAROUND SORT PERFORMED
END SORT PHASE
SYNCSMF CALLED BY SYNCSORT; RC=0000
SORTIN: EXCP'S=3,UNIT=3490,DEV=B009,CHP=10A2
BSAM WAS USED FOR SORTOUT
FILESIZE 5 BYTES
RCD IN 1, OUT 1
RELEASE 3.7D BATCH 0366 TPF LEVEL 3A
END SYNCSORT - TSONPELS,STEP0100,,DIAG=A600,36C1,48F4,2C26,A7E6,26C1
*****************************************************
Thanks,
Narsimha
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Jan 10, 2003 7:11 am    Post subject: Reply with quote

Narsimha,

Look at the 4th line from the bottom. FILESIZE 5 BYTES . The 3rd line from the bottom gives you the count RCD IN 1, OUT 1


kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DaveyC
Moderator


Joined: 02 Dec 2002
Posts: 151
Topics: 3
Location: Perth, Western Australia

PostPosted: Fri Jan 10, 2003 8:54 am    Post subject: Reply with quote

Quote:

how many bytes is the total capacity of the file


For tape that depends. Are you using E carts (double length), the density of the tape, compression such as IDRC. You cannot tell without looking at the label and getting the block count... Even then you may be using DFHSM which uses bit level compression.
_________________
Dave Crayford
Back to top
View user's profile Send private message Send e-mail
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Fri Jan 10, 2003 11:22 am    Post subject: Reply with quote

Note on kolusu's example: Be sure to add SORTWKs if the file exceeds the virtual memory work sizes.

Bill


Last edited by Bill Dennis on Fri Jan 10, 2003 11:37 am; edited 1 time in total
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Jan 10, 2003 11:26 am    Post subject: Reply with quote

Bill Dennis,

Copy does not give give FILESIZE. I just gave the link as narsimha wanted to count the no: of records in the file apart from the file size.

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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