GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Mainframe  >  JCL
Go To First  |  Previous Question  |  Next Question 
 JCL  |  Question 51 of 128    Print  
How can i count the no of records of a file by giving set of files in a dataset in a PDS member?

  
Total Answers and Comments: 4 Last Update: December 01, 2006     Asked by: Anitha 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 26, 2006 16:29:36   #1  
Hervey        

RE: How can i count the no of records of a file by giv...

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.


 
Is this answer useful? Yes | No
November 09, 2006 22:54:24   #2  
Jyo        

RE: How can i count the no of records of a file by giv...

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


 
Is this answer useful? Yes | No
November 21, 2006 01:30:49   #3  
kalaiselvi        

RE: How can i count the no of records of a file by giv...

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)


 
Is this answer useful? Yes | No
December 01, 2006 00:46:23   #4  
Smitha Brindavan        

RE: How can i count the no of records of a file by giv...

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


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape