Automic Workload Automation

 View Only

 How to Retrieve Content of REP when it is still On Agent

Edward Teoh's profile image
Edward Teoh posted Feb 20, 2023 10:12 PM

Hi All,

Understand that to read a report, I can use PREP_PROCESS_REPORT when the object execution is completed and when the report is "In Automation Engine".

May I know how can I read a report when the object is still running and the report is "On Agent".

Markus Embacher's profile image
Broadcom Employee Markus Embacher

Hi,

I haven't tried that, but I assume you can read the report file using PREP_PROCESS_FILE. The file is at the given path.

Regards, Markus

Edward Teoh's profile image
Edward Teoh

Hi @Markus Embacher ,

Thank you for sharing on this. My challenge encountered using PREP_PROCESS_FILE is that, I would like to read the file path "/opt/automic/serviceanager/.../OABKLTQB.TXT" as show in the screen in. May I get your advice, how can we do that via script?

Markus Embacher's profile image
Broadcom Employee Markus Embacher

Hi,

there is a number of virtual agent variables that contain information about the agent: 

https://docs.automic.com/documentation/webhelp/english/AA/12.3/DOCU/12.3/Automic%20Automation%20Guides/help.htm#AWA/AdministrationPerspective/AG_Agent_Variables.htm

You can use a script like this to get the file name:

:SET &PATH#=GET_VAR(UC_EX_PATH_JOBREPORT,"<name of the agent>")
:SET &ID7#=RUNNR2ALPHA(<runid of the job>)
:SET &FILE#="&PATH#O&ID7#.TXT"
:PRINT &FILE#

Regards, Markus

Michael A. Lowry's profile image
Michael A. Lowry

This thread might also be useful to you:

Converting between run IDs and alphanumeric job report IDs

Edward Teoh's profile image
Edward Teoh

Thanks @Markus Embacher and @Michael A. Lowry . this is very helpful.