Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How can U find out number of records in VSAM file ...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
rtalapaneni

New User


Joined: 20 Mar 2005
Posts: 13
Location: Bangalore

PostPosted: Mon Oct 17, 2005 5:16 pm    Post subject: How can U find out number of records in VSAM file ...
Reply with quote

How can U find out number of records in VSAM file ...
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 17, 2005 5:35 pm    Post subject: Re: How can U find out number of records in VSAM file ...
Reply with quote

Try this simple code.....

Code:
//S010    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=USERID.RECORDS.INPUT.VSAM,DISP=SHR
//TOOLIN DD *
COUNT FROM(IN)
/*


Regards,

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

New User


Joined: 31 Aug 2005
Posts: 48
Location: U.K.

PostPosted: Mon Oct 17, 2005 9:09 pm    Post subject: Re: How can U find out number of records in VSAM file ...
Reply with quote

I believe this was discussed previously.

If you have File-Aid, then you may find out the number of records without submitting a job. You can do this by using option 3.5 for the VSAM dataset, without providing any options at the command line (to display dataset info). The number of records on the VSAM file are displayed as Prime Records on the second page. (Hit ENTER to access additional pages of dataset info).

Hope this helps,
Panda.
Back to top
View user's profile Send private message
Ravi gaur

New User


Joined: 12 Jul 2005
Posts: 38

PostPosted: Tue Oct 18, 2005 3:19 pm    Post subject: Priyash
Reply with quote

Plz check again for a VSAM dataset.
//S010 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=USERID.RECORDS.INPUT.VSAM
//TOOLIN DD *
COUNT FROM(IN)
/*

is above code is correct or not..

as when i m running giving error
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


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

PostPosted: Tue Oct 18, 2005 3:30 pm    Post subject: Re: How can U find out number of records in VSAM file ...
Reply with quote

Thanks for pointing Ravi....
Missing DISP parameter caused that Error....

I 've got the code above corrected too.....

Regards,

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

New User


Joined: 20 Mar 2005
Posts: 13
Location: Bangalore

PostPosted: Tue Oct 18, 2005 10:15 pm    Post subject: Re: How can U find out number of records in VSAM file ...
Reply with quote

Thanks for all ..
Can I use this code by using SORT pgm ...
Let me know the difference between SORT,DFSORT,SYNCSORT,ICETOOL ....
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Oct 19, 2005 12:40 am    Post subject:
Reply with quote

Quote:
Can I use this code by using SORT pgm ...


COUNT is a DFSORT/ICETOOL operator. You can also create one record with the count using DFSORT directly with a DFSORT job like this:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY
  OUTFIL REMOVECC,NODETAIL,TRAILER1=(COUNT=(M11,LENGTH=8))
/*


Quote:
Let me know the difference between SORT,DFSORT,SYNCSORT,ICETOOL ....


SORT is the generic name for various sort products, two of which are DFSORT and Syncsort (the other is CA-SORT). DFSORT is an IBM product and an optional feature of z/OS. Syncsort is Syncsort, Inc's sort product. ICETOOL is a free "utility" shipped with DFSORT (since 1991).

For much more information on DFSORT, visit the DFSORT website at:

http://www.ibm.com/storage/dfsort/

and access the DFSORT books online from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html

If you or anyone else on this board would like some documents prepared by the DFSORT Team that describe what we see as the advantages of DFSORT over Syncsort, as well as considersations for migrating from Syncsort to DFSORT, send me an e-mail offline (yaeger@us.ibm.com). Please put "DFSORT" somewere in your Subject line to catch my attention.
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Wed Oct 19, 2005 12:43 am    Post subject: Re: How can U find out number of records in VSAM file ...
Reply with quote

Quote:
Let me know the difference between SORT,DFSORT,SYNCSORT,ICETOOL


Please search the forum with the author name as Frank ,,u can find lot of details.

Thank you
Back to top
View user's profile Send private message
Deepa.m
Warnings : 1

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Fri Oct 21, 2005 6:05 pm    Post subject:
Reply with quote

FRANK,

To add to this ...can we write the counts for a set of files given as input to a output file one by one along wiht the file name.

How to capture the file name for which we are getting the count and writing to a output file

ex.

input file

filename1
filename2
.
.
filename10


output file

filename1 10
filename2 20


currently we are doing it in rexx..is there any other simple way.


thanks,

Deepa
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sun Oct 23, 2005 9:15 pm    Post subject:
Reply with quote

You could do this by having DFSORT use the file names to generate a DFSORT job to submit to the internal reader. Let me know if you want me to show you how to do that.
Back to top
View user's profile Send private message
Deepa.m
Warnings : 1

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Tue Oct 25, 2005 1:29 pm    Post subject:
Reply with quote

yes please Frank..let me know how it can be done.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Oct 25, 2005 9:23 pm    Post subject:
Reply with quote

Deepa,

Here's a DFSORT job that generates and submits an ICETOOL job to the internal reader to do what you asked for.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file with filenames in 1-44
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(5,5)),DISP=(,PASS)
//T2 DD DSN=&&T2,UNIT=SYSDA,SPACE=(TRK,(5,5)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
  INREC FIELDS=(1,44,45:SEQNUM,3,ZD)
  OUTFIL FNAMES=T1,
    OUTREC=(C' COPY FROM(IN',45,3,C') TO(OUT',45,3,C')',
      C' USING(C',45,3,C')',80:X)
  OUTFIL FNAMES=T2,
     OUTREC=(C'//IN',45,3,C' DD DISP=SHR,DSN=',1,44,80:X,/,
      C'//OUT',45,3,C' DD SYSOUT=*',/,
      C'//C',45,3,C'CNTL DD *',/,
      C' OUTFIL FNAMES=OUT',45,3,C',REMOVECC,NODETAIL,',/,
      C'  TRAILER1=(C''',1,44,C''',',/,
      C'  2X,COUNT=(M11,LENGTH=5))')
//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DATA,DLM=QQ
//CTS      JOB ...            <--- jobcard
//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
QQ
//  DD DSN=&&T1,DISP=(OLD,PASS)
//  DD DSN=&&T2,DISP=(OLD,PASS)
//SORTOUT DD SYSOUT=(A,INTRDR)
//SYSIN    DD    *
  OPTION COPY
/*


The submitted job looks like this:

Code:

//CTS      JOB ...            <--- jobcard
//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
 COPY FROM(IN001) TO(OUT001) USING(C001)
 COPY FROM(IN002) TO(OUT002) USING(C002)
 ...
//IN001 DD DISP=SHR,DSN=dsname1
//OUT001 DD SYSOUT=*
//C001CNTL DD *
 OUTFIL FNAMES=OUT001,REMOVECC,NODETAIL,
  TRAILER1=(C'dsname1                                     ',
  2X,COUNT=(M11,LENGTH=5))
//IN002 DD DISP=SHR,DSN=dsname2
//OUT002 DD SYSOUT=*
//C002CNTL DD *
 OUTFIL FNAMES=OUT002,REMOVECC,NODETAIL,
  TRAILER1=(C'dsname2                                     ',
  2X,COUNT=(M11,LENGTH=5))
...


Each OUTnnn output file displays the 44 character input data set name and a 5 digit count of its records.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us