9.141 MAKE_FILE_OPERATIONL
Note: Built-In Function Rules Usage Options
Submits a job to create or recreate a file plus associated logical files and I/O module.
This is a Specialized Built-In Function for use in a Development Environment only.
Arguments for Visual LANSA
No | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | A | Req | File name | 1 | 10 | ||
2 | A | Req | Library name | 1 | 10 | ||
3 | A | Opt | Recreate options if file is already created Byte 1: Byte 2: Byte 3: | 1 | 3 | ||
4 | A | Opt | Name of job Ignored | 1 | 10 | ||
5 | A | Opt | Name of job description Ignored | 1 | 21 | ||
6 | A | Opt | Name of job queue Ignored | 1 | 21 | ||
7 | A | Opt | Name of output queue Ignored | 1 | 21 | ||
8 | A | Opt | Produce file and I/O module source listings ? Y = keep source | 1 | 1 | ||
9 | A | Opt | Ignore decimal data error in associated I/O module? Ignored | 1 | 1 | ||
10 | A | Opt | Strip debug data options in associated I/O module? Ignored | 1 | 1 | ||
11 | A | Opt | User program to call Ignored | 1 | 21 | ||
12 | A | Opt | Delete $$ File? (Used for Keep Saved Data) Y = Keep saved data. N = Do not keep saved data. Default: N | 1 | 1 |
Arguments for LANSA for i
For further information, refer to Create/Recreate a file from its definition screen in Submitting Job to Make File Definition Operational in the LANSA for i User Guide.
|
Return Values
|
Example
A user wants to control the compilation of files and associated logical views and I/O module using their own version of the "Create / Re-Create a File" facility.
FUNCTION OPTIONS(*DIRECT)
********** Define arguments and lists
DEFINE FIELD(#FILNAM) TYPE(*CHAR) LENGTH(010)
DEFINE FIELD(#LIBNAM) TYPE(*CHAR) LENGTH(010)
DEFINE FIELD(#RETCOD) TYPE(*CHAR) LENGTH(002)
BEGIN_LOOP
********** Request File and library name
REQUEST FIELDS((#FILNAM)(#LIBNAM))
USE BUILTIN(START_FILE_EDIT) WITH_ARGS(#FILNAM #LIBNAM LAN 'SALES RESULTS' NORMAL) TO_GET(#RETCOD)
USE BUILTIN(END_FILE_EDIT) WITH_ARGS(Y) TO_GET(#RETCOD)
********** Execute Built-In Function - MAKE_FILE_OPERATIONL
USE BUILTIN(MAKE_FILE_OPERATIONL) WITH_ARGS(#FILNAM #LIBNAM) TO_GET(#RETCOD)
********** Check if submission was successful
IF COND('#RETCOD *EQ ''OK''')
MESSAGE MSGTXT('Create/recreate of file submitted successful')
CHANGE FIELD(#FILNAM) TO(*BLANK)
ELSE
MESSAGE MSGTXT('Create/recreate submit failed with errors, refer to additional messages')
ENDIF
END_LOOP