Michael_Lowry

Get platform of job or file transfer, before it has started

Discussion created by Michael_Lowry on Feb 1, 2017
Latest reply on Feb 1, 2017 by Michael_Lowry
I am trying to come up with some AE scripting that will accomplish this:
  • In a JOBS pre-process tab
    • Read the platform of the job
    • Set agent and login based on the platform
  • In a JOBF process tab
    • Source
      • Read the source platform of the file transfer
      • Set the source agent and login based on the platform
    • Destination
      • Read the destination platform of the file transfer
      • Set the destination agent and login based on the platform
I’m not quite sure how to:
  • read theplatformof a JOBS/JOBF object independently of the agent; or
  • read thesource platformanddestination platformof a JOBF independently of each other.
The new &$PLATFORM# pre-defined variable seemed like an obvious place to start, but using it in a JOBF results in a syntax error.
U00021719 Syntax error in object 'UC4.TRACE.GAELAT.SET_CLUSTER_NODE.JOBI', line '00014'.
'U01001308 Variable '$PLATFORM#' has not yet been defined.'
I also tried using a command like this, to read the platform of the default agent.
:SET &PLATFORM#  = GET_VAR('UC_HOST_SW',&AGENT#)
But this too resulted in an error later, when I tried to override the agent using PUT_ATT.
U00020521 Runtime error in object 'UC4.TRACE.GAELAT.SET_AGENT_AND_LOGIN.JOBI', line '00017':
Changing the host is not allowed after reading a host variable.
Is there a straightforward way to do what I want? Ideally, I’d like a single bit of AE scripting I can put in a JOBI that will work all of the above contexts.

Outcomes