PREP_PROCESS_PROMPTSET
Use the PREP_PROCESS_PROMPTSET script function to retrieve information about each element in a PromptSet object. The script function returns a reference to a data sequence. Assign the return code to the :PROCESS script statement to further process the data sequence.
The data sequence contains a line for each element in the PromptSet object. The lines are divided into columns. The columns contain information about each PromptSet element, in the following order:
- Name of the PromptSet variable, without a leading ampersand (&)
- Value of the user-defined field
- Default value of the element
- Type of element:
- Text field (text)
- Number (integer)
- Combobox (combo)
- Radio button (dynradiogroup)
- Checkbox (dyncheckgroup)
- Time/date (date, timestamp or time, depending on the data type of the element)
- Name of the data reference object (VARA or Calendar)
- Key of the Calendar object (if applicable)
Tip: Use GET_PROCESS_LINE to access and process particular columns in the data sequence. If you do not specify a particular column, GET_PROCESS_LINE returns all information about an element, separated by the characters §§§.
Note: 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
Syntax
PREP_PROCESS_PROMPTSET ( PromptSet name )
Parameters
-
PREP_PROCESS_PROMPTSET
Retrieves details of elements in a PromptSet object -
PromptSet name
Name of the PromptSet object to retrieve information from
Format: script literal or script variable
Examples
A PromptSet object called PRPT.JOBP contains 4 elements:
-
Variable name: DBCHOICE
Element type: Combobox
Data reference: Custom VARA object (DB_MAINTENANCE) -
Variable name: SENDTO
Element type: Checkbox
Data reference: VARA object for system and client values (UC_SENDTO_ACT) -
Variable name: ARCHIVEOPTION
Element type: Checkbox
Data reference: VARA object for system and client values (UC_UTILITY_ARCHIVE) -
Variable name: TIMESTAMP1
Element type: Time/Date
Data reference: Default data reference (UC_DATATYPE_TIMESTAMP)
The following example reads the elements defined in the PRPT.JOBP. The script retrieves all available information about the elements, and writes the lines in the activation report.
:SET &HND# = PREP_PROCESS_PROMPTSET(PRPT.JOBP)
:PROCESS &HND#
: SET &LINE# = GET_PROCESS_LINE(&HND#)
: P &LINE#
:ENDPROCESS
:CLOSE_PROCESS &HND#
The information written in the activation report would look as follows:
2018-01-31 11:28:59 - U0020408 DBCHOICE§§§§§§§§§combo§§§DB_MAINTENANCE§§§
2018-01-31 11:28:59 - U0020408 SENDTO§§§§§§§§§dyncheckgroup§§§UC_SENDTO_ACT§§§
2018-01-31 11:28:59 - U0020408 ARCHIVEOPTION §§§§§§§§§dyncheckgroup§§§UC_UTILITY_ARCHIVE§§§
2018-01-31 11:28:59 - U0020408 TIMESTAMP1§§§§§§2010-10-28 14:34:57§§§timestamp§§§UC_DATATYPE_TIMESTAMP§§§0
The script in the following example retrieves only the name and type of the PromptSet elements, and prints them in the activation report.
:SET &HND# = PREP_PROCESS_PROMPTSET(PRPT.JOBP)
:PROCESS &HND#
: SET &VAR# = GET_PROCESS_LINE(&HND#,1)
: SET &TYPE# = GET_PROCESS_LINE(&HND#,4)
: P &VAR# &TYPE#
:ENDPROCESS
:CLOSE_PROCESS &HND#
The information written in the activation report would look as follows:
2018-01-31 11:59:20 - U0020408 DBCHOICE combo
2018-01-31 11:59:20 - U0020408 SENDTO dyncheckgroup
2018-01-31 11:59:20 - U0020408 ARCHIVEOPTION dyncheckgroup
2018-01-31 11:59:20 - U0020408 TIMESTAMP1 timestamp
See also: