:PUT_READ_BUFFER, :PUT_PROMPT_BUFFER

:PUT_READ_BUFFER and :PUT_PROMPT_BUFFER store values for an object that has been activated by the ACTIVATE_UC_OBJECT script function. Use the :PUT_READ_BUFFER script statement to write a script variable to the read buffer. Use the :PUT_PROMPT_BUFFER script statement to write a PromptSet variable to the buffer.

More Information:

Both statements store the variable in a storage area with an internal ID in the database. When you activate an object with ACTIVATE_UC_OBJECT, the activated object can access the values in the buffer.

Call the script statement for each value that you want to store. The internal ID of the storage area lets the statement store all values in the same area. If you call the script statement multiple times with the same variable name, each statement creates an individual entry. The entries are not overwritten with subsequent calls.

Use :READ statements to retrieve the values of the variables. :READ starts searching at the beginning of the storage area when reading a script variable. The statement retrieves the first available value of the variable, and deletes the entry. The next :READ statement retrieves the value of the next occurrence. For more information, see :READ.

Notes:

Important!

Syntax

:PUT_READ_BUF[FER] Variable Name = Content
:PUT_PROMPT_BUF[FER] Variable Name = Content

Parameters

Examples

The following example sets a value for a script variable that is called DATE1, and writes the value to the buffer. The script activates a Job called EVALUATION.

:PUT_READ_BUFFER DATE1# = "01.01.2006"
:
SET &ACTJOB# = ACTIVATE_UC_OBJECT(JOBS, EVALUATION) 

The activated Job (EVALUATION) contains a script that uses the entry (&DATE1) that is stored in the buffer:

:READ &DATE1#,,
:
SET &RET# = VALID_DATE("DD.MM.YYYY:&DATE1#")

The following example defines a script array, and writes a particular value from the array to the input buffer. The script activates a Job that is called PRINT.

:DEFINE &ARRAY#,string,5

:SET &ARRAY#[1] = "test1"

:PUT_READ_BUFFER
TEST# = &ARRAY#[1]

:
SET &ACTJOB# = ACTIVATE_UC_OBJECT(PRINT)

The activated Job (PRINT) reads the value from the array, and writes the value to the activation report.

:READ &TEST#,,

:PRINT "&TEST#"

The following example writes multiple values from a PromptSet in the buffer. The PromptSet is configured to allow multiselection. VARA# is the name of the variable selected as the data reference for the PromptSet element.

:PUT_PROMPT_BUFFER "VARA#[]"="VALUE1"
:PUT_PROMPT_BUFFER "VARA#[]"="VALUE2"

The following example stores the name of the Agent of a Job in the buffer, and calls a Notification object.

:SET &att_host# = GET_ATT(HOST)
:
PUT_READ_BUFFER host# = '&att_host#'

:SET &ret# = ACTIVATE_UC_OBJECT('CALLOP')

The Notification object contains a :READ statement that retrieves the Agent name of the task that activates the Notification:

:READ &host#,,

:PRINT "Agent: &host#"

See also:

seealso

Notification (CALL)

PromptSets (PRPT)