IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to find out the total records in ps with out open?.


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bsriramulu
Warnings : 2

New User


Joined: 20 Jan 2006
Posts: 8

PostPosted: Wed Jan 25, 2006 3:22 pm
Reply with quote

hi,
Any body pls tell me . it is interview question?.

cheers,
sriram.
Back to top
View user's profile Send private message
sbalajibe

New User


Joined: 15 Aug 2005
Posts: 62

PostPosted: Wed Jan 25, 2006 3:44 pm
Reply with quote

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
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Wed Jan 25, 2006 4:25 pm
Reply with quote

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
View user's profile Send private message
mak_tcs

New User


Joined: 23 Nov 2005
Posts: 69
Location: Minneapolis, MN USA

PostPosted: Mon Jan 30, 2006 12:30 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Jan 30, 2006 3:19 pm
Reply with quote

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
View user's profile Send private message
MichaelKBS

New User


Joined: 10 Jan 2006
Posts: 24
Location: Germany

PostPosted: Mon Jan 30, 2006 9:54 pm
Reply with quote

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
View user's profile Send private message
MainframeHelp4_u

New User


Joined: 15 Aug 2006
Posts: 25

PostPosted: Sat Sep 02, 2006 3:07 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top