How do I check if a IEM action script parameter has been defined prior to assigning a value to a action script parameter?

IEM task SIS_Common_Mount_Unmount does a NFS mount of the software repository for the NFS server in the subnet of the network interface of a IEM computer.

Some IEM computers like AIX server pico has a network interface in subnet 125.101.0.0 and a network interface in subnet 198.20.11.0

IEM 9.2 Action Guide documents:
“You can’t reset a parameter that already has a value. When this occurs, the client will abort the action at the line that is attempting to reset the parameter.”

Due to above restriction, the second if match below fails trying to set parameter “repository_hostname” a second time.
if {exists subnet addresses whose (it as string contains “198.20.11.0”)
of ip interfaces whose (loopback of it = false) of network}
parameter “repository_hostname” = “zbase_repo”

How do I check if a action script parameter has been defined prior to assigning a value to a action script parameter?

Tried to do this with code below. Execution had Status on
Failed if {parameter “repository_hostname” = “”} with Relevance substitution error.
Failed parameter “repository_hostname” = "zbase_repo
// Set the software repository hostname, IP address and export path if
target computer has IP address with subnet 198.20.11.0.
if {exists subnet addresses whose (it as string contains “198.20.11.0”)
of ip interfaces whose (loopback of it = false) of network}
if {parameter “repository_hostname” = “”}
parameter “repository_hostname” = "zbase_repo"
parameter “repository_ipaddress” = "198.235.144.201"
parameter “repository_export_path” = "/sis/software"
endif
endif

Try:

if {exists parameters "repository_hostname"}

endif

Usage of following statement worked. Thanks James for your help!
if {not exists parameters “repository_hostname”}

1 Like