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
 

 

Number of records in a dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Number of records in a dataset
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

Site Director


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

PostPosted: Thu Jan 27, 2011 1:52 pm    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

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

Senior Member


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

PostPosted: Thu Jan 27, 2011 7:49 pm    Post subject:
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    Post subject:
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    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 Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 6 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts what is meaning of the number in dcl Martylin PL/I & Assembler 2 Thu Mar 09, 2017 7:18 am
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


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