Hi Rodrigo,
in case that an agent (Windows, Unix, SAP, RAFTP, ...) is not active the JOBS will wait for the agent (status "waiting for host"). I can see 2 options:
check the Agent status from the PreProcess tab in object properties:
check the Agent status in the preProcess tab of the JOBS:
if you have to check in many JOBS, create an INC onject and reference it in the PreProcess tab.
regards,
Peter
------------------------------
Capture Europe
------------------------------
Original Message:
Sent: 12-03-2020 10:15 AM
From: Rodrigo Cunha
Subject: How to check if SAP is up?
Sorry I was not clear. The need to use the Post_Processing was the use of command MODIFY_STATE, which I am using in order to block the workflow where the job is included.
:IF sys_host_alive ("&SAP_SID#", "CONN_&SAP_SID#") = "Y"
xx
: MODIFY_STATE RETCODE=1800
xx
:ENDIF
Do you suggest any other command to block the execution and stop the workflow where the job is included? If I have another option I can try to use SCRIPT object again.
Original Message:
Sent: 12-03-2020 10:08 AM
From: Peter Grundler
Subject: How to check if SAP is up?
Checking SAP should be done from a SCRI object. As you experienced, if the SAP system is not up the JOBS will wait and wait and wait ...
But a SCRI object will check and end normally.
------------------------------
Capture Europe
Original Message:
Sent: 12-03-2020 10:03 AM
From: Rodrigo Cunha
Subject: How to check if SAP is up?
Yes. it is a JOBS.
I saw somewhere that should be executed in the post-processing.
Original Message:
Sent: 12-03-2020 09:51 AM
From: Peter Grundler
Subject: How to check if SAP is up?
Hi Rodrigu,
I suppose you have created a JOBS, not a SCRI object, right?
regards,
Peter
------------------------------
Capture Europe
Original Message:
Sent: 12-03-2020 09:06 AM
From: Rodrigo Cunha
Subject: How to check if SAP is up?
Hello Peter,
I am back to this topic again. I realized that using the agent and connection together, if the agent is up and the system is down, the script stays as "waiting for the server". For me does not make sense. If both are up, the anaylis is correct.
The Atributes are empty because I am defining the entries using an include on the Pre-Process. Process are empty too. O the Post-Process I did the check:
:IF sys_host_alive ("&SAP_SID#", "CONN_&SAP_SID#") = "N"
xx
:ENDIF
Do you have an idea?
Thanks Rodrigo
Original Message:
Sent: 11-17-2020 09:39 AM
From: Peter Grundler
Subject: How to check if SAP is up?
Hi Rodrigo,
have you used both values, agent and conn object?
regards,
Peter
------------------------------
Capture Europe
Original Message:
Sent: 11-17-2020 09:32 AM
From: Rodrigo Cunha
Subject: How to check if SAP is up?
Hello Peter,
Thank you for the Reply!
Yes, but this "sys_host_alive" will only check if the agent is alive, not the system itself.
I could not find a way to check if the system itself is up.
Thank you!
Rodrigo
Original Message:
Sent: 11-17-2020 09:15 AM
From: Peter Grundler
Subject: How to check if SAP is up?
Hi Rodrigo,
I assume you have an Automic Agent connected to the SAP system. So you can use SYS_HOST_ALIVE as described here
:set &sap_alive# = sys_host_alive ("sapagent", "conn.r3.sapagent")
regards,
Peter
------------------------------
Capture Europe
Original Message:
Sent: 11-17-2020 06:52 AM
From: Rodrigo Cunha
Subject: How to check if SAP is up?
Hello,
Does anyone suggest a way (script / command) to check if SAP is active?
Thank you!
Rodrigo