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

how to count the members in dataset


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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: 463

PostPosted: Mon Oct 10, 2005 4:31 pm
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
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
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: 1448
Location: Chicago, IL

PostPosted: Mon Oct 10, 2005 8:52 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top