View previous topic :: View next topic
|
Author |
Message |
sureshindira
New User
Joined: 21 Feb 2005 Posts: 10
|
|
|
|
How to find number of records in a file through TSO? |
|
Back to top |
|
|
sivatechdrive
Active User
Joined: 17 Oct 2004 Posts: 191 Location: hyderabad
|
|
|
|
Hi sureshindira
Use the REPRO command in TSO on the right-most corner we can see number of records processed.
Thanks
siva |
|
Back to top |
|
|
Great Indian
New User
Joined: 05 Apr 2005 Posts: 9
|
|
|
|
what sureshindira told is wrong.
If you want to see no of records are there in any member of PDS then see the size of member(this is the column exists when you open PDS)
without opening member
Here is the example:
Name Prompt Size Created Changed
CBLPGM1 31 2005/04/06 2005/04/06 01:09:04
CBLPGM1R 16 2005/04/06 2005/04/06 01:00:02
COMPILE 34 2005/03/07 2005/03/07 05:09:11
COMPJCL1 63 2005/02/20 2005/04/06 00:49:45
COMPJCL2 65 2005/04/04 2005/04/04 23:00:10
CPYBOOK 5 2005/01/31 2005/02/03 05:27:18
EXCEL 25 2005/01/06 2005/02/11 08:29:48
GDGCRE1 68 2005/01/26 2005/01/26 21:41:50
--------------------------------------------------------------------------
If you want to know no of records in QSAM(PS) file then open the file in browse or view mode....give "m" on command line and press f8 it will go to last record in file....here by seeing last record number you can estimate the number of records exist in QSAM file |
|
Back to top |
|
|
ankyhunk
Moderator
Joined: 05 May 2005 Posts: 98 Location: Navi Mumbai, India
|
|
|
|
As great indian said, you can open any file in browse,edit or view mode. The type 'm' on command line & press 'F8'. You will find the total no of records on the right hand top corner. |
|
Back to top |
|
|
ashokreddy
New User
Joined: 20 May 2005 Posts: 4 Location: india
|
|
|
|
hi,
i guess thru TSO WE CAN GET THE BELOW WAY,
TYPE
TSO LISTCAT ENT ('YOUR.DATASET.NAME') ENT
YOU WILL GET YOUR SOLLUTION. |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
I don't know if in some installation the command LISTCAT answer to the main request but I think that very difficult...
I'm in accord with the "Great Indian"... |
|
Back to top |
|
|
spanda
New User
Joined: 31 Aug 2005 Posts: 48 Location: U.K.
|
|
|
|
Hi,
If you have File-Aid at your site, then you can find the number of records in a flat file using the interactive facility of File-Aid (option 3.8 in File-Aid ver 8.9) and when you are prompted for the function, type 'Tally' to get the number of records. It works much faster than scrolling down to the bottom of the file, particularly when you have millions of records in the file.
Personally, I use a rexx util called COUNTX, which can be used at the DSLIST panel (3.4) as a line command. This is fast enough for most purposes. I had downloaded this from cbttapes. If you want, I can send it to you.
HTH,
Panda. |
|
Back to top |
|
|
leo_sangha
New User
Joined: 11 Aug 2005 Posts: 85 Location: England
|
|
|
|
ashokreddy wrote: |
hi,
i guess thru TSO WE CAN GET THE BELOW WAY,
TYPE
TSO LISTCAT ENT ('YOUR.DATASET.NAME') ENT
YOU WILL GET YOUR SOLLUTION. |
Hi AshokReddy,
I tried the TSO command you have given as a reply ...
TSO LISTCAT ENT ('MYFILE.RECORDS')
But this is what i get as a result
NONVSAM ------- MYFILE.RECORDS
IN-CAT --- CATALOG.NAME
It did NOT give the number of records in the FILE but it gave Type & Catalog name for the file.
Is there any TSO command by which we can get number of records in the File ?????? This Q? is still not solved.
Thanks
leo_sangha@yahoo.com |
|
Back to top |
|
|
Kevin
Active User
Joined: 25 Aug 2005 Posts: 234
|
|
|
|
leo_sangha wrote: |
Is there any TSO command by which we can get number of records in the File ?????? This Q? is still not solved. |
No, there isn't. You'll need to write your own routine. |
|
Back to top |
|
|
leo_sangha
New User
Joined: 11 Aug 2005 Posts: 85 Location: England
|
|
|
|
Kevin wrote: |
leo_sangha wrote: |
Is there any TSO command by which we can get number of records in the File ?????? This Q? is still not solved. |
No, there isn't. You'll need to write your own routine. |
Kevin,
Thanks for the information. I was hoping that Ashok might be of help here as he has posted before that we can do it, though not correctly.
Thanks
leo_sangha@yahoo.com |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
follow on
why using rexx for large amount of data is not resource effective !
to count a 300000 record FB 252 PS dataset
dfsort
Code: |
000014 //SYSIN DD *
000015 SORT FIELDS=COPY
000016 OUTFIL REMOVECC,NODETAIL,
000017 TRAILER1=(C'COUNT ',COUNT=(M11,LENGTH=7),80:X)
IEF374I STEP/ICE /STOP 2011166.0738 CPU 0MIN 04.80SEC SRB 0MIN 00.06SEC VIRT 1088K SYS 272K EXT 8224K SYS 10752K
|
icetool
Code: |
000009 //TOOLIN DD *
000010 COUNT FROM(SORTIN)
IEF374I STEP/COUNT /STOP 2011166.0738 CPU 0MIN 05.09SEC SRB 0MIN 00.07SEC VIRT 1040K SYS 272K EXT 6164K SYS 10760K
|
REXX/EXECIO scripts
Code: |
000009 /* REXX */
000010 trace "o"
000011 chunk = <number of records for each execio>
000012 count = 0
000013 Address TSO "EXECIO "chunk" DISKR SYSUT1 ( STEM BUFFR."
000014 do while ( buffr.0 = chunk )
000015 count = count + chunk
000016 Address TSO "EXECIO "chunk" DISKR SYSUT1 ( STEM BUFFR."
000017 end
000018 count = count + buffr.0
000019 say " count = " count
000020 exit
000009 /* REXX */
000010 trace "o"
000011 Address TSO "EXECIO * DISKR SYSUT1 ( STEM BUFFR."
000012 say " count = " buffr.0
000013 exit
|
1 record at the time
Code: |
chunk = 1
IEF376I JOB/ENRICO1 /STOP 2011166.0814 CPU 2MIN 43.44SEC SRB 0MIN 00.41SEC VIRT 180K SYS 412K EXT 328K SYS 11108K
|
1000 records chunks
Code: |
chunk = 1000
IEF374I STEP/S2 /STOP 2011166.0811 CPU 0MIN 30.57SEC SRB 0MIN 00.41SEC VIRT 180K SYS 412K EXT 648K SYS 11036K
|
one shot
Code: |
IEF374I STEP/S2 /STOP 2011166.0815 CPU 0MIN 41.59SEC SRB 0MIN 00.41SEC VIRT 180K SYS 412K EXT 100456K SYS 11036K
|
the elapsed was just a bit higher |
|
Back to top |
|
|
|