How can i count the no of records of a file by giving set of files in a dataset in a PDS member?

Showing Answers 1 - 16 of 16 Answers

Hervey

  • Oct 26th, 2006
 

A member in a PDS, aka library, has statistics and these statistics can show you the number of records in itself when you go into browse in the member.

If no stats exist, you can go into edit and turn them on by entering this on the command line: STATS ON 

then PF3 out of the member and it will show you the number of lines. If this is a large PDS then you can count the number of records with a utility such as Fileaid or Syncsort. let me know if you need this explained in JCL.

  Was this answer useful?  Yes

Jyo

  • Nov 9th, 2006
 

Hi

I want the record counts in each data set  (I want supply the dataset names using wildcard like USERID.D06*.T04* )

I want display the output like

    File name                                record counts

USERID.D061012.T040511         12567

USERID.D061012.T040611           4532

USERID.D061013.T040530         45123

USERID.D061014.T040515         98465

  Was this answer useful?  Yes

kalaiselvi

  • Nov 21st, 2006
 

Pls find below answer :

The below statements works fine, but displaying output only in toolmsg but not in output dataset. output dataset is empty.

//COUNTIT  EXEC PGM=ICETOOL                        
//TOOLMSG  DD SYSOUT=*                             
//DFSMSG   DD SYSOUT=*                             
//IN1      DD DSN=PROD04.MAC.P49768AC,DISP=SHR     
//OUT1     DD DSN=TESTC.TCS.MAC.P49768AC,DISP=MOD  
//TOOLIN   DD *                                    
   COUNT FROM(IN1)                                 
//TOOLIN   DD *                                    
   COPY FROM(TOOLMSG) TO(OUT1)                     

  Was this answer useful?  Yes

Smitha Brindavan

  • Dec 1st, 2006
 

Here's a simple DFSORT alternative using ICEMAN that will count the records of a PS and write it onto another PS.

//CTRCDS EXEC PGM=ICEMAN

//SYSOUT DD SYSOUT=*

//SORTIN DD DSN=INPUT.FILENAME1,DISP=SHR --->Input file

//SORTOUT DD DSN=OUTPUT.FILENAME1,DISP=OLD --->Output file having record count

//SYSIN DD *

OPTION COPY

OUTFIL NODETAIL,REMOVECC,

TRAILER1=(COUNT=(M11,LENGTH=8)) --> The record count in the output file will be of length 8

  Was this answer useful?  Yes

Amit Verma

  • Oct 29th, 2015
 

But how to get the count of multiple PS into a single PS with the names of file?

  Was this answer useful?  Yes

Amit Verma

  • Oct 29th, 2015
 

Did you get the way to do it?

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions