Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
Posted: Tue Aug 31, 2004 1:02 pm Post subject:
Ravi,
From the error messages , it is evident that the KEYLEN of the output dataset is only 15 bytes where as the input KSDS has a length of 25.
So there is a likely chance that the records are out of sequence. This is true on 689th record.
Either change the keylen on output file or add a sort step earlier to sort the vsam file on the first 15 bytes and create a flat file with it and then repro back that flat file to load the vsam cluster
With out hardcoding the output length as 250 in OUTREC=can't we use 0 instead.
like MV=(1,0,11) in fileaid. Because I want to use the same control card to copy few more files with different LRECL but the same 10 bytes strip irrespective of the keylength.
Then you would need another step as sort cannot really process without hard-coding the length unless it is a variable block file.
Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
Posted: Tue Aug 31, 2004 2:57 pm Post subject:
Ravi,
Didn't you get an out of sequence error as your SELECT statement is looking in bytes 1 thru 15, where as your key is actually from 11 thru 15 bytes?
Even though above control cards worked , I wouldn't suggest using them.You don't need a SAVE parm in the control cards. Come to think of it you don't even need a COPY and a SELECT
If you have the latest version of syncsort (which you don't have) you can use USING along with SELECT parm.
Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
Posted: Tue Aug 31, 2004 3:27 pm Post subject:
Ravi,
You are getting that error because the file is not 'initialized'. But sort can handle empty vsam files also.The parm VSAMEMT will allow you to process even if it is empty. So add this statement to your job
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum