Declaration of file reference type host variables in FORTRAN embedded SQL applications

File reference type host variables that you declare in your embedded FORTRAN application are treated as if they were declared in a FORTRAN program. Host variables allow you to exchange data between the embedded application and the database manager.

The syntax for declaring file reference host variables in FORTRAN is:

Read syntax diagramSkip visual syntax diagramSQL TYPE IS BLOB_FILECLOB_FILE ,variable-name
File reference host variable considerations:
  1. Graphic types are not supported in FORTRAN.
  2. SQL TYPE IS, BLOB_FILE, CLOB_FILE can be either uppercase, lowercase, or mixed.
Example of a BLOB file reference variable (CLOB file reference variable is similar):
   SQL TYPE IS BLOB_FILE my_file 
Results in the generation of the following declaration:
    character     my_file(267) 
    integer*4     my_file_name_length 
    integer*4     my_file_data_length 
    integer*4     my_file_file_options 
    character*255 my_file_name 
    equivalence(  my_file(1), 
   +              my_file_name_length ) 
    equivalence(  my_file(5), 
   +              my_file_data_length ) 
    equivalence(  my_file(9), 
   +              my_file_file_options ) 
    equivalence(  my_file(13), 
   +              my_file_name )