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

Number of records in a dataset


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

New User


Joined: 11 Oct 2005
Posts: 62
Location: India

PostPosted: Thu Jan 27, 2011 1:46 pm
Reply with quote

Hi
Is there any TSO command or anyother easiest way to find out number of records in a PS( not PDS)?

I've a huge file..

I can't open in browse mode and do M+ F8 as it is taking more and more time.
I can't open in File-Aid either, as it is also giving memory insufficient..

if u have any rexx code to count records.. please do share..

Thanks
Sri
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jan 27, 2011 1:52 pm
Reply with quote

Hello,

Suggest you lok into using the SORT product on your system (or some other utility) to count the records.

If there is a "huge file" a roll-your-own approach will not perform as you want/need.
Back to top
View user's profile Send private message
Guest







PostPosted: Thu Jan 27, 2011 2:15 pm
Reply with quote

Hi srinut123,
You can use the below jcl to find the records in a PS

Code:

//STEP1  EXEC PGM=ICETOOL                         
//TOOLMSG DD SYSOUT=*                             
//DFSMSG DD SYSOUT=*                             
//IN DD DSN=input.file,DISP=SHR
//OUT DD SYSOUT=*                                 
//TOOLIN DD *                                     
  COUNT FROM(IN) WRITE(OUT) DIGITS(8)             
/*                                               


*) If you specifically want a rexx tool for the same then you can submit the above jcl using Rexx.

*) You can also use the "TALLY" function in file-aid but this is also a foreground option.

devil13
There is always a better solution.
Back to top
srinut123

New User


Joined: 11 Oct 2005
Posts: 62
Location: India

PostPosted: Thu Jan 27, 2011 3:03 pm
Reply with quote

Thanks all for your replies.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jan 27, 2011 7:49 pm
Reply with quote

devil13 wrote:
*) You can also use the "TALLY" function in file-aid but this is also a foreground option.
Code:
//FASTEP   EXEC PGM=FILEAID,REGION=6M         
//STEPLIB  DD  DISP=SHR,DSN=SYS1.NSMP.LINKLIB
//SYSPRINT   DD  SYSOUT=*                       
//SYSLIST  DD  SYSOUT=*                       
//DD01     DD  DSN=HLQ.FIRST.FILE,       
//             DISP=SHR                       
//*                                           
//SYSIN    DD *                               
$$DD01 TALLY                                 
/*                                           
//* 


SYSPRINT:
Quote:
DD01 DSN=HLQ.FIRST.FILE OPENED AS PS,
RECFM=FB,LRECL=80,BLKSIZE=27920,VOL=MIZAB8
$$DD01 TALLY 00100000
ABOVE FUNCTION ENDED ON NORMAL EOD RC=0
RECORDS-READ=5
Back to top
View user's profile Send private message
Guest







PostPosted: Fri Jan 28, 2011 12:00 am
Reply with quote

Hi Anuj,
Thanks. I have learnt one more new thing today.

devil13
There is always a better solution.
Back to top
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 FINDREP - Only first record from give... DFSORT/ICETOOL 3
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 Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
Search our Forums:

Back to Top