Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Counting No. of records in a dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
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    Post subject: Counting No. of records in a dataset
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    Post subject:
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: 1703
Location: Australia

PostPosted: Fri Dec 12, 2008 8:23 am    Post subject:
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

Senior Member


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

PostPosted: Fri Dec 12, 2008 11:35 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us