#1: Sorting VSAM KSDS Author: lal, Posted: Thu Oct 06, 2005 5:15 pm Hi All,
I was trying to do a simple sort operation on VSAM KSDS where-in I wanted all the records which are greater than
a specified date and this date field starts in 225th position for the length of 3. But since the file is of Variable length
record I added 4 to support RDW and my control card was as below:-
This is how the file is defined:-
VSAM Data Allocation:
Allocation unit . CYL REC, KB, MB, TRK, or CYL
Space . . . . . Primary . . 20 Secondary . 10
Record size . . Average . . 1602 Maximum . . 23735
Free space . . % of CI . . 0 % of CA . . 0
Control card:-
SORT FIELDS=COPY
INCLUDE COND=(229,3,PD,GT,05273)
But I didn't get the right results and when I checked in SYSOUT I found the following
SYSIN :
SORT FIELDS=COPY
INCLUDE COND=(225,3,PD,GT,05273)
WER164B 6,896K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 572,894 BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER108I SORTIN : RECFM=F ; LRECL= 23735; CISIZE = 8192
WER110I SORTOUT : RECFM=FB ; LRECL= 23735; BLKSIZE= 23735
WER410B 5,868K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 291K BYTES USED
WER055I INSERT 0, DELETE 110730
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B VSAM WAS USED FOR SORTIN
WER416B BSAM WAS USED FOR SORTOUT
WER054I RCD IN 112292, OUT 1562
SORTIN RECFM='F' is it right ??? It should have been 'V' since our Avg and Max lengths are different.
Am I missing something regarding the Varible length KSDS ???.
Thanx for your thoughts.
Lal
#2: Author: kolusu, Location: San JosePosted: Thu Oct 06, 2005 7:17 pm Lal,
Syncosrt installation default for vsam processing is F(fixed) format. you need to use the RECORD TYPE parameter.
try these control cards
Code:
//SYSIN DD *
RECORD TYPE=V
SORT FIELDS=COPY
INCLUDE COND=(229,3,PD,GT,05273)
/*
Alternatively try this also
Code:
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(225,3,PD,GT,05273)
/*
Hope this helps...
Cheers
Kolusu
#3: Author: lal, Posted: Fri Oct 07, 2005 9:04 am Hi Kolusu,
Thanx for the reply, yes I tried the 2nd sort control cards for my requirement after looking at the SYSOUT.