SimCon logo

SimCon - Fortran Analysis, Engineering & Migration

  FPT Reference ManualDownloadsLicensingHome

FPT - File Names in Migrating Fortran Code
File Names in Migrated Code

Code to be migrated from one host to another usually contains file names written in the operating system format for the original host. These are written in INCLUDE statements, which are translated by FPT when the code is migrated, and in OPEN and INQUIRE statements. The file names in OPEN and INQUIRE statements may be written as strings or may be character variables which are read or constructed at run-time.

There are two options:

  • To change the file name handling in the migrated code. At present, this must be carried out manually - it is not supported by FPT.

  • To keep the original file name handling, and to translate the names in the OPEN and INQUIRE statements. This is particularly appropriate when the programs may continue to use VMS logical names on the new host, or when the code is still required to run on the old host.

Translation by FPT

Translation of file names is controlled by the FPT commands:

% insert function to translate file names
% insert subroutine to translate file names
% file name translation function : name
% file name translation subroutine : name
Click here for an example of the translated code.

File Names Passed as Arguments

File names are sometimes passed as arguments to external library routines. These may also be translated.

FPT needs to know which arguments are file names. Often, the sub-program code is not available, and a template is then set-up for the sub-program in a file which is read by FPT, but is not used in building the program. The file name arguments are marked by annotations.

Click here to see an example.

Copyright ©1995 to 2015 Software Validation Ltd. All rights reserved.