Precedence of file-system determination

The file system applicable to a given SEQUENTIAL, INDEXED, or RELATIVE file is determined according to the following precedence, from highest to lowest.

  1. The file system specified by the assignment-name runtime environment variable or the value of the USING data item that is coded in the ASSIGN clause
  2. The file system specified by the next-to-rightmost component of the literal or user-defined word that is coded in the ASSIGN clause if that component is at least three characters long (and meets the other criteria described in the documentation of the ASSIGN clause)
  3. The default file system designated by the FILESYS runtime option (as specified in the COBRTOPT runtime environment variable)

If no file system is determined by the preceding means, the file system defaults to SFS if the leftmost part of the system file-name matches the runtime value of the ENCINA_CDS_ROOT environment variable, otherwise to SdU.

related concepts  
File systems  

related references  
Runtime environment variables
  
FILESYS  
ASSIGN clause (COBOL for AIX Language Reference)