Visara Master Console Center Scripting Guide Uživatelský manuál

Procházejte online nebo si stáhněte Uživatelský manuál pro Počítačové příslušenství Visara Master Console Center Scripting Guide. Visara Master Console Center Scripting Guide User Manual Uživatelská příručka

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 262
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků

Shrnutí obsahu

Strany 1 - Scripting Guide

VisaraMaster Console CenterScripting GuideP/N 707131-001

Strany 2 - Notices

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

Strany 3 - Contents

Chapter 5 Script Commands Scripting Guide 100 Manifest Constant Value Associated String/Reason ICLErr_Mvs_InvMsgCnt 4020 Invalid message count

Strany 4 - Scripting Guide 4

Chapter 5 Script Commands Scripting Guide 101 EXEC Syntax: EXEC( $ScriptName[, Parm1, ...]) ==> ReturnValue Description: Executes a script who

Strany 5 - Scripting Guide 5

Chapter 5 Script Commands Scripting Guide 102 $ScriptName := “script1” ELSE $ScriptName := “script2” ENDIF %ReturnValue := EXEC( $ScriptName,

Strany 6 - Scripting Guide 6

Chapter 5 Script Commands Scripting Guide 103 FCLOSE Syntax: FCLOSE( %FileNum) Description: Closes an open file. Action: Closes a file opened wit

Strany 7 - Scripting Guide 7

Chapter 5 Script Commands Scripting Guide 104 FDELETE Syntax: FDELETE( $FileName) ==> %Success Description: Permanently deletes a file. Action

Strany 8

Chapter 5 Script Commands Scripting Guide 105 FEXISTS Syntax: FEXISTS( $FileName) ==> %Success Description: Determines if a file exists. Actio

Strany 9 - About This Guide

Chapter 5 Script Commands Scripting Guide 106 FILENO Syntax FILENO(%FileHandle) ==> %FileDescriptor Description: Obtains the system integer fil

Strany 10 - The MCC Documentation Set

Chapter 5 Script Commands Scripting Guide 107 FINDSTR Syntax: FINDSTR( $String, $Substring) ==> $FoundText Description: Searches a string for

Strany 11 - Chapter 1 Script Overview

Chapter 5 Script Commands Scripting Guide 108 FMODTIME Syntax: FMODTIME( File) ==> %EpochSeconds Description: Returns the time value of a last

Strany 12 - Script Concepts

Chapter 5 Script Commands Scripting Guide 109 FOPEN Syntax: FOPEN( $FileName[, %Mode]) ==> %FileHandle Description: Opens a file for I/O acces

Strany 13 - Script Source Structure

Scripting Guide 11 Chapter 1 Script Overview This chapter describes:  Script concepts  Script structures  Master scripts  Reserved scripts 

Strany 14 - Master Scripts

Chapter 5 Script Commands Scripting Guide 110 Example: %Handle := FOPEN( “SYS5”, OVERWRITE) $FileName := “SYS5” %Mode := APPEND %Handle := FOPEN(

Strany 15 - Reserved Scripts

Chapter 5 Script Commands Scripting Guide 111 FORMATSTR Syntax: FORMATSTR( $String [, expr1, [expr2, ..., [exprn]..]]) ==> $Formatted Descript

Strany 16 - #logswap.scr

Chapter 5 Script Commands Scripting Guide 112 $Return := FORMATSTR( "The value is: %10d.", %Value2 ) LOG( LOG_EXEC, $Return, 12 ) OU

Strany 17 - #shutdn.scr

Chapter 5 Script Commands Scripting Guide 113 Conversion Specifications Syntax Each conversion specification in the String parameter has the follo

Strany 18 - Executing Scripts

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

Strany 19 - Scripting Guide 19

Chapter 5 Script Commands Scripting Guide 115 x, X Accepts an integer value and converts it to unsigned hexadecimal notation. The letters abcdef

Strany 20

Chapter 5 Script Commands Scripting Guide 116 FPOS Syntax: FPOS( %FileNum) ==> %Position Description: Returns an open file’s current record po

Strany 21 - Chapter 2 Advanced Topics

Chapter 5 Script Commands Scripting Guide 117 FREAD Syntax: FREAD( %FileNum, var1[, var2, ..., [varn]...]) ==> %QtyRead Description: Reads val

Strany 22 - Script Writing Guidelines

Chapter 5 Script Commands Scripting Guide 118 FRENAME Syntax: FRENAME( $CurrentName, $NewName) ==> %Success Description: Renames a file. Actio

Strany 23 - Scripting Guide 23

Chapter 5 Script Commands Scripting Guide 119 FREWIND Syntax: FREWIND( %FileNum) Description: Moves an open file’s current record pointer to the

Strany 24 - MCC Concepts

Chapter 1 Script Overview Scripting Guide 12 Overview The Master Console Center Global Control Language (MCC GCL) is a powerful high-level program

Strany 25 - Object Key

Chapter 5 Script Commands Scripting Guide 120 FSEEK Syntax: FSEEK( %FileNum, %Position) ==> %Success Description: Moves an open file’s current

Strany 26 - Object Field

Chapter 5 Script Commands Scripting Guide 121 FWRITE Syntax: FWRITE( %FileNum, expr [, %NEWLINE] ) ==> %Success Description: Writes the expres

Strany 27 - Object Action

Chapter 5 Script Commands Scripting Guide 122 GETENV Syntax: GETENV($Variable) ==> $Value Description: Obtains the current value of the given e

Strany 28

Chapter 5 Script Commands Scripting Guide 123 GETPID Syntax: GETPID() ==> %ProcessId Description: Obtains the system process identifier for thi

Strany 29 - Icon Class/Icon Name

Chapter 5 Script Commands Scripting Guide 124 GOSUB Syntax: GOSUB *Label Description: Immediately transfers script execution to the specified lab

Strany 30 - Scripting Guide 30

Chapter 5 Script Commands Scripting Guide 125 GOTO Syntax: GOTO *Label Description: Immediately transfers script execution to the specified label

Strany 31 - MIB OID

Chapter 5 Script Commands Scripting Guide 126 HEXSTR Syntax: HEXSTR( %Number) ==> $Hex Description: Converts an integer to a hex string. Actio

Strany 32

Chapter 5 Script Commands Scripting Guide 127 HMCEXEC Syntax: HMCEXEC(%ObjID, $Action [, parm1, ...]) => %RetVal Description: Send a command t

Strany 33 - Chapter 3 Script Syntax

Chapter 5 Script Commands Scripting Guide 128 Possible HMC actions and parameters CPC and Image Commands Action Description Optional Parameter(s

Strany 34 - Structuring a Script

Chapter 5 Script Commands Scripting Guide 129 HUMID Syntax: HUMID( %Port) ==> %Humidity Description: Reads the current humidity from a sensor

Strany 35 - − “scr” for script source

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

Strany 36 - Variables

Chapter 5 Script Commands Scripting Guide 130 ICON Syntax: ICON( %Status[, $Message [, %Class [, $Name]]]) Description: Changes icon characterist

Strany 37 - Numeric Variables

Chapter 5 Script Commands Scripting Guide 131 Notes: 1. Refer to Manifest Constants on page 42 for the constants reference list. 2. The defaul

Strany 38 - Using and Naming Arrays

Chapter 5 Script Commands Scripting Guide 132 ICONMSG Syntax: ICONMSG( [%Class [, $Name]]) ==> $Message Description: Returns an icon’s current

Strany 39 - Associative Arrays

Chapter 5 Script Commands Scripting Guide 133 ICONNAME Syntax: ICONNAME( [%Class [, %Port]]) ==> $Name Description: Returns an icon’s name. Ac

Strany 40 - Date/Time

Chapter 5 Script Commands Scripting Guide 134 ICONSTATUS Syntax: ICONSTATUS( [%Class [, $Name]]) ==> %Status Description: Returns an icon’s cu

Strany 41 - Expressions

Chapter 5 Script Commands Scripting Guide 135 IF Syntax: IF...[ELSE...]ENDIF IF Expression Group 1 command [More group 1 commands] [ELSE]

Strany 42

Chapter 5 Script Commands Scripting Guide 136 INC Syntax: INC %Variable Description: Adds one to a numeric variable’s value. Action: The value in

Strany 43 - Manifest Error Constants

Chapter 5 Script Commands Scripting Guide 137 JOIN Syntax: JOIN( $Array, $Delimiter) ==> $String Description: Combines the elements of an arra

Strany 44

Chapter 5 Script Commands Scripting Guide 138 KEY Syntax: KEY( %Port, $Keys [,%Timeout]) ==> %RetCode Description: Enters a character string t

Strany 45

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

Strany 46

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

Strany 47 - Other Manifest Constants

Chapter 5 Script Commands Scripting Guide 140 KEY Command Return Values Manifest Constant Value Description Err_None 0 No error Err_Key_Timelock

Strany 48

Chapter 5 Script Commands Scripting Guide 141 KEY Command Specifics Note: The KEY command is not case sensitive. Characters within brackets ([ o

Strany 49

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

Strany 50 - Operators

Chapter 5 Script Commands Scripting Guide 143 LEFTSTR Syntax: LEFTSTR( $String, %Count) ==> $SubStr Description: Returns the leftmost specifie

Strany 51 - Comment Statements

Chapter 5 Script Commands Scripting Guide 144 LEN Syntax: LEN( $StringExpr) ==> %Count Description: Returns the number of characters in a stri

Strany 52 - Label Statements

Chapter 5 Script Commands Scripting Guide 145 LOG Syntax: LOG( %LogType, $Message[, %Status]) Description: Enters a message in a log. Action: The

Strany 53 - Scripting Guide 53

Chapter 5 Script Commands Scripting Guide 146 LOWER Syntax: LOWER( $String) ==> $Lowercase Description: Converts uppercase characters to lower

Strany 54 - Regular Expressions

Chapter 5 Script Commands Scripting Guide 147 MKDTEMP Syntax: MKDTEMP($Pattern) ==> $DirectoryName Description: Creates a unique temporary dire

Strany 55 - Subexpressions

Chapter 5 Script Commands Scripting Guide 148 MKSTEMP Syntax: MKSTEMP($Pattern) ==> %FileHandle Description: Opens a unique temporary file for

Strany 56 - Scripting Guide 56

Chapter 5 Script Commands Scripting Guide 149 MKTEMP Syntax: MKTEMP($Pattern) ==> $FileName Description: Returns a unique file name. Action: Cr

Strany 57 - Bracket Expressions

Chapter 1 Script Overview Scripting Guide 15 Reserved Scripts Every MCC system includes a set of reserved scripts. Reserved scripts automatically

Strany 58

Chapter 5 Script Commands Scripting Guide 150 MONIKER Syntax: MONIKER() ==> $Name Description: Obtains the product name. Action: Returns the pr

Strany 59

Chapter 5 Script Commands Scripting Guide 151 OBJEXEC Syntax: OBJEXEC( %ObjID, $Action[, Parms...]) ==> %ReturnValue Description: Executes an

Strany 60 - Description

Chapter 5 Script Commands Scripting Guide 152 OBJGET Syntax: OBJGET( %ObjID, $ObjFieldName) ==> $CurrentValue Description: Returns the current

Strany 61 - Scripting Guide 61

Chapter 5 Script Commands Scripting Guide 153 OBJGETARRAY Syntax: OBJGETARRAY( %ObjID, $AssocArray) ==> %ErrCode Description: Populates an ass

Strany 62 - Alternation

Chapter 5 Script Commands Scripting Guide 154 OBJID Syntax: OBJID( %Class, $ObjKeyExpr) ==> %ObjectID Description: Returns the ID (unique only

Strany 63 - Order Type Symbols

Chapter 5 Script Commands Scripting Guide 155 //This example builds an array of ObjIDs, for use // with the QOPEN command. $Lpar1 := “9672-1:BETA

Strany 64 - Character Description

Chapter 5 Script Commands Scripting Guide 156 OBJIDARRAY Syntax: OBJIDARRAY( %Class, %ObjIDParent, %AssocArray) ==> %Children Description: Pop

Strany 65 - Collating Elements

Chapter 5 Script Commands Scripting Guide 157 LOG(LOG_EXEC, $aKidIDs[%Count] + “Object ID is: “ + / %aaKidIDs[$aKidIDs[%Count]], 1) INC %Count

Strany 66

Chapter 5 Script Commands Scripting Guide 158 OBJSET Syntax: OBJSET( %ObjID, $ObjFieldName, $NewValue) ==> %ErrCode Description: Sets the curr

Strany 67 - Chapter 5 Script Commands

Chapter 5 Script Commands Scripting Guide 159 OBJSETARRAY Syntax: OBJSETARRAY( %ObjID, $AssocArray) ==> %Success Description: Sets the field va

Strany 68 - Script Command Types

Chapter 1 Script Overview Scripting Guide 16 Status Change Reserved Script Name Executed in Response MCC is started (this event is not a login)

Strany 69 - AICONNAMES

Chapter 5 Script Commands Scripting Guide 160 RETURN OUTPUT: Current Status is: UNKNOWN Desired Status is: UNKNOWN Group Status is: NONE Current

Strany 70

Chapter 5 Script Commands Scripting Guide 161 PARMS Syntax: PARMS var1[, var2 [, var3, ..., [varn]...]]] Description: Receives parameters into th

Strany 71 - ALERTCREATE

Chapter 5 Script Commands Scripting Guide 162 PORT Syntax: PORT( %Class[, $IconName]) ==> %Port Description: Returns the port number for a con

Strany 72 - ALERTDEL

Chapter 5 Script Commands Scripting Guide 163 QCLOSE Syntax: QCLOSE( %QueueID) Description: Closes a message queue. Action: Closes the specified

Strany 73 - ALERTGETACTIVE

Chapter 5 Script Commands Scripting Guide 164 QOPEN Syntax: QOPEN( [%ObjIdArray]) ==> %QueueID Description: Opens a new queue of OS printer co

Strany 74

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

Strany 75

Chapter 5 Script Commands Scripting Guide 166 QPREVIEW Syntax: QPREVIEW( %QueueID, $ResultArray) ==> %RetCode Description: For non-mainframe p

Strany 76 - ALERTMOD

Chapter 5 Script Commands Scripting Guide 167 console, you may wish to key “exit” before issuing your QPREVIEW().) Example: // Get the Object IDs

Strany 77

Chapter 5 Script Commands Scripting Guide 168 QREAD Syntax: QREAD( %QueueID, $MsgArray, %Wait[, $Filter]) ==> $MsgLine Description: Reads the

Strany 78

Chapter 5 Script Commands Scripting Guide 169 the printer message queue. It is placed in the printer message queue after the user presses <ENT

Strany 79

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

Strany 80

Chapter 5 Script Commands Scripting Guide 170 QSKIP Syntax: QSKIP( %QueueID, %Skip) Description: Moves a current message pointer for a queue. Act

Strany 81 - ASSOCKEYS

Chapter 5 Script Commands Scripting Guide 171 REPEAT Syntax: REPEAT...UNTIL REPEAT Commands UNTIL Expression Description: Repeats a sequence

Strany 82

Chapter 5 Script Commands Scripting Guide 172 REPSTR Syntax: REPSTR( $String, %Count) ==> $RepeatedString Description: Returns a string repeat

Strany 83 - BASEDIRECTORY

Chapter 5 Script Commands Scripting Guide 173 RETURN Syntax: RETURN [Expression] Description: Returns execution to the calling routine, passing a

Strany 84 - BLOCKSCAN

Chapter 5 Script Commands Scripting Guide 174 RIGHTSTR Syntax: RIGHTSTR( $String, %Count) ==> $SubStr Description: Returns the right-most spec

Strany 85

Chapter 5 Script Commands Scripting Guide 175 SCANB Syntax: SCANB( %Port, $Text, *Found) Description: Searches an OS console for a specified char

Strany 86

Chapter 5 Script Commands Scripting Guide 176 SCANP Syntax: SCANP( %Port, $Text, %Wait, *Found[, $Array]) Description: Searches an OS console for

Strany 87 - CLASSNAME

Chapter 5 Script Commands Scripting Guide 177 SCRIPTCANCEL Syntax: SCRIPTCANCEL($ScriptName,$Class,$Name) Description: Obtains the system integer

Strany 88 - CLASSNUM

Chapter 5 Script Commands Scripting Guide 178 SCRIPTGETACTIVE Syntax: SCRIPTGETACTIVE($AssocArray) ==> %ErrCode Description: Retrieves informat

Strany 89 - CPUPOWER

Chapter 5 Script Commands Scripting Guide 179 current WAIT command $ScriptInfo[6] 0 Number of seconds which remain for the current WAIT comman

Strany 90

Chapter 1 Script Overview Scripting Guide 18 Executing Scripts There are four ways to execute a script:  Manually. A user selects a script for

Strany 91

Chapter 5 Script Commands Scripting Guide 180 Examples: Simple Script to log all of the script information to the filtered message log: %rc := SC

Strany 92

Chapter 5 Script Commands Scripting Guide 181 SCRNTEXT Syntax: SCRNTEXT( %Port, %Start, %Length) ==> $Text Description: A full or partial scr

Strany 93

Chapter 5 Script Commands Scripting Guide 182 SECONDS Syntax: SECONDS() ==> %EpochSeconds Description: Returns the time value for the current

Strany 94

Chapter 5 Script Commands Scripting Guide 183 SET Syntax: SET Variable := Expression Description: Make the contents of a variable equal to the sp

Strany 95

Chapter 5 Script Commands Scripting Guide 184 SNMP_GET Syntax: SNMP_GET( $Alias, $MIBOID) ==> $Value Description: Retrieves the value of a spe

Strany 96

Chapter 5 Script Commands Scripting Guide 185 SNMP_GETNEXT Syntax: SNMP_GETNEXT( $Alias, $MIBOID, $NextMIBOID) ==> $Value Description: Retriev

Strany 97 - ERRORMSG

Chapter 5 Script Commands Scripting Guide 186 SNMP_GETTABLE Syntax: SNMP_GETTABLE( $Alias, $MIBOID, $TableArray[, $Delimiter]) ==> %ReturnCode

Strany 98 - ERRORNUM

Chapter 5 Script Commands Scripting Guide 187 Example: // gets the table at “interfaces” from the named host // alias $Alias := “Galileo” $MIBOI

Strany 99

Chapter 5 Script Commands Scripting Guide 188 SNMP_SET Syntax: SNMP_SET( $Alias, $MIBOID, $Value) ==> %ReturnCode Description: Sets the value

Strany 100

Chapter 5 Script Commands Scripting Guide 189 SNMP_TRAPSEND Syntax: SNMP_TRAPSEND( $Alias, %TrapNum[, %EntNum [, $MIBOID ] [, $VARBINDS]]) ==>

Strany 101

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

Strany 102 - See Also:

Chapter 5 Script Commands Scripting Guide 190 Example: ************************************** Example 1 ************************************** $A

Strany 103

Chapter 5 Script Commands Scripting Guide 191 SPLIT Syntax: SPLIT( $Array, $String, $Delimiter) Description: Populates an array with the fields o

Strany 104 - FDELETE

Chapter 5 Script Commands Scripting Guide 192 START Syntax: START( ScriptName( Parms)[, %Class[, $Name]]) Description: Initiates execution of ano

Strany 105 - FEXISTS

Chapter 5 Script Commands Scripting Guide 193 STOP Syntax: STOP( ScriptName[, %Class [, $Name]]) Description: Halts execution of a script. Action

Strany 106

Chapter 5 Script Commands Scripting Guide 194 STR Syntax: STR( %Number) ==> $String Description: Converts a numeric expression to a string. Ac

Strany 107 - FINDSTR

Chapter 5 Script Commands Scripting Guide 195 SUBSTR Syntax: SUBSTR( $String, %Start[, %Count]) ==> $SubStr Description: Extract a substring f

Strany 108 - FMODTIME

Chapter 5 Script Commands Scripting Guide 196 SWITCH Syntax: SWITCH...CASE...[DEFAULT...]ENDSWITCH SWITCH Expression CASE SimpleExpr: [comm

Strany 109

Chapter 5 Script Commands Scripting Guide 197 Example: SWITCH $Msg[ 3] CASE “IOS000I”: //call the IOS000 script to handle IOS000( $Msg[

Strany 110

Chapter 5 Script Commands Scripting Guide 198 SYSEXEC Syntax: SYSEXEC( $String) ==> %Return Description: Executes a Unix command on the MCC ho

Strany 111 - FORMATSTR

Chapter 5 Script Commands Scripting Guide 199 TEMP Syntax: TEMP( %Port) ==> %Temp Description: Reads the current temperature from a sensor uni

Strany 112

Technical Support Contacting the Visara Intellicenter For US domestic customers, Visara provides technical support through its Intellicenter, 8:30 - 5

Strany 114 - Scripting Guide 114

Chapter 5 Script Commands Scripting Guide 200 TIME Syntax: TIME( [$TimeString]) ==> %MidnightSeconds Description: Converts a time string to a

Strany 115 - Scripting Guide 115

Chapter 5 Script Commands Scripting Guide 201 TIMESTR Syntax: TIMESTR( %EpochSeconds, $Format) ==> $Formatted Description: Formats epoch secon

Strany 116

Chapter 5 Script Commands Scripting Guide 202 Date Related Codes for TIMESTR() Code Description Notes/Examples a Weekday short name Mon, Wed A

Strany 117

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

Strany 118 - FRENAME

Chapter 5 Script Commands Scripting Guide 204 TRIMSTR Syntax: TRIMSTR( $String[, %Where]) ==> $Trimmed Description: Removes leading and traili

Strany 119 - FREWIND

Chapter 5 Script Commands Scripting Guide 205 UPPER Syntax: UPPER( $String) ==> $UpperString Description: Converts lowercase characters to up

Strany 120 - Action:

Chapter 5 Script Commands Scripting Guide 206 VAL Syntax: VAL( $String) ==> %Number Description: Converts a string expression to a number. Act

Strany 121

Chapter 5 Script Commands Scripting Guide 207 VERSION Syntax: VERSION() ==> $VersionStr Description: Returns a string giving the product and s

Strany 122

Chapter 5 Script Commands Scripting Guide 208 WAITFOR Syntax: WAITFOR( %Seconds) Description: Pauses script execution for the specified number of

Strany 123

Chapter 5 Script Commands Scripting Guide 209 WAITUNTIL Syntax: WAITUNTIL( %MidnightSeconds) Description: Pauses current script execution until t

Strany 124

Scripting Guide 21 Chapter 2 Advanced Topics This chapter contains:  Script Writing Guidelines  Descriptions of key MCC features, such as ports,

Strany 125

Chapter 5 Script Commands Scripting Guide 210 WHILE Syntax: WHILE...ENDWHILE WHILE Expression Commands ENDWHILE Description: Repeats a seque

Strany 126

Scripting Guide 211 Chapter 6 Obsolete Material This chapter:  Lists discontinued intrinsic manifest constants and their replacements.  Describes

Strany 127 - HMCEXEC

Chapter 6 Obsolete Material Scripting Guide 212 Overview As the Master Console Center has evolved, some constants and commands have been supersede

Strany 128 - Image-only Commands

Chapter 6 Obsolete Material Scripting Guide 213 Manifest Constants The following table lists discontinued intrinsic manifest constants and their r

Strany 129

Chapter 6 Obsolete Material Scripting Guide 214 Commands KEY Command (Date and Time Formats) The time and date KEY command formats have been depre

Strany 130

Chapter 6 Obsolete Material Scripting Guide 215 EVENTCLOSE Syntax: EVENTCLOSE( %QueueID ) ==> %Status Description: Close an event queue. Actio

Strany 131 - Notes:

Chapter 6 Obsolete Material Scripting Guide 216 EVENTOPEN Syntax: EVENTOPEN( %Source [, $OsNameArray] ) ==> %QueueID Description: Opens a conn

Strany 132 - ICONMSG

Chapter 6 Obsolete Material Scripting Guide 217 Notes: 1. Currently, the only Event Source supported is “PATROL_EVENTS”. 2. More than one queu

Strany 133 - ICONNAME

Chapter 6 Obsolete Material Scripting Guide 218 EVENTREAD Syntax: EVENTREAD(%QueueIdArray,$EventArray[,%Wait])==>%Status Description: Returns

Strany 134 - ICONSTATUS

Chapter 6 Obsolete Material Scripting Guide 219 Returns: Numeric value for %Status, as follows: Value Meaning 0 or event read Success -1

Strany 135

Chapter 2 Advanced Topics Scripting Guide 22 Script Writing Guidelines The following coding guidelines and style suggestions increase code readabi

Strany 136

Chapter 6 Obsolete Material Scripting Guide 220 // Close the previously opened queues. *done: %i := 1 WHILE( %i <= ALEN( %queueId ) ) %statu

Strany 137

Chapter 6 Obsolete Material Scripting Guide 221 MVSCOMMAND Syntax: MVSCOMMAND( %ObjID, $CmdArray, $Output Array, %ErrArray $ErrorTextArray[, %Por

Strany 138

Chapter 6 Obsolete Material Scripting Guide 222 generated output from each independently submitted command. Use the QREAD() command to process th

Strany 139

Chapter 6 Obsolete Material Scripting Guide 223 14.23.53 P390 STC00019 GWLU62MC08 D T BY WATCHSNA USERID P390 <======= **

Strany 140 - KEY Command Return Values

Chapter 6 Obsolete Material Scripting Guide 224 Manifest Constant Value Associated String ICLErr_MvsRsp_0019 10019 Add operator rejected; admin

Strany 141 - KEY Command Specifics

Chapter 6 Obsolete Material Scripting Guide 225 QUEUE Syntax: QUEUE( Operation[, Port]) Description: Starts (stops and resets) a queue of OS print

Strany 142 - Keyboard Key Key Command

Chapter 6 Obsolete Material Scripting Guide 226 QUEUE command operation parameter options Operation Constant Description ON Creates a message qu

Strany 143 - LEFTSTR

Chapter 6 Obsolete Material Scripting Guide 227 READMSG Syntax: READMSG( $Msg, Wait, *Timeout[, Port [, Filter]]) Description: Reads the next mes

Strany 144

Chapter 6 Obsolete Material Scripting Guide 228 Example: //======================================================= // Example 1 //===============

Strany 145

Chapter 6 Obsolete Material Scripting Guide 229 TSOEREXX Syntax: TSOEREXX( %ObjID, $CmdArray, %ErrorArray, $ErrorTextArray) ==> %ReturnValue D

Strany 146

Chapter 2 Advanced Topics Scripting Guide 23  To improve readability, put one blank line before and one after each control structure, such as IF

Strany 147 - MKDTEMP

Chapter 6 Obsolete Material Scripting Guide 230 Example: // Sample TSOEREXX() call ARESET( $Cmds) ARESET( %Err) ARESET( $ErrMsg) %OsID := OBJID

Strany 148 - MKSTEMP

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

Strany 149

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

Strany 150 - MONIKER

Scripting Guide 233 Appendix B Command Syntax Appendix B contains two tables:  The first table lists information by command types.  The second ta

Strany 151 - OBJEXEC

Appendix B Command Syntax Scripting Guide 234 Command Syntax—By Command Type Command Command Type Description Syntax ALARM Alerting Gene

Strany 152

Appendix B Command Syntax Scripting Guide 235 Command Command Type Description Syntax KEY Console Message Enters a character string to t

Strany 153 - OBJGETARRAY

Appendix B Command Syntax Scripting Guide 236 EVENTCLOSE Event Closes a specified event queue. Events are no longer available from the

Strany 154

Appendix B Command Syntax Scripting Guide 237 FPOS File Returns an open file’s current record pointer position. FPOS(%FileNum)==>%Po

Strany 155

Appendix B Command Syntax Scripting Guide 238 GOSUB Flow Control Immediately transfers script execution to the specified label and waits

Strany 156 - OBJIDARRAY

Appendix B Command Syntax Scripting Guide 239 WHILE (ENDWHILE) Flow Control Repeats a sequence of commands while an expression evaluates

Strany 157

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

Strany 158

Appendix B Command Syntax Scripting Guide 240 OBJSET Object Manager Populates an associative numeric array with object IDs from the chi

Strany 159 - OBJSETARRAY

Appendix B Command Syntax Scripting Guide 241 SCRIPTGETACTIVE Scripting Retrieves information on all active scripts into an associative

Strany 160

Appendix B Command Syntax Scripting Guide 242 WAITUNTIL Time Pauses current script execution until the specified time is reached. WAITU

Strany 161

Appendix B Command Syntax Scripting Guide 243 FINDSTR Variable Searches a string for a regular expression pattern. FINDSTR($String,$Subs

Strany 162

Appendix B Command Syntax Scripting Guide 244 LOWER Variable Converts uppercase characters to lowercase. LOWER($String)==>$Lowercase

Strany 163

Appendix B Command Syntax Scripting Guide 245 VERSION Variable Returns a string giving the product and script language version levels.

Strany 164

Appendix B Command Syntax Scripting Guide 246 Command Syntax—By Command Command Command Type Description Syntax AICONNAMES Variable Fill

Strany 165

Appendix B Command Syntax Scripting Guide 247 Command Command Type Description Syntax BASEDIRECTORY Variable Obtains the base directory

Strany 166 - QPREVIEW

Appendix B Command Syntax Scripting Guide 248 Command Command Type Description Syntax ERRORNUM Misc. Returns the error number for the mo

Strany 167

Appendix B Command Syntax Scripting Guide 249 Command Command Type Description Syntax FREAD File Reads values from an open file into var

Strany 168

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

Strany 169

Appendix B Command Syntax Scripting Guide 250 Command Command Type Description Syntax ICONNAME Alerting Returns an icon’s name. ICONNAM

Strany 170

Appendix B Command Syntax Scripting Guide 251 MVSCOMMAND Event Enters commands to MVS using the GW-MVS agent (optional software). MVSCO

Strany 171

Appendix B Command Syntax Scripting Guide 252 QOPEN Console Message Opens a new queue of OS printer console messages. QOPEN([%ObjIDArray]

Strany 172

Appendix B Command Syntax Scripting Guide 253 SET Variable Make the contents of a variable equal to the specified expression. SETVariabl

Strany 173

Appendix B Command Syntax Scripting Guide 254 TEMP Physical Interface Control Reads the current temperature from a sensor unit. TEMP(%Po

Strany 174 - RIGHTSTR

Scripting Guide 255 IndexAICONNAMES Syntax— AICONNAMES( $AssocArray, %Class, $ParentIcon)...71 ALAR

Strany 175

Index Scripting Guide 256 numeric...43 string...

Strany 176

Index Scripting Guide 257 Object Manager ...26 icon class ...

Strany 177 - SCRIPTCANCEL

Index Scripting Guide 258 Syntax—SCRNTEXT( %Port, %Start, %Length) ==> $Text...183 SECONDS S

Strany 178 - SCRIPTGETACTIVE

Index Scripting Guide 259 ICONSTATUS( [%Class [, $Name]]) ==> %Status...136

Strany 179

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

Strany 180 - Examples:

Index Scripting Guide 260 Syntax—WHILE...ENDWHILE ...212

Strany 183

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

Strany 184 - SNMP_GET

Chapter 2 Advanced Topics Scripting Guide 28 Object Action Type Description Parameters Return Value takes two seconds to perform some processing,

Strany 185 - SNMP_GETNEXT

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

Strany 186 - SNMP_GETTABLE

Scripting Guide 3 Contents Technical Support ... 2 Contacting the

Strany 187

Chapter 2 Advanced Topics Scripting Guide 30 The default class and name for a script are determined when the script begins executing:  A script

Strany 188 - SNMP_SET

Chapter 2 Advanced Topics Scripting Guide 31 SNMP A full discussion of SNMP (Simple Network Management Protocol) is beyond the scope of this guide

Strany 190

Scripting Guide 33 Chapter 3 Script Syntax This chapter contains:  General Scripting Syntax  Basic Overviews of: − Variables − Date/Time − Exp

Strany 191

Chapter 3 Script Syntax Scripting Guide 34 General Script Syntax Information General Syntax of a Script The general structure of a script file is

Strany 192

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

Strany 193

Chapter 3 Script Syntax Scripting Guide 36 Variables Using and Naming Variables  Variables may be character strings, numerics, or arrays; array

Strany 194

Chapter 3 Script Syntax Scripting Guide 37 Numeric Variables  Numeric variable names are prefixed with a percent sign “%”.  The maximum value

Strany 195

Chapter 3 Script Syntax Scripting Guide 38 Arrays Using and Naming Arrays  There are two types of arrays, integer arrays and string arrays. Int

Strany 196

Chapter 3 Script Syntax Scripting Guide 39 Normal Arrays Normal arrays are indexed by any expression that evaluates to a positive integer value. T

Strany 197

Contents Scripting Guide 4 Chapter 3 Script Syntax... 33 General S

Strany 198 - SYSEXEC

Chapter 3 Script Syntax Scripting Guide 40 Date/Time The date and time type functions allow great flexibility in manipulating and formatting of ti

Strany 199

Chapter 3 Script Syntax Scripting Guide 41 Expressions There are two types of expressions, String and Numeric. String Expressions String expressio

Strany 200

Chapter 3 Script Syntax Scripting Guide 42 Manifest Constants Intrinsic manifest constants have been defined to make scripts easier to read, write

Strany 201 - TIMESTR

Chapter 3 Script Syntax Scripting Guide 43 List of Intrinsic Manifest Constants Manifest Error Constants Manifest Error Constants Value Associat

Strany 202

Chapter 3 Script Syntax Scripting Guide 44 Manifest Error Constants Value Associated String not run. Err_Mvs1 4012 General MVS error. Err_Mvs_

Strany 203 - Miscellaneous Codes

Chapter 3 Script Syntax Scripting Guide 45 Manifest Error Constants Value Associated String Err_Key_CantReadStatus 5109 Err_Key_ConsoleNotLock

Strany 204 - TRIMSTR

Chapter 3 Script Syntax Scripting Guide 46 Manifest Error Constants Value Associated String ICLErr_MvsRsp_0022 10022 Cannot delete last admini

Strany 205

Chapter 3 Script Syntax Scripting Guide 47 Other Manifest Constants Other Manifest Constants Value Assoc. String On 1 True 1 Asc 1 Left 1

Strany 206

Chapter 3 Script Syntax Scripting Guide 48 Other Manifest Constants Value Assoc. String SkipEnd 2 SkipNext 1 Status_Error 1 Status_Warnin

Strany 207 - VERSION

Chapter 3 Script Syntax Scripting Guide 49 Other Manifest Constants Value Assoc. String Hmc_SnaAddr HMC_SnaAddr Hmc_MachModel HMC_MachModel

Strany 208 - WAITFOR

Contents Scripting Guide 5 AICONNAMES... 69 ALARM...

Strany 209 - WAITUNTIL

Chapter 3 Script Syntax Scripting Guide 50 Operators Mathematical The following mathematical operators may be used in numeric expressions: Charac

Strany 210

Chapter 3 Script Syntax Scripting Guide 51 The following Boolean syntax may be used: Syntax Means == Equals < Less than > Greater than <=

Strany 211 - Chapter 6 Obsolete Material

Chapter 3 Script Syntax Scripting Guide 52 Label Statements Label statements are used as a reference point within a script to which processing can

Strany 212

Scripting Guide 53 Chapter 4 Regular Expressions This chapter discusses regular expressions including:  Bracket expressions  Special characters 

Strany 213 - Manifest Constants

Chapter 4 Regular Expressions Scripting Guide 54 Regular Expressions Regular expressions (REs) or patterns are textual statements including specia

Strany 214 - Commands

Chapter 4 Regular Expressions Scripting Guide 55 [^.] Match anything EXCEPT a dot. [^A-Z] Match anything EXCEPT an upper case letter. Subexpres

Strany 215 - EVENTCLOSE

Chapter 4 Regular Expressions Scripting Guide 56 Rules for Building Regular Expressions When using the rules to build regular expressions (REs), f

Strany 216 - EVENTOPEN

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

Strany 217

Chapter 4 Regular Expressions Scripting Guide 58 Inside bracket expressions, the following are true:  The special characters ‘.’ , ‘*’, ‘[‘, an

Strany 218 - EVENTREAD

Chapter 4 Regular Expressions Scripting Guide 59 The rules in Table 9. Bracket Expression Rules. apply to:  Creating and using matching and non

Strany 219 - Returns:

Contents Scripting Guide 6 HEXSTR... 126 HMCEXE

Strany 220

Chapter 4 Regular Expressions Scripting Guide 60 Bracket Expression Rule Description Equivalence Class Expression Specifies a set of collating el

Strany 221 - MVSCOMMAND

Chapter 4 Regular Expressions Scripting Guide 61 Matching Multiple Characters in Bracket Expressions The following rules are used to build multipl

Strany 222

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

Strany 223 - Possible Error Codes

Chapter 4 Regular Expressions Scripting Guide 63 Precedence of Special Characters The order of precedence, from high to low, is shown below: Order

Strany 224

Chapter 4 Regular Expressions Scripting Guide 64 Special Characters in Regular Expressions Table 12. Regular Expressions, Special Characters desc

Strany 225

Chapter 4 Regular Expressions Scripting Guide 65 Character Description the quantity. | OR. "A|B" matches either "A" or "

Strany 227 - READMSG

Scripting Guide 67 Chapter 5 Script Commands This chapter:  Discusses the types of script commands  Gives information about script syntax  Lis

Strany 228

Chapter 5 Script Commands Scripting Guide 68 Conventions in this Chapter When writing scripts, text placed in brackets “[]” is an optional paramet

Strany 229 - TSOEREXX

Chapter 5 Script Commands Scripting Guide 69 AICONNAMES Syntax: AICONNAMES( $AssocArray, %Class, $ParentIcon) Description: Fill an array with all

Strany 230

Contents Scripting Guide 7 SNMP_GETTABLE... 186 SNMP_SET...

Strany 231

Chapter 5 Script Commands Scripting Guide 70 ALARM Syntax: ALARM( %Operation) Description: Generates a repetitive alarm tone (beep) at the MCC te

Strany 232

Chapter 5 Script Commands Scripting Guide 71 ALERTCREATE Syntax: ALERTCREATE( %Status, %State, $Source, $MsgText, $UserNote) ==> %AlertID Desc

Strany 233 - Appendix B Command Syntax

Chapter 5 Script Commands Scripting Guide 72 ALERTDEL Syntax: ALERTDEL( %AlertID) ==> %ErrCode Description: Deletes an existing Alert. Action:

Strany 234 - Description Syntax

Chapter 5 Script Commands Scripting Guide 73 ALERTGETACTIVE Syntax: ALERTGETACTIVE($AssocArray) ==>%ErrCode Description: Retrieves information

Strany 235

Chapter 5 Script Commands Scripting Guide 74 $AlertInfo[14] 'Quilt' source computer/OS $AlertInfo[15] message $AlertInfo[16] &a

Strany 236

Chapter 5 Script Commands Scripting Guide 75 See Also: ALERTMOD, ALERTCREATE, ALERTDEL

Strany 237

Chapter 5 Script Commands Scripting Guide 76 ALERTMOD Syntax: ALERTMOD( %AlertID, %AlertField, NewValue) ==> %ErrCode Description: Modifies th

Strany 238 - (ENDIF) Flow

Chapter 5 Script Commands Scripting Guide 77 ARESET Syntax: ARESET( Array) Description: Reset the contents of an array to “empty”. Action: All el

Strany 239 - (ENDWHILE) Flow

Chapter 5 Script Commands Scripting Guide 78 ASCII Syntax: ASCII( $String) ==> %Value Description: Given a string $String, returns the integer

Strany 240

Chapter 5 Script Commands Scripting Guide 79 ASCRN Syntax: ASCRN( $Array, %Port) Description: Fill an array with the full text of a console scree

Strany 241

Contents Scripting Guide 8 List of Tables Table 1. List of MCC Reserved Scripts executed in response to status changes...

Strany 242

Chapter 5 Script Commands Scripting Guide 80 ASORT Syntax: ASORT( NormArray, %Direction) Description: Sort a normal array. Action: The data eleme

Strany 243

Chapter 5 Script Commands Scripting Guide 81 ASSOCKEYS Syntax: ASSOCKEYS( AssocArray, $NormArray) ==> %RetVal Description: Populate a normal s

Strany 244

Chapter 5 Script Commands Scripting Guide 82 ATSTR Syntax: ATSTR( $String, $Substring) ==> %StartPos Description: Returns the starting positio

Strany 245

Chapter 5 Script Commands Scripting Guide 83 BASEDIRECTORY Syntax: BASEDIRECTORY() ==> $DirectoryString Description: Obtains the base directory

Strany 246 - Command Syntax—By Command

Chapter 5 Script Commands Scripting Guide 84 BLOCKSCAN Syntax: BLOCKSCAN( %Wait, *Timeout [, $Array]) ...ENDBLOCK Description: Enables up to 256

Strany 247

Chapter 5 Script Commands Scripting Guide 85 See Also: SCANB, SCANP

Strany 248

Chapter 5 Script Commands Scripting Guide 86 CHR Syntax: CHR( %Number) ==> $String Description: Given an integer in the range 0 to 255, return

Strany 249

Chapter 5 Script Commands Scripting Guide 87 CLASSNAME Syntax: CLASSNAME( [%Class]) ==> $ClassName Description: Returns the class name for a c

Strany 250

Chapter 5 Script Commands Scripting Guide 88 CLASSNUM Syntax: CLASSNUM( [$ClassName]) ==> %Class Description: Returns the class number for a c

Strany 251

Chapter 5 Script Commands Scripting Guide 89 CPUPOWER Syntax: CPUPOWER( %Port, %Operation) Description: Switches a CPU’s power ON or OFF. Action:

Strany 252

Scripting Guide 9 About This Guide Purpose of This Guide This guide illustrates the Master Console Center Global Control Language (MCC GCL). It assu

Strany 253

Chapter 5 Script Commands Scripting Guide 90 DATE Syntax: DATE( [$DateString]) ==> %EpochSeconds Description: Converts a date string to a date

Strany 254

Chapter 5 Script Commands Scripting Guide 91 DEC Syntax: DEC %Variable Description: Subtracts one from a numeric variable’s value. Action: The va

Strany 255 - Scripting Guide 255

Chapter 5 Script Commands Scripting Guide 92 DECODE Syntax: DECODE ($String[, $Key]) ==> $Result Description: Decodes a GCL string, for exampl

Strany 256 - Scripting Guide 256

Chapter 5 Script Commands Scripting Guide 93 DIUNIT Syntax: DIUNIT( %Port) ==> %Status Description: Check the status of a device connected to

Strany 257 - Scripting Guide 257

Chapter 5 Script Commands Scripting Guide 94 DOUNIT Syntax: DOUNIT( %Port[, %Operation]) ==> %DOSwitch Description: Controls the device connec

Strany 258 - Scripting Guide 258

Chapter 5 Script Commands Scripting Guide 95 ENCODE Syntax: ENCODE ($String[,$Key]) ==> $Result Description: Encodes a GCL string, for example

Strany 259 - Scripting Guide 259

Chapter 5 Script Commands Scripting Guide 96 END Syntax: END Description: Ends the execution of the script thread. Action: The execution of the c

Strany 260 - Scripting Guide 260

Chapter 5 Script Commands Scripting Guide 97 ERRORMSG Syntax: ERRORMSG( %ErrNum)==> $ErrMsg Description: Returns the error message associated

Strany 261

Chapter 5 Script Commands Scripting Guide 98 ERRORNUM Syntax: ERRORNUM() ==> %ErrNum Description: Returns the error number for the most recent

Strany 262 - 707131-001

Chapter 5 Script Commands Scripting Guide 99 Manifest Constant Value Associated String/Reason Support. Err_Mvs_NoComm 4001 Unable to communicate

Komentáře k této Příručce

Žádné komentáře