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 Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm


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