7.20 GET_FILENAME_EXTERNAL

Returns the external format file name value in a string instead of fname.

This is the required call to obtain ANSI names.

Syntax

For C:

include "usrdecs"
short result;
char *filename;
short filename_len;
short max_name_len;
short source_or_target;
result = GET_FILENAME_EXTERNAL (char *filename, short *filename_len,
short max_name_len, short source_or_target);

For TAL:

?source usrdect
int result;
string .ext filename_name;
int .filename_name_len;
int max_name_len;
int source_or_target;
result := PROC GET_FILENAME_EXTERNAL (filename_name, filename_name_len,
max_name_len, source_or_target);

For COBOL:

?CONSULT =EXTRACT (or =REPLICAT)
01 result PIC S9(4) COMP.
01 filename PIC x(48).
01 filename-len PIC S9(04) COMP.
01 max-name-len PIC S9(4) COMP.
01 source-or-target PIC S9(4) COMP.
ENTER C "GET_FILENAME_EXTERNAL" using filename, filename-len, max-name-len,
source-or-target giving result.
filename

The name of the current record's file.

filename_len

The size of the returned name.

max_name_len

The maximum size that was allocated to the buffer.

source_or_target
Represented by either EXIT‐FN‐SOURCE‐VAL or EXIT-FN-TARGET-VAL to indicate whether the record is a source or target record.
result

A code indicating whether the call was successful or not.