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 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 Reply MQ open error Vignesh Sid COBOL Programming 5 Thu Sep 07, 2017 6:02 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am

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