View previous topic :: View next topic
|
Author |
Message |
Rameshs
New User
Joined: 15 Jun 2005 Posts: 53 Location: India, Chennai
|
|
|
|
hi,
i need a jcl program
1)To count number of records in a VSAM
2) To count number of members in a PDS |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
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 |
|
|
Rameshs
New User
Joined: 15 Jun 2005 Posts: 53 Location: India, Chennai
|
|
|
|
can you please explain the sysin DD ?
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(COUNT=(M10,LENGTH=02)) |
|
Back to top |
|
|
Rameshs
New User
Joined: 15 Jun 2005 Posts: 53 Location: India, Chennai
|
|
|
|
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 |
|
|
anuradha
Active User
Joined: 06 Jan 2004 Posts: 247 Location: Hyderabad
|
|
|
|
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 |
|
|
Rameshs
New User
Joined: 15 Jun 2005 Posts: 53 Location: India, Chennai
|
|
|
|
Hi anuradha,
i tried this code already, this ICETOOL also not avilable..
we r using Z/OS 1.4
Thanks
Ramesh |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
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.
Hi hope in this help.
*= after this step you can use SYNCSORT to extract the data you need. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
|