VisaraMaster Console CenterScripting GuideP/N 707131-001
About This Guide Scripting Guide 10 The MCC Documentation Set In addition to this manual, you may need to refer to other manuals in the MCC docume
Chapter 5 Script Commands Scripting Guide 100 Manifest Constant Value Associated String/Reason ICLErr_Mvs_InvMsgCnt 4020 Invalid message count
Chapter 5 Script Commands Scripting Guide 101 EXEC Syntax: EXEC( $ScriptName[, Parm1, ...]) ==> ReturnValue Description: Executes a script who
Chapter 5 Script Commands Scripting Guide 102 $ScriptName := “script1” ELSE $ScriptName := “script2” ENDIF %ReturnValue := EXEC( $ScriptName,
Chapter 5 Script Commands Scripting Guide 103 FCLOSE Syntax: FCLOSE( %FileNum) Description: Closes an open file. Action: Closes a file opened wit
Chapter 5 Script Commands Scripting Guide 104 FDELETE Syntax: FDELETE( $FileName) ==> %Success Description: Permanently deletes a file. Action
Chapter 5 Script Commands Scripting Guide 105 FEXISTS Syntax: FEXISTS( $FileName) ==> %Success Description: Determines if a file exists. Actio
Chapter 5 Script Commands Scripting Guide 106 FILENO Syntax FILENO(%FileHandle) ==> %FileDescriptor Description: Obtains the system integer fil
Chapter 5 Script Commands Scripting Guide 107 FINDSTR Syntax: FINDSTR( $String, $Substring) ==> $FoundText Description: Searches a string for
Chapter 5 Script Commands Scripting Guide 108 FMODTIME Syntax: FMODTIME( File) ==> %EpochSeconds Description: Returns the time value of a last
Chapter 5 Script Commands Scripting Guide 109 FOPEN Syntax: FOPEN( $FileName[, %Mode]) ==> %FileHandle Description: Opens a file for I/O acces
Scripting Guide 11 Chapter 1 Script Overview This chapter describes: Script concepts Script structures Master scripts Reserved scripts
Chapter 5 Script Commands Scripting Guide 110 Example: %Handle := FOPEN( “SYS5”, OVERWRITE) $FileName := “SYS5” %Mode := APPEND %Handle := FOPEN(
Chapter 5 Script Commands Scripting Guide 111 FORMATSTR Syntax: FORMATSTR( $String [, expr1, [expr2, ..., [exprn]..]]) ==> $Formatted Descript
Chapter 5 Script Commands Scripting Guide 112 $Return := FORMATSTR( "The value is: %10d.", %Value2 ) LOG( LOG_EXEC, $Return, 12 ) OU
Chapter 5 Script Commands Scripting Guide 113 Conversion Specifications Syntax Each conversion specification in the String parameter has the follo
Chapter 5 Script Commands Scripting Guide 114 A field width can be indicated by an * (asterisk) instead of a digit string. In this case, an integ
Chapter 5 Script Commands Scripting Guide 115 x, X Accepts an integer value and converts it to unsigned hexadecimal notation. The letters abcdef
Chapter 5 Script Commands Scripting Guide 116 FPOS Syntax: FPOS( %FileNum) ==> %Position Description: Returns an open file’s current record po
Chapter 5 Script Commands Scripting Guide 117 FREAD Syntax: FREAD( %FileNum, var1[, var2, ..., [varn]...]) ==> %QtyRead Description: Reads val
Chapter 5 Script Commands Scripting Guide 118 FRENAME Syntax: FRENAME( $CurrentName, $NewName) ==> %Success Description: Renames a file. Actio
Chapter 5 Script Commands Scripting Guide 119 FREWIND Syntax: FREWIND( %FileNum) Description: Moves an open file’s current record pointer to the
Chapter 1 Script Overview Scripting Guide 12 Overview The Master Console Center Global Control Language (MCC GCL) is a powerful high-level program
Chapter 5 Script Commands Scripting Guide 120 FSEEK Syntax: FSEEK( %FileNum, %Position) ==> %Success Description: Moves an open file’s current
Chapter 5 Script Commands Scripting Guide 121 FWRITE Syntax: FWRITE( %FileNum, expr [, %NEWLINE] ) ==> %Success Description: Writes the expres
Chapter 5 Script Commands Scripting Guide 122 GETENV Syntax: GETENV($Variable) ==> $Value Description: Obtains the current value of the given e
Chapter 5 Script Commands Scripting Guide 123 GETPID Syntax: GETPID() ==> %ProcessId Description: Obtains the system process identifier for thi
Chapter 5 Script Commands Scripting Guide 124 GOSUB Syntax: GOSUB *Label Description: Immediately transfers script execution to the specified lab
Chapter 5 Script Commands Scripting Guide 125 GOTO Syntax: GOTO *Label Description: Immediately transfers script execution to the specified label
Chapter 5 Script Commands Scripting Guide 126 HEXSTR Syntax: HEXSTR( %Number) ==> $Hex Description: Converts an integer to a hex string. Actio
Chapter 5 Script Commands Scripting Guide 127 HMCEXEC Syntax: HMCEXEC(%ObjID, $Action [, parm1, ...]) => %RetVal Description: Send a command t
Chapter 5 Script Commands Scripting Guide 128 Possible HMC actions and parameters CPC and Image Commands Action Description Optional Parameter(s
Chapter 5 Script Commands Scripting Guide 129 HUMID Syntax: HUMID( %Port) ==> %Humidity Description: Reads the current humidity from a sensor
Chapter 1 Script Overview Scripting Guide 13 A script source file format is a standard ASCII file—it can be written anywhere and copied to the MCC
Chapter 5 Script Commands Scripting Guide 130 ICON Syntax: ICON( %Status[, $Message [, %Class [, $Name]]]) Description: Changes icon characterist
Chapter 5 Script Commands Scripting Guide 131 Notes: 1. Refer to Manifest Constants on page 42 for the constants reference list. 2. The defaul
Chapter 5 Script Commands Scripting Guide 132 ICONMSG Syntax: ICONMSG( [%Class [, $Name]]) ==> $Message Description: Returns an icon’s current
Chapter 5 Script Commands Scripting Guide 133 ICONNAME Syntax: ICONNAME( [%Class [, %Port]]) ==> $Name Description: Returns an icon’s name. Ac
Chapter 5 Script Commands Scripting Guide 134 ICONSTATUS Syntax: ICONSTATUS( [%Class [, $Name]]) ==> %Status Description: Returns an icon’s cu
Chapter 5 Script Commands Scripting Guide 135 IF Syntax: IF...[ELSE...]ENDIF IF Expression Group 1 command [More group 1 commands] [ELSE]
Chapter 5 Script Commands Scripting Guide 136 INC Syntax: INC %Variable Description: Adds one to a numeric variable’s value. Action: The value in
Chapter 5 Script Commands Scripting Guide 137 JOIN Syntax: JOIN( $Array, $Delimiter) ==> $String Description: Combines the elements of an arra
Chapter 5 Script Commands Scripting Guide 138 KEY Syntax: KEY( %Port, $Keys [,%Timeout]) ==> %RetCode Description: Enters a character string t
Chapter 5 Script Commands Scripting Guide 139 a command being processed, and a console that has failed or hung. 5. The KEY command processing als
Chapter 1 Script Overview Scripting Guide 14 Naming Scripts Each script must be given a unique name before it is saved and compiled. Note: The sc
Chapter 5 Script Commands Scripting Guide 140 KEY Command Return Values Manifest Constant Value Description Err_None 0 No error Err_Key_Timelock
Chapter 5 Script Commands Scripting Guide 141 KEY Command Specifics Note: The KEY command is not case sensitive. Characters within brackets ([ o
Chapter 5 Script Commands Scripting Guide 142 Keyboard Key Key Command INS (^a) or INSERT [INS] or [INSERT] IRPT [IPT] or [IRPT] ISTEP EOF [IS
Chapter 5 Script Commands Scripting Guide 143 LEFTSTR Syntax: LEFTSTR( $String, %Count) ==> $SubStr Description: Returns the leftmost specifie
Chapter 5 Script Commands Scripting Guide 144 LEN Syntax: LEN( $StringExpr) ==> %Count Description: Returns the number of characters in a stri
Chapter 5 Script Commands Scripting Guide 145 LOG Syntax: LOG( %LogType, $Message[, %Status]) Description: Enters a message in a log. Action: The
Chapter 5 Script Commands Scripting Guide 146 LOWER Syntax: LOWER( $String) ==> $Lowercase Description: Converts uppercase characters to lower
Chapter 5 Script Commands Scripting Guide 147 MKDTEMP Syntax: MKDTEMP($Pattern) ==> $DirectoryName Description: Creates a unique temporary dire
Chapter 5 Script Commands Scripting Guide 148 MKSTEMP Syntax: MKSTEMP($Pattern) ==> %FileHandle Description: Opens a unique temporary file for
Chapter 5 Script Commands Scripting Guide 149 MKTEMP Syntax: MKTEMP($Pattern) ==> $FileName Description: Returns a unique file name. Action: Cr
Chapter 1 Script Overview Scripting Guide 15 Reserved Scripts Every MCC system includes a set of reserved scripts. Reserved scripts automatically
Chapter 5 Script Commands Scripting Guide 150 MONIKER Syntax: MONIKER() ==> $Name Description: Obtains the product name. Action: Returns the pr
Chapter 5 Script Commands Scripting Guide 151 OBJEXEC Syntax: OBJEXEC( %ObjID, $Action[, Parms...]) ==> %ReturnValue Description: Executes an
Chapter 5 Script Commands Scripting Guide 152 OBJGET Syntax: OBJGET( %ObjID, $ObjFieldName) ==> $CurrentValue Description: Returns the current
Chapter 5 Script Commands Scripting Guide 153 OBJGETARRAY Syntax: OBJGETARRAY( %ObjID, $AssocArray) ==> %ErrCode Description: Populates an ass
Chapter 5 Script Commands Scripting Guide 154 OBJID Syntax: OBJID( %Class, $ObjKeyExpr) ==> %ObjectID Description: Returns the ID (unique only
Chapter 5 Script Commands Scripting Guide 155 //This example builds an array of ObjIDs, for use // with the QOPEN command. $Lpar1 := “9672-1:BETA
Chapter 5 Script Commands Scripting Guide 156 OBJIDARRAY Syntax: OBJIDARRAY( %Class, %ObjIDParent, %AssocArray) ==> %Children Description: Pop
Chapter 5 Script Commands Scripting Guide 157 LOG(LOG_EXEC, $aKidIDs[%Count] + “Object ID is: “ + / %aaKidIDs[$aKidIDs[%Count]], 1) INC %Count
Chapter 5 Script Commands Scripting Guide 158 OBJSET Syntax: OBJSET( %ObjID, $ObjFieldName, $NewValue) ==> %ErrCode Description: Sets the curr
Chapter 5 Script Commands Scripting Guide 159 OBJSETARRAY Syntax: OBJSETARRAY( %ObjID, $AssocArray) ==> %Success Description: Sets the field va
Chapter 1 Script Overview Scripting Guide 16 Status Change Reserved Script Name Executed in Response MCC is started (this event is not a login)
Chapter 5 Script Commands Scripting Guide 160 RETURN OUTPUT: Current Status is: UNKNOWN Desired Status is: UNKNOWN Group Status is: NONE Current
Chapter 5 Script Commands Scripting Guide 161 PARMS Syntax: PARMS var1[, var2 [, var3, ..., [varn]...]]] Description: Receives parameters into th
Chapter 5 Script Commands Scripting Guide 162 PORT Syntax: PORT( %Class[, $IconName]) ==> %Port Description: Returns the port number for a con
Chapter 5 Script Commands Scripting Guide 163 QCLOSE Syntax: QCLOSE( %QueueID) Description: Closes a message queue. Action: Closes the specified
Chapter 5 Script Commands Scripting Guide 164 QOPEN Syntax: QOPEN( [%ObjIdArray]) ==> %QueueID Description: Opens a new queue of OS printer co
Chapter 5 Script Commands Scripting Guide 165 commands does not function with an OS that uses an RS232 or Telnet connection with the no_printer fl
Chapter 5 Script Commands Scripting Guide 166 QPREVIEW Syntax: QPREVIEW( %QueueID, $ResultArray) ==> %RetCode Description: For non-mainframe p
Chapter 5 Script Commands Scripting Guide 167 console, you may wish to key “exit” before issuing your QPREVIEW().) Example: // Get the Object IDs
Chapter 5 Script Commands Scripting Guide 168 QREAD Syntax: QREAD( %QueueID, $MsgArray, %Wait[, $Filter]) ==> $MsgLine Description: Reads the
Chapter 5 Script Commands Scripting Guide 169 the printer message queue. It is placed in the printer message queue after the user presses <ENT
Chapter 1 Script Overview Scripting Guide 17 Parm 3. The name of the backup log. (A string.) The default #LOGSWAP.SCR script shipped with the
Chapter 5 Script Commands Scripting Guide 170 QSKIP Syntax: QSKIP( %QueueID, %Skip) Description: Moves a current message pointer for a queue. Act
Chapter 5 Script Commands Scripting Guide 171 REPEAT Syntax: REPEAT...UNTIL REPEAT Commands UNTIL Expression Description: Repeats a sequence
Chapter 5 Script Commands Scripting Guide 172 REPSTR Syntax: REPSTR( $String, %Count) ==> $RepeatedString Description: Returns a string repeat
Chapter 5 Script Commands Scripting Guide 173 RETURN Syntax: RETURN [Expression] Description: Returns execution to the calling routine, passing a
Chapter 5 Script Commands Scripting Guide 174 RIGHTSTR Syntax: RIGHTSTR( $String, %Count) ==> $SubStr Description: Returns the right-most spec
Chapter 5 Script Commands Scripting Guide 175 SCANB Syntax: SCANB( %Port, $Text, *Found) Description: Searches an OS console for a specified char
Chapter 5 Script Commands Scripting Guide 176 SCANP Syntax: SCANP( %Port, $Text, %Wait, *Found[, $Array]) Description: Searches an OS console for
Chapter 5 Script Commands Scripting Guide 177 SCRIPTCANCEL Syntax: SCRIPTCANCEL($ScriptName,$Class,$Name) Description: Obtains the system integer
Chapter 5 Script Commands Scripting Guide 178 SCRIPTGETACTIVE Syntax: SCRIPTGETACTIVE($AssocArray) ==> %ErrCode Description: Retrieves informat
Chapter 5 Script Commands Scripting Guide 179 current WAIT command $ScriptInfo[6] 0 Number of seconds which remain for the current WAIT comman
Chapter 1 Script Overview Scripting Guide 18 Executing Scripts There are four ways to execute a script: Manually. A user selects a script for
Chapter 5 Script Commands Scripting Guide 180 Examples: Simple Script to log all of the script information to the filtered message log: %rc := SC
Chapter 5 Script Commands Scripting Guide 181 SCRNTEXT Syntax: SCRNTEXT( %Port, %Start, %Length) ==> $Text Description: A full or partial scr
Chapter 5 Script Commands Scripting Guide 182 SECONDS Syntax: SECONDS() ==> %EpochSeconds Description: Returns the time value for the current
Chapter 5 Script Commands Scripting Guide 183 SET Syntax: SET Variable := Expression Description: Make the contents of a variable equal to the sp
Chapter 5 Script Commands Scripting Guide 184 SNMP_GET Syntax: SNMP_GET( $Alias, $MIBOID) ==> $Value Description: Retrieves the value of a spe
Chapter 5 Script Commands Scripting Guide 185 SNMP_GETNEXT Syntax: SNMP_GETNEXT( $Alias, $MIBOID, $NextMIBOID) ==> $Value Description: Retriev
Chapter 5 Script Commands Scripting Guide 186 SNMP_GETTABLE Syntax: SNMP_GETTABLE( $Alias, $MIBOID, $TableArray[, $Delimiter]) ==> %ReturnCode
Chapter 5 Script Commands Scripting Guide 187 Example: // gets the table at “interfaces” from the named host // alias $Alias := “Galileo” $MIBOI
Chapter 5 Script Commands Scripting Guide 188 SNMP_SET Syntax: SNMP_SET( $Alias, $MIBOID, $Value) ==> %ReturnCode Description: Sets the value
Chapter 5 Script Commands Scripting Guide 189 SNMP_TRAPSEND Syntax: SNMP_TRAPSEND( $Alias, %TrapNum[, %EntNum [, $MIBOID ] [, $VARBINDS]]) ==>
Chapter 1 Script Overview Scripting Guide 19 Using the EXEC Command A script may be executed from within another script with the EXEC command. Th
Chapter 5 Script Commands Scripting Guide 190 Example: ************************************** Example 1 ************************************** $A
Chapter 5 Script Commands Scripting Guide 191 SPLIT Syntax: SPLIT( $Array, $String, $Delimiter) Description: Populates an array with the fields o
Chapter 5 Script Commands Scripting Guide 192 START Syntax: START( ScriptName( Parms)[, %Class[, $Name]]) Description: Initiates execution of ano
Chapter 5 Script Commands Scripting Guide 193 STOP Syntax: STOP( ScriptName[, %Class [, $Name]]) Description: Halts execution of a script. Action
Chapter 5 Script Commands Scripting Guide 194 STR Syntax: STR( %Number) ==> $String Description: Converts a numeric expression to a string. Ac
Chapter 5 Script Commands Scripting Guide 195 SUBSTR Syntax: SUBSTR( $String, %Start[, %Count]) ==> $SubStr Description: Extract a substring f
Chapter 5 Script Commands Scripting Guide 196 SWITCH Syntax: SWITCH...CASE...[DEFAULT...]ENDSWITCH SWITCH Expression CASE SimpleExpr: [comm
Chapter 5 Script Commands Scripting Guide 197 Example: SWITCH $Msg[ 3] CASE “IOS000I”: //call the IOS000 script to handle IOS000( $Msg[
Chapter 5 Script Commands Scripting Guide 198 SYSEXEC Syntax: SYSEXEC( $String) ==> %Return Description: Executes a Unix command on the MCC ho
Chapter 5 Script Commands Scripting Guide 199 TEMP Syntax: TEMP( %Port) ==> %Temp Description: Reads the current temperature from a sensor uni
Technical Support Contacting the Visara Intellicenter For US domestic customers, Visara provides technical support through its Intellicenter, 8:30 - 5
Chapter 5 Script Commands Scripting Guide 200 TIME Syntax: TIME( [$TimeString]) ==> %MidnightSeconds Description: Converts a time string to a
Chapter 5 Script Commands Scripting Guide 201 TIMESTR Syntax: TIMESTR( %EpochSeconds, $Format) ==> $Formatted Description: Formats epoch secon
Chapter 5 Script Commands Scripting Guide 202 Date Related Codes for TIMESTR() Code Description Notes/Examples a Weekday short name Mon, Wed A
Chapter 5 Script Commands Scripting Guide 203 Time Related Codes Code Description Notes/Examples H Hour number for a 24-hour clock with a leadi
Chapter 5 Script Commands Scripting Guide 204 TRIMSTR Syntax: TRIMSTR( $String[, %Where]) ==> $Trimmed Description: Removes leading and traili
Chapter 5 Script Commands Scripting Guide 205 UPPER Syntax: UPPER( $String) ==> $UpperString Description: Converts lowercase characters to up
Chapter 5 Script Commands Scripting Guide 206 VAL Syntax: VAL( $String) ==> %Number Description: Converts a string expression to a number. Act
Chapter 5 Script Commands Scripting Guide 207 VERSION Syntax: VERSION() ==> $VersionStr Description: Returns a string giving the product and s
Chapter 5 Script Commands Scripting Guide 208 WAITFOR Syntax: WAITFOR( %Seconds) Description: Pauses script execution for the specified number of
Chapter 5 Script Commands Scripting Guide 209 WAITUNTIL Syntax: WAITUNTIL( %MidnightSeconds) Description: Pauses current script execution until t
Scripting Guide 21 Chapter 2 Advanced Topics This chapter contains: Script Writing Guidelines Descriptions of key MCC features, such as ports,
Chapter 5 Script Commands Scripting Guide 210 WHILE Syntax: WHILE...ENDWHILE WHILE Expression Commands ENDWHILE Description: Repeats a seque
Scripting Guide 211 Chapter 6 Obsolete Material This chapter: Lists discontinued intrinsic manifest constants and their replacements. Describes
Chapter 6 Obsolete Material Scripting Guide 212 Overview As the Master Console Center has evolved, some constants and commands have been supersede
Chapter 6 Obsolete Material Scripting Guide 213 Manifest Constants The following table lists discontinued intrinsic manifest constants and their r
Chapter 6 Obsolete Material Scripting Guide 214 Commands KEY Command (Date and Time Formats) The time and date KEY command formats have been depre
Chapter 6 Obsolete Material Scripting Guide 215 EVENTCLOSE Syntax: EVENTCLOSE( %QueueID ) ==> %Status Description: Close an event queue. Actio
Chapter 6 Obsolete Material Scripting Guide 216 EVENTOPEN Syntax: EVENTOPEN( %Source [, $OsNameArray] ) ==> %QueueID Description: Opens a conn
Chapter 6 Obsolete Material Scripting Guide 217 Notes: 1. Currently, the only Event Source supported is “PATROL_EVENTS”. 2. More than one queu
Chapter 6 Obsolete Material Scripting Guide 218 EVENTREAD Syntax: EVENTREAD(%QueueIdArray,$EventArray[,%Wait])==>%Status Description: Returns
Chapter 6 Obsolete Material Scripting Guide 219 Returns: Numeric value for %Status, as follows: Value Meaning 0 or event read Success -1
Chapter 2 Advanced Topics Scripting Guide 22 Script Writing Guidelines The following coding guidelines and style suggestions increase code readabi
Chapter 6 Obsolete Material Scripting Guide 220 // Close the previously opened queues. *done: %i := 1 WHILE( %i <= ALEN( %queueId ) ) %statu
Chapter 6 Obsolete Material Scripting Guide 221 MVSCOMMAND Syntax: MVSCOMMAND( %ObjID, $CmdArray, $Output Array, %ErrArray $ErrorTextArray[, %Por
Chapter 6 Obsolete Material Scripting Guide 222 generated output from each independently submitted command. Use the QREAD() command to process th
Chapter 6 Obsolete Material Scripting Guide 223 14.23.53 P390 STC00019 GWLU62MC08 D T BY WATCHSNA USERID P390 <======= **
Chapter 6 Obsolete Material Scripting Guide 224 Manifest Constant Value Associated String ICLErr_MvsRsp_0019 10019 Add operator rejected; admin
Chapter 6 Obsolete Material Scripting Guide 225 QUEUE Syntax: QUEUE( Operation[, Port]) Description: Starts (stops and resets) a queue of OS print
Chapter 6 Obsolete Material Scripting Guide 226 QUEUE command operation parameter options Operation Constant Description ON Creates a message qu
Chapter 6 Obsolete Material Scripting Guide 227 READMSG Syntax: READMSG( $Msg, Wait, *Timeout[, Port [, Filter]]) Description: Reads the next mes
Chapter 6 Obsolete Material Scripting Guide 228 Example: //======================================================= // Example 1 //===============
Chapter 6 Obsolete Material Scripting Guide 229 TSOEREXX Syntax: TSOEREXX( %ObjID, $CmdArray, %ErrorArray, $ErrorTextArray) ==> %ReturnValue D
Chapter 2 Advanced Topics Scripting Guide 23 To improve readability, put one blank line before and one after each control structure, such as IF
Chapter 6 Obsolete Material Scripting Guide 230 Example: // Sample TSOEREXX() call ARESET( $Cmds) ARESET( %Err) ARESET( $ErrMsg) %OsID := OBJID
Scripting Guide 231 Appendix A ASCII Character Values (including ISO-8859-1 ANSI “Latin 1” values) hex dec Char hex dec Char hex dec Char hex dec
Scripting Guide 232 (continued from previous page) 80 128 PAD A0 160 NS C0192À E0224à HOP High Octet Preset 81 129 HOP A1 161 ¡ C1193Á E1
Scripting Guide 233 Appendix B Command Syntax Appendix B contains two tables: The first table lists information by command types. The second ta
Appendix B Command Syntax Scripting Guide 234 Command Syntax—By Command Type Command Command Type Description Syntax ALARM Alerting Gene
Appendix B Command Syntax Scripting Guide 235 Command Command Type Description Syntax KEY Console Message Enters a character string to t
Appendix B Command Syntax Scripting Guide 236 EVENTCLOSE Event Closes a specified event queue. Events are no longer available from the
Appendix B Command Syntax Scripting Guide 237 FPOS File Returns an open file’s current record pointer position. FPOS(%FileNum)==>%Po
Appendix B Command Syntax Scripting Guide 238 GOSUB Flow Control Immediately transfers script execution to the specified label and waits
Appendix B Command Syntax Scripting Guide 239 WHILE (ENDWHILE) Flow Control Repeats a sequence of commands while an expression evaluates
Chapter 2 Advanced Topics Scripting Guide 24 MCC Concepts Ports Each MCC console interface has a unique number that is assigned when the system is
Appendix B Command Syntax Scripting Guide 240 OBJSET Object Manager Populates an associative numeric array with object IDs from the chi
Appendix B Command Syntax Scripting Guide 241 SCRIPTGETACTIVE Scripting Retrieves information on all active scripts into an associative
Appendix B Command Syntax Scripting Guide 242 WAITUNTIL Time Pauses current script execution until the specified time is reached. WAITU
Appendix B Command Syntax Scripting Guide 243 FINDSTR Variable Searches a string for a regular expression pattern. FINDSTR($String,$Subs
Appendix B Command Syntax Scripting Guide 244 LOWER Variable Converts uppercase characters to lowercase. LOWER($String)==>$Lowercase
Appendix B Command Syntax Scripting Guide 245 VERSION Variable Returns a string giving the product and script language version levels.
Appendix B Command Syntax Scripting Guide 246 Command Syntax—By Command Command Command Type Description Syntax AICONNAMES Variable Fill
Appendix B Command Syntax Scripting Guide 247 Command Command Type Description Syntax BASEDIRECTORY Variable Obtains the base directory
Appendix B Command Syntax Scripting Guide 248 Command Command Type Description Syntax ERRORNUM Misc. Returns the error number for the mo
Appendix B Command Syntax Scripting Guide 249 Command Command Type Description Syntax FREAD File Reads values from an open file into var
Chapter 2 Advanced Topics Scripting Guide 25 Object Name The object name is, obviously enough, the name of an object. In object-oriented terms, t
Appendix B Command Syntax Scripting Guide 250 Command Command Type Description Syntax ICONNAME Alerting Returns an icon’s name. ICONNAM
Appendix B Command Syntax Scripting Guide 251 MVSCOMMAND Event Enters commands to MVS using the GW-MVS agent (optional software). MVSCO
Appendix B Command Syntax Scripting Guide 252 QOPEN Console Message Opens a new queue of OS printer console messages. QOPEN([%ObjIDArray]
Appendix B Command Syntax Scripting Guide 253 SET Variable Make the contents of a variable equal to the specified expression. SETVariabl
Appendix B Command Syntax Scripting Guide 254 TEMP Physical Interface Control Reads the current temperature from a sensor unit. TEMP(%Po
Scripting Guide 255 IndexAICONNAMES Syntax— AICONNAMES( $AssocArray, %Class, $ParentIcon)...71 ALAR
Index Scripting Guide 256 numeric...43 string...
Index Scripting Guide 257 Object Manager ...26 icon class ...
Index Scripting Guide 258 Syntax—SCRNTEXT( %Port, %Start, %Length) ==> $Text...183 SECONDS S
Index Scripting Guide 259 ICONSTATUS( [%Class [, $Name]]) ==> %Status...136
Chapter 2 Advanced Topics Scripting Guide 26 Object ID The Object ID is an integer value generated by the GCL scripting language to refer to an ob
Index Scripting Guide 260 Syntax—WHILE...ENDWHILE ...212
707131-001
Chapter 2 Advanced Topics Scripting Guide 27 Object Action The status of objects can change with time. You can use object actions to wait for tho
Chapter 2 Advanced Topics Scripting Guide 28 Object Action Type Description Parameters Return Value takes two seconds to perform some processing,
Chapter 2 Advanced Topics Scripting Guide 29 Icon Class/Icon Name A script executes on an object in a class. Objects are represented by an icon d
Scripting Guide 3 Contents Technical Support ... 2 Contacting the
Chapter 2 Advanced Topics Scripting Guide 30 The default class and name for a script are determined when the script begins executing: A script
Chapter 2 Advanced Topics Scripting Guide 31 SNMP A full discussion of SNMP (Simple Network Management Protocol) is beyond the scope of this guide
Scripting Guide 33 Chapter 3 Script Syntax This chapter contains: General Scripting Syntax Basic Overviews of: − Variables − Date/Time − Exp
Chapter 3 Script Syntax Scripting Guide 34 General Script Syntax Information General Syntax of a Script The general structure of a script file is
Chapter 3 Script Syntax Scripting Guide 35 A script file name comprises up to eight characters followed by a period “.” and a fixed three chara
Chapter 3 Script Syntax Scripting Guide 36 Variables Using and Naming Variables Variables may be character strings, numerics, or arrays; array
Chapter 3 Script Syntax Scripting Guide 37 Numeric Variables Numeric variable names are prefixed with a percent sign “%”. The maximum value
Chapter 3 Script Syntax Scripting Guide 38 Arrays Using and Naming Arrays There are two types of arrays, integer arrays and string arrays. Int
Chapter 3 Script Syntax Scripting Guide 39 Normal Arrays Normal arrays are indexed by any expression that evaluates to a positive integer value. T
Contents Scripting Guide 4 Chapter 3 Script Syntax... 33 General S
Chapter 3 Script Syntax Scripting Guide 40 Date/Time The date and time type functions allow great flexibility in manipulating and formatting of ti
Chapter 3 Script Syntax Scripting Guide 41 Expressions There are two types of expressions, String and Numeric. String Expressions String expressio
Chapter 3 Script Syntax Scripting Guide 42 Manifest Constants Intrinsic manifest constants have been defined to make scripts easier to read, write
Chapter 3 Script Syntax Scripting Guide 43 List of Intrinsic Manifest Constants Manifest Error Constants Manifest Error Constants Value Associat
Chapter 3 Script Syntax Scripting Guide 44 Manifest Error Constants Value Associated String not run. Err_Mvs1 4012 General MVS error. Err_Mvs_
Chapter 3 Script Syntax Scripting Guide 45 Manifest Error Constants Value Associated String Err_Key_CantReadStatus 5109 Err_Key_ConsoleNotLock
Chapter 3 Script Syntax Scripting Guide 46 Manifest Error Constants Value Associated String ICLErr_MvsRsp_0022 10022 Cannot delete last admini
Chapter 3 Script Syntax Scripting Guide 47 Other Manifest Constants Other Manifest Constants Value Assoc. String On 1 True 1 Asc 1 Left 1
Chapter 3 Script Syntax Scripting Guide 48 Other Manifest Constants Value Assoc. String SkipEnd 2 SkipNext 1 Status_Error 1 Status_Warnin
Chapter 3 Script Syntax Scripting Guide 49 Other Manifest Constants Value Assoc. String Hmc_SnaAddr HMC_SnaAddr Hmc_MachModel HMC_MachModel
Contents Scripting Guide 5 AICONNAMES... 69 ALARM...
Chapter 3 Script Syntax Scripting Guide 50 Operators Mathematical The following mathematical operators may be used in numeric expressions: Charac
Chapter 3 Script Syntax Scripting Guide 51 The following Boolean syntax may be used: Syntax Means == Equals < Less than > Greater than <=
Chapter 3 Script Syntax Scripting Guide 52 Label Statements Label statements are used as a reference point within a script to which processing can
Scripting Guide 53 Chapter 4 Regular Expressions This chapter discusses regular expressions including: Bracket expressions Special characters
Chapter 4 Regular Expressions Scripting Guide 54 Regular Expressions Regular expressions (REs) or patterns are textual statements including specia
Chapter 4 Regular Expressions Scripting Guide 55 [^.] Match anything EXCEPT a dot. [^A-Z] Match anything EXCEPT an upper case letter. Subexpres
Chapter 4 Regular Expressions Scripting Guide 56 Rules for Building Regular Expressions When using the rules to build regular expressions (REs), f
Chapter 4 Regular Expressions Scripting Guide 57 An RE ordinary character or an RE special character preceded by a backslash or a period matches a
Chapter 4 Regular Expressions Scripting Guide 58 Inside bracket expressions, the following are true: The special characters ‘.’ , ‘*’, ‘[‘, an
Chapter 4 Regular Expressions Scripting Guide 59 The rules in Table 9. Bracket Expression Rules. apply to: Creating and using matching and non
Contents Scripting Guide 6 HEXSTR... 126 HMCEXE
Chapter 4 Regular Expressions Scripting Guide 60 Bracket Expression Rule Description Equivalence Class Expression Specifies a set of collating el
Chapter 4 Regular Expressions Scripting Guide 61 Matching Multiple Characters in Bracket Expressions The following rules are used to build multipl
Chapter 4 Regular Expressions Scripting Guide 62 Alternation If ’x’ and ‘y’ are REs, then ‘x|y’ is an RE matching any string that is matched by ei
Chapter 4 Regular Expressions Scripting Guide 63 Precedence of Special Characters The order of precedence, from high to low, is shown below: Order
Chapter 4 Regular Expressions Scripting Guide 64 Special Characters in Regular Expressions Table 12. Regular Expressions, Special Characters desc
Chapter 4 Regular Expressions Scripting Guide 65 Character Description the quantity. | OR. "A|B" matches either "A" or "
Scripting Guide 67 Chapter 5 Script Commands This chapter: Discusses the types of script commands Gives information about script syntax Lis
Chapter 5 Script Commands Scripting Guide 68 Conventions in this Chapter When writing scripts, text placed in brackets “[]” is an optional paramet
Chapter 5 Script Commands Scripting Guide 69 AICONNAMES Syntax: AICONNAMES( $AssocArray, %Class, $ParentIcon) Description: Fill an array with all
Contents Scripting Guide 7 SNMP_GETTABLE... 186 SNMP_SET...
Chapter 5 Script Commands Scripting Guide 70 ALARM Syntax: ALARM( %Operation) Description: Generates a repetitive alarm tone (beep) at the MCC te
Chapter 5 Script Commands Scripting Guide 71 ALERTCREATE Syntax: ALERTCREATE( %Status, %State, $Source, $MsgText, $UserNote) ==> %AlertID Desc
Chapter 5 Script Commands Scripting Guide 72 ALERTDEL Syntax: ALERTDEL( %AlertID) ==> %ErrCode Description: Deletes an existing Alert. Action:
Chapter 5 Script Commands Scripting Guide 73 ALERTGETACTIVE Syntax: ALERTGETACTIVE($AssocArray) ==>%ErrCode Description: Retrieves information
Chapter 5 Script Commands Scripting Guide 74 $AlertInfo[14] 'Quilt' source computer/OS $AlertInfo[15] message $AlertInfo[16] &a
Chapter 5 Script Commands Scripting Guide 75 See Also: ALERTMOD, ALERTCREATE, ALERTDEL
Chapter 5 Script Commands Scripting Guide 76 ALERTMOD Syntax: ALERTMOD( %AlertID, %AlertField, NewValue) ==> %ErrCode Description: Modifies th
Chapter 5 Script Commands Scripting Guide 77 ARESET Syntax: ARESET( Array) Description: Reset the contents of an array to “empty”. Action: All el
Chapter 5 Script Commands Scripting Guide 78 ASCII Syntax: ASCII( $String) ==> %Value Description: Given a string $String, returns the integer
Chapter 5 Script Commands Scripting Guide 79 ASCRN Syntax: ASCRN( $Array, %Port) Description: Fill an array with the full text of a console scree
Contents Scripting Guide 8 List of Tables Table 1. List of MCC Reserved Scripts executed in response to status changes...
Chapter 5 Script Commands Scripting Guide 80 ASORT Syntax: ASORT( NormArray, %Direction) Description: Sort a normal array. Action: The data eleme
Chapter 5 Script Commands Scripting Guide 81 ASSOCKEYS Syntax: ASSOCKEYS( AssocArray, $NormArray) ==> %RetVal Description: Populate a normal s
Chapter 5 Script Commands Scripting Guide 82 ATSTR Syntax: ATSTR( $String, $Substring) ==> %StartPos Description: Returns the starting positio
Chapter 5 Script Commands Scripting Guide 83 BASEDIRECTORY Syntax: BASEDIRECTORY() ==> $DirectoryString Description: Obtains the base directory
Chapter 5 Script Commands Scripting Guide 84 BLOCKSCAN Syntax: BLOCKSCAN( %Wait, *Timeout [, $Array]) ...ENDBLOCK Description: Enables up to 256
Chapter 5 Script Commands Scripting Guide 85 See Also: SCANB, SCANP
Chapter 5 Script Commands Scripting Guide 86 CHR Syntax: CHR( %Number) ==> $String Description: Given an integer in the range 0 to 255, return
Chapter 5 Script Commands Scripting Guide 87 CLASSNAME Syntax: CLASSNAME( [%Class]) ==> $ClassName Description: Returns the class name for a c
Chapter 5 Script Commands Scripting Guide 88 CLASSNUM Syntax: CLASSNUM( [$ClassName]) ==> %Class Description: Returns the class number for a c
Chapter 5 Script Commands Scripting Guide 89 CPUPOWER Syntax: CPUPOWER( %Port, %Operation) Description: Switches a CPU’s power ON or OFF. Action:
Scripting Guide 9 About This Guide Purpose of This Guide This guide illustrates the Master Console Center Global Control Language (MCC GCL). It assu
Chapter 5 Script Commands Scripting Guide 90 DATE Syntax: DATE( [$DateString]) ==> %EpochSeconds Description: Converts a date string to a date
Chapter 5 Script Commands Scripting Guide 91 DEC Syntax: DEC %Variable Description: Subtracts one from a numeric variable’s value. Action: The va
Chapter 5 Script Commands Scripting Guide 92 DECODE Syntax: DECODE ($String[, $Key]) ==> $Result Description: Decodes a GCL string, for exampl
Chapter 5 Script Commands Scripting Guide 93 DIUNIT Syntax: DIUNIT( %Port) ==> %Status Description: Check the status of a device connected to
Chapter 5 Script Commands Scripting Guide 94 DOUNIT Syntax: DOUNIT( %Port[, %Operation]) ==> %DOSwitch Description: Controls the device connec
Chapter 5 Script Commands Scripting Guide 95 ENCODE Syntax: ENCODE ($String[,$Key]) ==> $Result Description: Encodes a GCL string, for example
Chapter 5 Script Commands Scripting Guide 96 END Syntax: END Description: Ends the execution of the script thread. Action: The execution of the c
Chapter 5 Script Commands Scripting Guide 97 ERRORMSG Syntax: ERRORMSG( %ErrNum)==> $ErrMsg Description: Returns the error message associated
Chapter 5 Script Commands Scripting Guide 98 ERRORNUM Syntax: ERRORNUM() ==> %ErrNum Description: Returns the error number for the most recent
Chapter 5 Script Commands Scripting Guide 99 Manifest Constant Value Associated String/Reason Support. Err_Mvs_NoComm 4001 Unable to communicate
Comentarios a estos manuales