I need to Sort a Tape DS with around 7 Million records
But you have SORT FIELDS=COPY so you're copying the tape data set, not sorting it.
I am using the below JCL and it's giving SB37, I tried increasing the Cylinders to 3000 but no luck. Also gave Sortwork files still no use
Since you're doing a copy, your SORTWK data sets aren't used and you can't be getting the B37 on one of those. Remove them as they're just wasting space you might need for SORTOF1.
So you must be getting the B37 on the SORTOF1 data set. You need to increase the space for that one to hold all of the output records. The maximum size needed would be for the 7 million records in the input file, but you could make it smaller depending on how many records you're omitting. I don't know how much space you'd need on DASD (my guys who figure out that kind of thing have left for the day) - maybe somebody else could figure it out for you.
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
To find out how many of the 7million records will be written to the output file, you could run one run with the output dataset DD set to DUMMY. When the step runs, the output will should show how many records were copied. As your data is VB, the byte-count will be valuable also. Recently, i sorted 12+ million 80-byte records and the output required 1,187 3390-cylinders, so (100,100) will surely not be enough. . . Unless most of your records are way below the 4100.
When you have the number of records (and the byte count, which should be in the output) talk with your storage management people and ask how much space you need to allocate for that volume of data and what UNIT= or DATACLAS you should use in your jcl. If you use UNIT=(xxxxx,10) the dataset will be able to span across 10 volumes. Depending on what model of dasd you allocate on, the allocation may vary.