View previous topic :: View next topic
|
Author |
Message |
bsriramulu Warnings : 2 New User
Joined: 20 Jan 2006 Posts: 8
|
|
|
|
hi,
Any body pls tell me . it is interview question?.
cheers,
sriram. |
|
Back to top |
|
|
sbalajibe
New User
Joined: 15 Aug 2005 Posts: 62
|
|
|
|
hi ,
go to 3.4 , give *.*
u wull get all dataset listed . type count against the dataset name that u want
u will get the no of records
Thanks
Balaji |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
HI Balaji,
Quote: |
go to 3.4 , give *.*
u wull get all dataset listed . type count against the dataset name that u want
u will get the no of records |
Is it shop specific? It is not working in out shop
Regards
Rupesh |
|
Back to top |
|
|
mak_tcs
New User
Joined: 23 Nov 2005 Posts: 69 Location: Minneapolis, MN USA
|
|
|
|
Hi all,
Record count is possible through File-Aid..
1.Choose FILE-AID Option 3.8
2. At the prompt of ....ENTER NEXT FUNCTION OR END , enter TALLY
3. U will get the record count
4. Type END to exit.
Thanks,
Mani |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
If your dataset is not to big, you can use the following REXX (you can use it even as 3.4 command):
Code: |
/*-------------------------------- REXX --------------------------------
* PROGRAM : RECNUM
* FUNCTION : Count records in sequential dataset
* AUTHOR : OFER
* DATE : 30/01/06
* HOW TO USE:
* :
*--------------------------------------------------------------------*/
ARG ZINPDSN .
ADDRESS TSO "ALLOC FI(TDSN) DA('"STRIP(ZINPDSN,"B","'")"') SHR REU"
ADDRESS TSO "EXECIO * DISKR TDSN (STEM DUMMY. FINIS"
ADDRESS TSO "FREE FI(TDSN)"
SAY DUMMY.0 'Records in 'ZINPDSN
EXIT
|
For VSAM - you can use the following REXX:
Code: |
/* REXX */
ARG VSAMNAME .
VSAMNAME = STRIP(VSAMNAME,"B"," ")
VSAMNAME = STRIP(VSAMNAME,"B","'")
VSAMRECS = 0
X = OUTTRAP("CLUSTER.",'*',"NOCONCAT")
ADDRESS "TSO" "LISTCAT ENT('"VSAMNAME"') ALL"
IF POS('IDC3012I',CLUSTER.1) ?= 0 THEN DO
SAY "Can't find VSAM file: "VSAMNAME
EXIT
END
DO LI = 1 TO CLUSTER.0
IF POS('REC-TOTAL',CLUSTER.LI) ?= 0 THEN DO
WORKLINE = TRANSLATE(CLUSTER.LI,' ','-')
VSAMRECS = SUBSTR(WORKLINE,19,14) + 0
LEAVE LI
END
END
SAY VSAMRECS 'Records in' VSAMNAME
EXIT
|
O. |
|
Back to top |
|
|
MichaelKBS
New User
Joined: 10 Jan 2006 Posts: 24 Location: Germany
|
|
|
|
To get an idea about the amount of records in a PS without open it,
see the tracks used on 3.4 dataset listing.
1 Track covers up to 56664 Bytes. (1 Cylinder = 15 Tracks).
So if your PS has allocated 1 Track and your record-length is 80,
the maximum records are 56664/80 = 708.
regards,
Michael |
|
Back to top |
|
|
MainframeHelp4_u
New User
Joined: 15 Aug 2006 Posts: 25
|
|
|
|
1) File aid 3.8 option:
Type TALLY is the best option...
2) COUNT option is not a generic command.. it is created by the REXX tool. to count the no of records... if that COUNT REXX pgm is not there at u r shop...it will not work..
Cheers
Mainframehelp4_u |
|
Back to top |
|
|
|