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

Counting No. of records in a dataset


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
obulisankar

New User


Joined: 03 May 2007
Posts: 20
Location: bangalore

PostPosted: Tue Nov 18, 2008 3:34 pm
Reply with quote

Hi all,

Could you suggest me to count the number of records in a dataset using File-Aid batch and wite the counts in a new file.



Regards,
Obuli Sankar
Back to top
View user's profile Send private message
chavansu

New User


Joined: 20 Nov 2008
Posts: 14
Location: California USA

PostPosted: Fri Dec 12, 2008 3:17 am
Reply with quote

Hi,

Can you try this

OPTION COPY OUTFIL TRAILER1=(COUNT=(M11,LENGTH=10))

This is DFSORT utility.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Dec 12, 2008 8:23 am
Reply with quote

Hi,

using FILEAID you can obtain the count from the SYSPRINT statement.


If you need to reformat the output, just write the SYSPRINT to a dataset and then reformat it.


Gerry
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Fri Dec 12, 2008 11:35 am
Reply with quote

Hi,

Just extending the reply from Gerry, use the below JCL
Code:
//JS10     EXEC PGM=FILEAID,REGION=6M         
//STEPLIB  DD  DISP=SHR,DSN=XXX.XXXX.LINKLIB
//SYSPRINT DD  SYSOUT=*                       
//SYSLIST  DD  SYSOUT=*                       
//DD01     DD  DSN=files whose recorsd neded to counted,
//             DISP=SHR                       
//SYSIN    DD  *                             
$$DD01 TALLY                                 
/*                                           
//*                                           
and check the SYSPRINT.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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
Search our Forums:

Back to Top