9.129 LOAD_OTHER_FILE
Note: Built-In Function Rules Usage Options
Loads the definition of an "OTHER" file.
An edit session must be commenced by using the START_FILE_EDIT Built-In Function, prior to using this Built-In Function.
Arguments
|
Return Values
|
Example
A user wants to control the load of an "OTHER" file definition using their own version of the 'Load an "OTHER" file' option. A maximum of 2 logicals to load has been specified in this example.
********** Define arguments and lists
DEFINE FIELD(#FILNAM) TYPE(*CHAR) LENGTH(10)
DEFINE FIELD(#LIBNAM) TYPE(*CHAR) LENGTH(10)
DEFINE FIELD(#MAXLOG) TYPE(*DEC) LENGTH(2) DECIMALS(0)
DEFINE FIELD(#RETCOD) TYPE(*CHAR) LENGTH(2)
BEGIN_LOOP
********** Request File and library name and maximum number of
********** logicals to load
REQUEST FIELDS(#FILNAM #LIBNAM #MAXLOG)
**********
USE BUILTIN(START_FILE_EDIT) WITH_ARGS(#FILNAM #LIBNAM 'DEM') TO_GET(#RETCOD)
USE BUILTIN(LOAD_OTHER_FILE) WITH_ARGS(2) TO_GET(#RETCOD)
USE BUILTIN(END_FILE_EDIT) WITH_ARGS('Y') TO_GET(#RETCOD)
********** Submit job to make file operational
USE BUILTIN(MAKE_FILE_OPERATIONL) WITH_ARGS(#FILNAM #LIBNAM) TO_GET(#RETCOD)
**********
END_LOOP