Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can VSAM be used to sort data?

Data sort Used vsam
0
Posted

How can VSAM be used to sort data?

0

In one of the discussions about the limitations of the MVT Sort/Merge (input, output, and sort/work datasets may only reside on 2311 or 2314 DASD), a question was raised about the feasibility of using VSAM to effectively “sort” data. It can be done, although not efficiently. Even so, it may be just as reasonable/efficient as copying your unsorted dataset onto 2311 or 2314 DASD, sorting it, and copying the sorted dataset back to your preferred DASD. A jobstream that I used is vssort.jcl. With minor modifications, it may be used to sort any sequential dataset on one or more ascending keys. In order to use descending keys, it would be necessary to programmatically construct key data based upon the actual key value that would result in the correct sequence; such a task would be way beyond simply using VSAM to re-order data. The first step is to define an Entry Sequenced cluster to hold the unsorted data: DEFINE CLUSTER ( – NAME ( VSSORT.CLUSTER ) – VOLUMES ( MVS804 ) – RECORDSIZE ( 158 158

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123