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:

  1. Name of the PromptSet variable, without a leading ampersand (&)
  2. Value of the user-defined field
  3. Default value of the element
  4. 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)
  5. Name of the data reference object (VARA or Calendar)
  6. 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


Examples

A PromptSet object called PRPT.JOBP contains 4 elements:

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:

seealso

Script Elements for Data Sequences