View previous topic :: View next topic |
Author |
Message |
Narsimha Beginner
Joined: 03 Dec 2002 Posts: 27 Topics: 14
|
Posted: Fri Jan 10, 2003 6:36 am Post subject: How to get number of bytes used in a Tape file |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Fri Jan 10, 2003 6:42 am Post subject: |
|
|
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 |
|
|
Narsimha Beginner
Joined: 03 Dec 2002 Posts: 27 Topics: 14
|
Posted: Fri Jan 10, 2003 7:06 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Fri Jan 10, 2003 7:11 am Post subject: |
|
|
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 |
|
|
DaveyC Moderator
Joined: 02 Dec 2002 Posts: 151 Topics: 3 Location: Perth, Western Australia
|
Posted: Fri Jan 10, 2003 8:54 am Post subject: |
|
|
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 |
|
|
Bill Dennis Advanced
Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Fri Jan 10, 2003 11:22 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Fri Jan 10, 2003 11:26 am Post subject: |
|
|
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 |
|
|
|
|