Previous Topic: AOF Variables Available in an ARM RuleNext Topic: Command Rules


Debug an ARM Rule

The following example assumes:

Example: Debug an ARM Rule

)ARM CICS*
)PROC
  if arm.fromsys <> arm.tosys then  /* CICS region transfer */
    do
      address SQL "Update CICS_TABLE Set CURRENT_STATE='DOWN',",
        "DESIRED_STATE='UPARM', MODE='ACTIVE',",
        "Where JOBNAME='"arm.jobname"' And ",
        "MODE='INACTIVE'"
      return "NORMAL"                 /* Let ARM do 1st start */
  End
  /* Local system restart */
  address SQL "Select NAME From CICS_TABLE",
     "Where JOBNAME='"arm.jobname"' And",
     "MODE='ACTIVE'"
  if rc=0 & sqlcode=0 then           /* Found in SSM table    */
    return "SUPPRESS"                /* SSM will do restart   */
  return "NORMAL"                    /* Not under SSM control */
  )END

Note: For debugging techniques that you can use with all AOF rules, see the chapter “Code and Debug AOF Rules.”