GET_FILENAME
Retrieves the source or target file name in FNAME internal format.
Syntax
For C:
#include "usrdecs"
short result;
typedef struct fname_def
{char volume[8];
char subvol[9];
char file[8];
} fname_def;
fname_def fname;
short source_or_target;
result = GET_FILENAME(fname, source_or_target);
For TAL:
?source usrdect
int result;
int .ext fname;
int source_or_target;
result := GET_FILENAME (fname, source_or_target);
For COBOL:
?CONSULT =EXTRACT (or =REPLICAT)
01 result PIC S9(4) COMP2.
01 fname.
02 volume pic x(8).
02 subvol pic x(8).
02 filename pic x(8).
01 source-or-target PIC S9(4) COMP.
ENTER C "GET_FILENAME" using fname, source-or-target giving result.
filename
The name of the current record’s file.
fname
The name of the file in internal format.
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.
In case, the file name is an ANSI format name, the call is successful and the resulting fname is:
$DUMMY.ANSI.NAME.
To obtain the actual ANSI name use GET_FILENAME_EXTERNAL.