The file is opened for input operations. The file position indicator is set to the first record in the file. If no records exist in the file, the file position indicator is set so that processing of the first sequential READ statement results in an AT END condition.
If SELECT OPTIONAL is specified in the file-control entry, OPEN statement processing causes the program to check for the presence or absence of this file at run time. If the file is absent, the first READ statement for this file causes the AT END condition to occur.
Under the OPTION(*NOBLK) option, the compiler generates code to block output records and unblock input records if the following conditions are satisfied:
The BLOCK CONTAINS clause does not control the blocking factor for any files except tape files. The BLOCK CONTAINS clause controls the blocking factor for all files.
Related Information:
If SELECT OPTIONAL is specified in the file-control entry and OPTION(*CRTF) is specified in the CRTCBLMOD or CRTBNDCBL command, this combination is not valid.
+-------------------------------IBM Extension--------------------------------+
The first record to be made available to the program can be specified at run time by using the POSITION parameter on the OVRDBF CL command. For more information on this command, see the CL and APIs section of the Programming category in the iSeries Information Center at this Web site -http://www.ibm.com/eserver/iseries/infocenter.
+----------------------------End of IBM Extension----------------------------+
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.