Note: Built-In Function Rules Usage Options
Gets a list of help text for a specified field, function or process.
This is a Specialized Built-In Function for use in a Development Environment only.
Arguments
|
Return Values
|
Example
A user wants to retrieve the help text of a specific object and display it without the use of the HELP key.
********* Define arguments and lists
DEFINE FIELD(#OBJNAM) TYPE(*CHAR) LENGTH(10)
DEFINE FIELD(#OBJEXT) TYPE(*CHAR) LENGTH(10)
DEFINE FIELD(#OBJTYP) TYPE(*CHAR) LENGTH(2)
DEFINE FIELD(#HLPTXT) TYPE(*CHAR) LENGTH(77)
DEFINE FIELD(#RETCOD) TYPE(*CHAR) LENGTH(2)
DEF_LIST NAME(#WKHLPL) FIELDS((#HLPTXT)) TYPE(*WORKING)
DEF_LIST NAME(#BWHLPL) FIELDS((#HLPTXT))
GROUP_BY NAME(#RQSOBJ) FIELDS((#OBJNAM) (#OBJEXT) (#OBJTYP))
GROUP_BY NAME(#DSPHLP) FIELDS((#OBJNAM) (#OBJEXT) (#OBJTYP))
********* Clear working and browse lists
BEGIN_LOOP
********* Request Object Name, Extension and Type
REQUEST FIELDS(#RQSOBJ)
CLR_LIST NAMED(#WKHLPL)
CLR_LIST NAMED(#BWHLPL)
********* Execute built-in-function - GET_HELP
USE BUILTIN(GET_HELP) WITH_ARGS(#OBJNAM #OBJEXT #OBJTYP)
TO_GET(#WKHLPL #RETCOD)
********* Help text was retrieved successfully
IF COND('#RETCOD *EQ ''OK''')
********* Move Help text from the working list to the browselist
SELECTLIST NAMED(#WKHLPL)
ADD_ENTRY TO_LIST(#BWHLPL)
ENDSELECT
********* Allow Help text to be reviewed for the specified object
DISPLAY FIELDS((#DSPHLP)) BROWSELIST(#BWHLPL)
********* Working list overflowed, more help text to retrieve
ELSE
IF COND('#RETCOD *EQ ''OV''')
MESSAGE MSGTXT('List not big enough to fit all help text')
********* GET_HELP failed with errors, report error
ELSE
MESSAGE MSGTXT('GET_HELP failed with errors, try again')
ENDIF
ENDIF
END_LOOP