PREP_PROCESS_DOCU
Use the PREP_PROCESS_DOCU script function to retrieve the content of a Documentation page from an object. The script function lets you specify the name of a particular Documentation page. The script function returns a reference to a data sequence that you can use for further processing by assigning the return code to the :PROCESS script statement. Use the GET_PROCESS_LINE script function to access each line in the data sequence.
You can retrieve the content of structured or simple (text-only) Documentation pages:
- All elements that are defined in the left tab area in structured Documentation pages are saved in the data sequence line by line.
- The content (text) of a simple Documentation page is stored in the data sequence line by line.
Syntax
PREP_PROCESS_DOCU (ObjectName, [Documentation page])
Parameters
| Parameter | Description | Format |
|---|---|---|
| ObjectName | Name of the object from which to retrieve Documentation page content. | Script literal or script variable |
| Documentation page |
(Optional) Name of the Documentation page. Note: The name is case insensitive. If you do not specify a name, the system searches for the default Documentation page that is called Docu. |
Script literal or script variable |
Important Considerations
Keep the following rules and behaviors in mind when using this script function:
- Specify the name of the object and the name of the Documentation page exactly as they are defined in UC_OBJECT_DOCU.
- The script aborts if the object name is invalid.
- The script function does not abort when there is no Documentation page with the specified name. The returned data sequence is empty in this case.
- You cannot assign a new value to the script variable that contains the reference to the data sequence. Use :CLOSE_PROCESS to discard the existing data sequence, and then assign a new value.
More Information:
- Defining the Documentation Page
- UC_OBJECT_DOCU - Object Documentation
- :PROCESS... :TERM_PROCESS... :ENDPROCESS
Examples
The following script retrieves the content of a custom Documentation page that is called Notes in a Script object. The script prints the content of the page in the activation report:
:SET &HND# = PREP_PROCESS_DOCU(SCRI.TEST, Notes)
:PROCESS &HND#
:SET &LINE# = GET_PROCESS_LINE(&HND#)
:PRINT &LINE#
:ENDPROCESS
:CLOSE_PROCESS &HND#
See also: