TNS/E Native Application Conversion Guide
Converting Programs With Guardian API Calls
TNS/E Native Application Conversion Guide—529659-003
10-6
CHECK^FILE
CHECK^FILE
The CHECK^FILE procedure retrieves the file characteristics of a specified file. There
are two versions of the CHECK^FILE procedure: one for TNS programs and one for
native programs. Separate TNS and native versions are required because pTAL uses
separate data types for passing and returning integer and address parameter values.
For TNS programs, the procedure passes integer and address values through a type
INT parameter. For native programs, the procedure returns integer values through a
type INT parameter and address values through a new optional parameter of type
WADDR. pTAL type WADDR is equivalent to C type short. When converting to native
mode, change your programs to use the native version of CHECK^FILE.
To maintain common TNS and native source code, use the
CALL_CHECK^FILE_ADDRESS_ DEFINE in the GPLDEFS declarations file. This
DEFINE calls the correct version of CHECK^FILE, depending on which environment
the program is compiled in.
For more information about the CHECK^FILE procedure, see the
Guardian Procedure
Calls Reference Manual
.
SET^FILE
The SET^FILE procedure alters file characteristics and checks the old values of the
characteristics being altered. There are two version of the SET^FILE procedure: one
for TNS programs and one for native programs. Separate TNS and native versions are
required because pTAL uses separate data types for passing and returning integer and
address parameter values.
For TNS programs, the procedure returns integer and address values through a pointer
of type INT. For native programs, the procedure returns integer values through a type
INT parameter and address values through a new optional parameter of type WADDR.
pTAL type WADDR is equivalent to C type short. When converting to TNS/E native
mode, change your programs to use the native version of SET^FILE.
To maintain common TNS and native source code, use the
CALL_SET^FILE_ADDRESS_ DEFINE in the GPLDEFS declarations file. This
DEFINE calls the correct version of SET^FILE, depending on which environment the
program is compiled in.
For more information about the SET^FILE procedure, see the
Guardian Procedure
Calls Reference Manual
.










