9.122 GET_PHYSICAL_LIST
Þ Note: Built-In Function Rules.
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.
For use with
|
Arguments
|
Return Values
|
Example
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