In other words, it works the way it works because it works the way it works. But why?
Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Sri h Kolusu Sent: Saturday, May 26, 2018 5:13 AM To: [email protected] Subject: Re: empty KSDS behavior - why? > For example, if a file in this "never loaded" state is opened for > input by IDCAMS you get this: > > If opened by SORT (DFSORT) > IEC161I > 072-053,DEFVSAM,PRINT1,CCMIGR,,,DVFJS.CCARD.CCMIGRX,DVFJS.CCARD.CCMIGRX.DATA ,CATALOG.USERCAT.PPCAT > Frank, IDCAMS gives a return code of 160 for non-initialized vsam clusters. A newly created vsam file will have a zero value in HURBA(HI-USEDRBA) . In order to open the file for input or update processing , it requires that at least one data record be initially loaded into the file. This is because VSAM issues a VERIFY command upon opening a file to reset the end-of-file pointer. If the file has never been loaded, the VERIFY fails because the high used RBA (Relative Byte Address) (HI-USEDRBA) is still zero. Therefore, VSAM files must be initially "loaded" to set the HI-USED-RBA to a value other than zero. This is done by writing a record to the VSAM file in "load" mode and optionally deleting the record to empty the file while leaving the HI-USED-RBA at a non-zero value. DFSORT has a Parm VSAMEMT to copy an empty vsam cluster . This parm determines how an empty VSAM input data set will be processed //STEP0100 EXEC PGM=SORT,PARM='VSAMEMT=YES' Hope this helps.. Thanks, Kolusu ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
