PREP_PROCESS_REPORT

Use the PREP_PROCESS_REPORT script function to retrieve the report lines of executable objects from the database. The script function lets you filter by type and content of the reports. 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 a particular line in the report.

Tip: Analyze the job report of the task itself in the Post Process page. For more information, see Process Pages. Depending on the result, use :MODIFY_STATE to specify the definitive end of the job.

More Information:

Notes:

Syntax

PREP_PROCESS_REPORT ([Object type] ,[RunID] ,[Report type] [,Filter] [,"COL=Definition1] [,Definition2]")

Parameters

Notes:

Defining Columns

To split the data sequence lines into columns, specify the column separation as follows:

COL=Definition1[, Definition2]

Where

Examples

The following example searches for all lines of a job report that refer to drive C:. The script prints those lines in the activation report.

:SET &HND# = PREP_PROCESS_REPORT("JOBS",, "REP", "*C:\*")
:
PROCESS &HND#
:   
SET &RET# = GET_PROCESS_LINE(&HND#)
:   
PRINT &RET#
:
ENDPROCESS

A Job called MM.DAY prompts the user for file names. The file names are printed in the activation report of the Job. The following script in a different task reads the file names from the activation report of the Job, and prints them in the activation report of the task that contains the script.

:SET &RUNNR# = GET_UC_OBJECT_NR("MM.DAY")

:
SET &HND# = PREP_PROCESS_REPORT(, &RUNNR#, "ACT",,"COL=DELIMITER", "DELIMITER=*'*")
:
PROCESS &HND#
:   
SET  &RET# = GET_PROCESS_LINE(&HND#,1)
:   
PRINT &RET#
:
ENDPROCESS

The following script on the Post Process page of a Job retrieves lines which contain "file not found" in the job report of the Job itself. The script sends a message to the user logged in to the Automic Web Interface to inform them that an error occurred while copying.

:SET &HND# = PREP_PROCESS_REPORT(,,,"*file not found*")
:
PROCESS &HND#
:   
SEND_MSG BU,BU,"Error occurred while copying."
:   
MODIFY_STATE RETCODE=50
:
ENDPROCESS

See also:

seealso

Script Elements for Data Sequences