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
 

 

Counting number of members in a PDS ?

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

New User


Joined: 15 Jun 2005
Posts: 53
Location: India, Chennai

PostPosted: Thu Sep 15, 2005 12:42 pm    Post subject: Counting number of members in a PDS ?
Reply with quote

hi,

i need a jcl program icon_question.gif

1)To count number of records in a VSAM
2) To count number of members in a PDS
Back to top
View user's profile Send private message

Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Thu Sep 15, 2005 1:12 pm    Post subject: Re: Counting number of members in a PDS ?
Reply with quote

Hi,

Quote:
1)To count number of records in a VSAM




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


Hope this Helps.

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

New User


Joined: 15 Jun 2005
Posts: 53
Location: India, Chennai

PostPosted: Thu Sep 15, 2005 2:47 pm    Post subject: Need Explanation ?
Reply with quote

can you please explain the sysin DD ?

OPTION COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(COUNT=(M10,LENGTH=02))
Back to top
View user's profile Send private message
Rameshs

New User


Joined: 15 Jun 2005
Posts: 53
Location: India, Chennai

PostPosted: Thu Sep 15, 2005 2:59 pm    Post subject: I GOT FOLLOWING ERROR MSG
Reply with quote

SYSIN :
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
*
TRAILER1=(COUNT=(M10,LENGTH=02))
WER038I WARNING: SYNCSORT MVS IS NOT CERTIFIED TO RUN ON Z/OS. CONTACT SYNCSORT PRODUCT SERVICES FOR MORE INFORMATION.
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE


Is there any other option to count ?
Back to top
View user's profile Send private message
anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Thu Sep 15, 2005 4:45 pm    Post subject:
Reply with quote

Hi Rameshs!

Looks like syncsort is not installed in your shop. Yo can get the records count thru DFSORT also. Just try with the following code:

Code:
//PS010 EXEC PGM=ICETOOL                         
//TOOLMSG DD   SYSOUT=*                           
//DFSMSG   DD   SYSOUT=*                           
//IN            DD   DSN=datasetname,DISP=SHR
//TOOLIN    DD   DATA                               
  COUNT FROM(IN)                                   
/*                                                 
//*

HTH,
Back to top
View user's profile Send private message
Rameshs

New User


Joined: 15 Jun 2005
Posts: 53
Location: India, Chennai

PostPosted: Thu Sep 15, 2005 4:49 pm    Post subject:
Reply with quote

Hi anuradha,

i tried this code already, this ICETOOL also not avilable..
we r using Z/OS 1.4


Thanks
Ramesh
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Thu Sep 15, 2005 6:02 pm    Post subject:
Reply with quote

To view how many record are in your vsam you can use LISTCAT through IDCAMS and see the item REC-TOTAL.*
Code:
//STEP010I EXEC PGM=IDCAMS                             
//SYSPRINT DD SYSOUT=*                                 
//SYSIN    DD *                                       
 LISTCAT ENTRIES(myvsam) ALL

To view the number of member in a PDS you can enter in PDS and look at top right of ISPF screen where you have the total number or row that is the exact number of member in the library.
Code:
Row 00001 of 06930


Hi hope in this help.

*= after this step you can use SYNCSORT to extract the data you need.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Sep 15, 2005 6:09 pm    Post subject: Re: Counting number of members in a PDS ?
Reply with quote

As far as I know, using COUNT FROM(IN) should work with either SORT product (DFSORT, PGM=ICETOOL or SYNCSORT, PGM=SYNCTOOL).

Concerning the number of members of a PDS, nothing specific comes to mind. The best thing I can think of is to use on of the TSO commands, LISTDS or PRINTDS to generate the member list, then use some other utility to accumulate and totals the number of entries.

If you have SAS, using PROC SOURCE might be helpful:
Code:

//SASSTEP  EXEC SAS                       
//SAS.SASLOG  DD SYSOUT=*                 
//SAS.SYSDUMP DD SYSOUT=*                 
//SAS.SASLIST DD SYSOUT=*                 
//SYSUT1   DD DISP=SHR,DSN=MY.PDS         
//MEMBERS  DD SYSOUT=*                     
//SYSIN    DD *                           
PROC SOURCE INDD=SYSUT1 OUTDD=MEMBERS;     
/*                                         
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 Sequence number add in SORT pshongal SYNCSORT 3 Fri Sep 02, 2016 3:32 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm
No new posts GDG vsersion number change Raghu navaikulam JCL & VSAM 5 Fri May 27, 2016 4:49 pm
No new posts CPU time Vs Number of records Nileshkul JCL & VSAM 5 Mon May 09, 2016 4:05 pm
No new posts Syntax to check the first 4 digits of... kshirabdhi DFSORT/ICETOOL 10 Tue May 03, 2016 12:21 pm


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