Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: How to find out the total records in ps with out open?.
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    Post subject:
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: 464

PostPosted: Wed Jan 25, 2006 4:25 pm    Post subject: Re: How to find out the total records in ps with out open?.
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    Post subject:
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: 2360
Location: Israel

PostPosted: Mon Jan 30, 2006 3:19 pm    Post subject:
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    Post subject: Re: How to find out the total records in ps with out open?.
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    Post subject: try the option
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us