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
 

 

how to count the members in dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
naga821

New User


Joined: 16 Mar 2005
Posts: 5

PostPosted: Mon Oct 10, 2005 12:06 pm    Post subject: how to count the members in dataset
Reply with quote

Hi
could anybody let me abt how to count the members in the dataset
Back to top
View user's profile Send private message

Anbudan

New User


Joined: 07 Sep 2005
Posts: 26
Location: Germany

PostPosted: Mon Oct 10, 2005 1:47 pm    Post subject:
Reply with quote

Hi naga821

If you open ur pds dataset(3.4),

On the right side corner, u find

"Row 00001 of 00200""

This is the easiest way to find.



The Hardest way - I think you know well- count 1,2,3.......(Just for joking)


Anbudan
Back to top
View user's profile Send private message
naga821

New User


Joined: 16 Mar 2005
Posts: 5

PostPosted: Mon Oct 10, 2005 2:24 pm    Post subject:
Reply with quote

Thanks Anbudan
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Mon Oct 10, 2005 4:31 pm    Post subject: Re: how to count the members in dataset
Reply with quote

Hi Naga,

You can try following JCL for the same, If you want the store the value and use it.

Code:
//STEP01  EXEC PGM=SORT                                       
//SYSOUT   DD   SYSOUT=*                                     
//SORTIN  DD DSN=Input File name ,DISP=SHR             
//SORTOUT DD DSN=Output file anme ,DISP=SHR             
//SYSIN   DD *                                               
  OPTION COPY                                                 
  OUTFIL REMOVECC,NODETAIL,                                   
   TRAILER1=(COUNT=(M10,LENGTH=02))                           
/* 

Hope this helps

Regards

Rupesh
Back to top
View user's profile Send private message
Sridevi_C

Active User


Joined: 22 Sep 2005
Posts: 104
Location: Concord, New Hampshire, USA.

PostPosted: Mon Oct 10, 2005 7:06 pm    Post subject:
Reply with quote

Hi Rupesh,
Could you please explain, each of them in the SYSIN part?
Thanks in advance!
Sridevi.
Back to top
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Mon Oct 10, 2005 7:55 pm    Post subject: Re: how to count the members in dataset
Reply with quote

To expand a little bit on Rupesh's post:

Code:

//STEP0001 EXEC PGM=IKJEFT01                             
//SYSTSPRT DD   DSN=&&LIST,DISP=(,PASS),UNIT=VIO         
//SYSTSIN  DD   *                                         
LISTDS 'pdsname' MEMBERS                                       
/*                                                       
//*                                                       
//STEP0002 EXEC PGM=SORT                                 
//SORTIN   DD   DSN=&&LIST,DISP=(OLD,PASS)               
//SORTOUT  DD   SYSOUT=*                                 
//SYSOUT   DD   SYSOUT=*                                 
//SYSIN    DD   *                                         
  OPTION COPY                                             
  OUTFIL STARTREC=9,INCLUDE=(6,2,CH,EQ,X'4040'),         
    REMOVECC,NODETAIL,                                   
    TRAILER1=(COUNT=(M10,LENGTH=10))                     
/*                                                       
//*                                                       
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Mon Oct 10, 2005 8:52 pm    Post subject: Re: how to count the members in dataset
Reply with quote

Hi Naga,

Easiest way to find number of members in a PDS, If you are not looking from a JOB perspective, can be issuing simply "I" to the left of the PDS in 3.4

there you'll get some lines like this... Thats what you are looking ...right...?
Code:
 Current Utilization       
 Used tracks . . . . : 9   
 Used extents  . . . : 1   
 Used dir. blocks  . : 6   
 Number of members . : 34 


Regards,

Priyesh.
Back to top
View user's profile Send private message
naga821

New User


Joined: 16 Mar 2005
Posts: 5

PostPosted: Tue Oct 11, 2005 12:13 pm    Post subject: Re: how to count the members in dataset
Reply with quote

Thank rupesh and priyesh for posting the answer
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am


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