| View previous topic :: View next topic |
| Author |
Message |
yadav2005 Intermediate

Joined: 10 Jan 2005 Posts: 348 Topics: 144
|
Posted: Thu May 29, 2008 10:14 am Post subject: SORT overcoming IDCAMS with empty file |
|
|
Members,
I have a question, i came to know that IDCAMS has an issue with an empty file while copying to a flat file , so to avoid this issue we use SORT utility to overcome this problem. I am not able to understand what the problem is. Can anyone help me in the explanation of the context.Thanks. |
|
| Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12394 Topics: 75 Location: San Jose
|
Posted: Thu May 29, 2008 11:26 am Post subject: |
|
|
yadav2005,
What do you mean IDCAMS cant handle empty datasets? IDCAMS does handle empty sequential datasets. If you are talking about VSAM files then it is Different.
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.
SORT utility has a Parm VSAMEMT to copy an empty vsam cluster . This parm determines how an empty VSAM input data set will be processed
Hope this helps... |
|
| Back to top |
|
 |
|
|
|