BUFNO can be taken from the JCL, File statement or the Options table. Whether the file is input and output determines which BUNFO parameter will be used and the order of precedence.
CA Easytrieve parses the FILE statement differently for INPUT files and OUTPUT files.
For INPUT files, BUFNO will come from the JCL.
If not in the JCL, we check the FILE statement.
If not there, we get it from the options table.
For OUTPUT files, we ignore the JCL and check for the BUFNO parameter on the FILE statement.
If it is not there, we use the BUFNO from the options table.