View previous topic :: View next topic
|
Author |
Message |
mbala2k4
New User
Joined: 20 Apr 2006 Posts: 2
|
|
|
|
Hi all
is it possible to sort vsam files,if so how to sort Vsam files?
and also one more question is it possible to count the records in jcl by using sort utility |
|
Back to top |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
Hi,
Why would you like to sort a VSAM file? its already sorted with a key.
Yes. Its possible to count the number of records with SORT.
Please refer to DFSORT Manual at http://ibmmainframes.com/manuals.php for the syntax. |
|
Back to top |
|
|
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
Well..In the first place why do you need to sort VSAM file ?? I dont think there is any need.
Secondly, for count of the number of records, search for 'COUNT' operator in this forum.
Thanks
ap_mainframes |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
is it possible to sort vsam files,if so how to sort Vsam files?
|
Yes, you can use DFSORT to sort VSAM files. If you want more specific information, you need to explain more about what you're trying to do. Are you trying to use a VSAM file as input and a non-VSAM file as output, or a VSAM file as input and another VSAM file as output, or what? What is the position, length and format of the key you want to sort on? Are all of the records in the VSAM file the same length or are they different lengths?
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Use [URL] BBCode for External Links
Quote: |
and also one more question is it possible to count the records in jcl by using sort utility |
Yes, you can get a count of the records with DFSORT in various ways. Here are two:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//TOOLIN DD *
COUNT FROM(IN)
/*
|
The count will be displayed in TOOLMSG.
Code: |
//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(COUNT=(M11,LENGTH=8))
|
The count will be displayed in SORTOUT. |
|
Back to top |
|
|
|