TS/MP Management Programming Manual (G06.24+, H06.03+)
Management Programming Examples
NonStop TS/MP Management Programming Manual—540082-001
15-31
Adding or Altering a Server
Example 15-2. Adding or Altering a Server (page 1 of 5)
?TACL MACRO
#FRAME
[#PUSH X^ Y^ == variables for zspi and zpwy ddls
read^err io^err reply request == #requester variables
pmon^name == pathmon name parameter
result^1 j^1 == contains result of ssget operation
result^2 j^2 == contains # of tokens ssget returned
result^3 == contains ssget pathway error
res^cmd == contains command from response buffer
res^obj == contains object type from response
res^err == contains error from response
res^name == contains object name in error
cont^true == specifies continuation selected
svr^name == paramed server name.
command^ == paramed command type.
] == end #push
== Make sure the PATHMON name is supplied and check for the $ character.
[#DEF r_valid_pmonname ROUTINE |BODY|
[#IF [#EMPTY %1%] |THEN|
#OUTPUT You must enter the Pathmon name $...
#RESULT 0
|ELSE|
#SET pmon^name %1%
[#IF [#MATCH [#CHARFIND pmon^name 1 $] 1] |THEN|
#RESULT -1
|ELSE|
#RESULT 0
#OUTPUT The Pathmon name must start with a "$"......
] == end if match charfind pmon^name 1 $
] == end if empty %1%
] == end def r_valid_pmonname
== Make sure the command is valid.
[#DEF r_command_ok ROUTINE |BODY|
#FRAME
#PUSH command^type == accepts the parameter passed command
[#CASE [#ARGUMENT /TEXT command^type/ KEYWORD/ WORDLIST ADD
ALTER/
END OTHERWISE]