| Note: Built-In Function Rules Usage Options |
Retrieves a list of physical files and their descriptions from the data dictionary and returns them to calling RDML function in a variable length working list.
This is a Specialized Built-In Function for use in a Development Environment only.
No | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | A | Req | Positioning file value. The returned list starts with the first file from the dictionary whose name is greater than the value passed in this argument. | 1 | 10 |
No | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | L | Req | Working list to contain File information. List must not be more than: The calling RDML function must provide a working list with an aggregate entry length of exactly 70 bytes. Each returned list entry is formatted as follows: From - To Description 1 - 10 Physical file name 11 - 20 Physical file library 21 - 60 Description 61 - 63 On IBM i are set to blank. On Windows, they contain this Visual LANSA-specific information: 62 - 62 Automatic RRNO (Y or N) 63 - 63 @@RRNO & @@UPID on file (Y or N) 64 - 64 RDMLX file (Y or N) 65 - 70 <<future expansion>> | 70 | 70 | ||
2 | A | Opt | Last file in returned list Typically this value is used as the positioning argument on subsequent calls to this Built-In Function. | 1 | 10 | ||
3 | A | Opt | Return code. OK = list returned partially or completely filled with file details. No more files exist beyond those returned in the list. OV = list returned completely filled, but more files than could fit in the list exist. Typically used to indicate "more" files in page at a time style list displays. NR = list was returned empty. Last file in the list is returned as blanks. | 2 | 2 |
This function could be used to write a program that allows a site to modify an existing LANSA database.
DEF_LIST NAME(#FILLST) FIELDS(#FILNAM #FILLIB #FILDES #SPARE)
TYPE(*WORKING) ENTRYS(10)
DEF_LIST NAME(#FILDSP) FIELDS((#SELECTOR *SEL) #FILNAM #FILLIB
#FILDES)
********** -Clear lists-
CLR_LIST NAMED(#FILLST)
CLR_LIST NAMED(#FILDSP)
********** -Request file to start from in list-
REQUEST FIELDS(#STRTFL) TEXT(('File to start from' 5 5))
********** -Get the list of files-
USE BUILTIN(GET_PHYSICAL_LIST) WITH_ARGS(#STRTFL)
TO_GET(#FILLST #LAST #RETCOD)
********** -If records found-
IF COND('(#RETCOD *EQ OK) *OR (#RETCOD *EQ OV)')
SELECTLIST NAMED(#FILLST)
ADD_ENTRY TO_LIST(#FILDSP)
ENDSELECT
**********
DISPLAY BROWSELIST(#FILDSP)
********** -Process selected records-
SELECTLIST NAMED(#FILDSP) GET_ENTRYS(*SELECT)
EXECUTE SUBROUTINE(FILE_EDIT)
ENDSELECT
ELSE
MESSAGE MSGTXT('No files found .... Program ended')
RETURN
ENDIF