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
 

 

How to sort Vsam files

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

New User


Joined: 20 Apr 2006
Posts: 2

PostPosted: Wed Jun 07, 2006 1:23 pm    Post subject: How to sort Vsam files
Reply with quote

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
View user's profile Send private message

parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Wed Jun 07, 2006 2:07 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Wed Jun 07, 2006 4:07 pm    Post subject: Re: sort Utility
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Wed Jun 07, 2006 9:06 pm    Post subject:
Reply with quote

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:

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

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
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 Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm


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