Visara Master Console Center Scripting Guide Instrukcja Użytkownika Strona 1

Przeglądaj online lub pobierz Instrukcja Użytkownika dla Akcesoria komputerowe Visara Master Console Center Scripting Guide. Visara Master Console Center Scripting Guide User Manual Instrukcja obsługi

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 262
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów

Podsumowanie treści

Strona 1 - Scripting Guide

VisaraMaster Console CenterScripting GuideP/N 707131-001

Strona 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

Strona 3 - Contents

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

Strona 4 - Scripting Guide 4

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

Strona 5 - Scripting Guide 5

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

Strona 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

Strona 7 - Scripting Guide 7

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

Strona 8

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

Strona 9 - About This Guide

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

Strona 10 - The MCC Documentation Set

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

Strona 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

Strona 12 - Script Concepts

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

Strona 13 - Script Source Structure

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

Strona 14 - Master Scripts

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

Strona 15 - Reserved Scripts

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

Strona 16 - #logswap.scr

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

Strona 17 - #shutdn.scr

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

Strona 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

Strona 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

Strona 20

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

Strona 21 - Chapter 2 Advanced Topics

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

Strona 22 - Script Writing Guidelines

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

Strona 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

Strona 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

Strona 25 - Object Key

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

Strona 26 - Object Field

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

Strona 27 - Object Action

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

Strona 28

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

Strona 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

Strona 30 - Scripting Guide 30

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

Strona 31 - MIB OID

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

Strona 32

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

Strona 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

Strona 34 - Structuring a Script

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

Strona 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

Strona 36 - Variables

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

Strona 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

Strona 38 - Using and Naming Arrays

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

Strona 39 - Associative Arrays

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

Strona 40 - Date/Time

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

Strona 41 - Expressions

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

Strona 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

Strona 43 - Manifest Error Constants

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

Strona 44

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

Strona 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

Strona 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

Strona 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

Strona 48

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

Strona 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

Strona 50 - Operators

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

Strona 51 - Comment Statements

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

Strona 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

Strona 53 - Scripting Guide 53

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

Strona 54 - Regular Expressions

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

Strona 55 - Subexpressions

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

Strona 56 - Scripting Guide 56

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

Strona 57 - Bracket Expressions

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

Strona 58

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

Strona 59

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

Strona 60 - Description

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

Strona 61 - Scripting Guide 61

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

Strona 62 - Alternation

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

Strona 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

Strona 64 - Character Description

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

Strona 65 - Collating Elements

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

Strona 66

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

Strona 67 - Chapter 5 Script Commands

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

Strona 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)

Strona 69 - AICONNAMES

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

Strona 70

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

Strona 71 - ALERTCREATE

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

Strona 72 - ALERTDEL

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

Strona 73 - ALERTGETACTIVE

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

Strona 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

Strona 75

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

Strona 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

Strona 77

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

Strona 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

Strona 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

Strona 80

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

Strona 81 - ASSOCKEYS

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

Strona 82

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

Strona 83 - BASEDIRECTORY

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

Strona 84 - BLOCKSCAN

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

Strona 85

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

Strona 86

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

Strona 87 - CLASSNAME

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

Strona 88 - CLASSNUM

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

Strona 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

Strona 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

Strona 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

Strona 92

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

Strona 93

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

Strona 94

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

Strona 95

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

Strona 96

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

Strona 97 - ERRORMSG

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

Strona 98 - ERRORNUM

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

Strona 99

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

Strona 100

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

Strona 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

Strona 102 - See Also:

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

Strona 103

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

Strona 104 - FDELETE

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

Strona 105 - FEXISTS

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

Strona 106

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

Strona 107 - FINDSTR

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

Strona 108 - FMODTIME

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

Strona 109

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

Strona 110

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

Strona 111 - FORMATSTR

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

Strona 112

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

Strona 114 - Scripting Guide 114

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

Strona 115 - Scripting Guide 115

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

Strona 116

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

Strona 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

Strona 118 - FRENAME

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

Strona 119 - FREWIND

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

Strona 120 - Action:

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

Strona 121

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

Strona 122

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

Strona 123

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

Strona 124

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

Strona 125

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

Strona 126

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

Strona 127 - HMCEXEC

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

Strona 128 - Image-only Commands

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

Strona 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

Strona 130

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

Strona 131 - Notes:

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

Strona 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

Strona 133 - ICONNAME

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

Strona 134 - ICONSTATUS

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

Strona 135

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

Strona 136

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

Strona 137

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

Strona 138

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

Strona 139

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

Strona 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

Strona 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

Strona 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

Strona 143 - LEFTSTR

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

Strona 144

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

Strona 145

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

Strona 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

Strona 147 - MKDTEMP

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

Strona 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

Strona 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

Strona 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

Strona 151 - OBJEXEC

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

Strona 152

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

Strona 153 - OBJGETARRAY

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

Strona 154

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

Strona 155

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

Strona 156 - OBJIDARRAY

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

Strona 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

Strona 158

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

Strona 159 - OBJSETARRAY

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

Strona 160

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

Strona 161

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

Strona 162

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

Strona 163

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

Strona 164

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

Strona 165

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

Strona 166 - QPREVIEW

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

Strona 167

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

Strona 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

Strona 169

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

Strona 170

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

Strona 171

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

Strona 172

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

Strona 173

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

Strona 174 - RIGHTSTR

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

Strona 175

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

Strona 176

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

Strona 177 - SCRIPTCANCEL

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

Strona 178 - SCRIPTGETACTIVE

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

Strona 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

Strona 180 - Examples:

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

Strona 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

Strona 184 - SNMP_GET

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

Strona 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

Strona 186 - SNMP_GETTABLE

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

Strona 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

Strona 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

Strona 190

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

Strona 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

Strona 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

Strona 193

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

Strona 194

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

Strona 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

Strona 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

Strona 197

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

Strona 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

Strona 199

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

Strona 200

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

Strona 201 - TIMESTR

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

Strona 202

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

Strona 203 - Miscellaneous Codes

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

Strona 204 - TRIMSTR

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

Strona 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

Strona 206

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

Strona 207 - VERSION

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

Strona 208 - WAITFOR

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

Strona 209 - WAITUNTIL

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

Strona 210

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

Strona 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

Strona 212

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

Strona 213 - Manifest Constants

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

Strona 214 - Commands

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

Strona 215 - EVENTCLOSE

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

Strona 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

Strona 217

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

Strona 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

Strona 219 - Returns:

Contents Scripting Guide 6 HEXSTR... 126 HMCEXE

Strona 220

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

Strona 221 - MVSCOMMAND

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

Strona 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

Strona 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

Strona 224

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

Strona 225

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

Strona 227 - READMSG

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

Strona 228

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

Strona 229 - TSOEREXX

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

Strona 230

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

Strona 231

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

Strona 232

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

Strona 233 - Appendix B Command Syntax

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

Strona 234 - Description Syntax

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

Strona 235

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

Strona 236

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

Strona 237

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

Strona 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

Strona 239 - (ENDWHILE) Flow

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

Strona 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

Strona 241

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

Strona 242

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

Strona 243

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

Strona 244

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

Strona 245

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

Strona 246 - Command Syntax—By Command

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

Strona 247

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

Strona 248

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

Strona 249

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

Strona 250

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

Strona 251

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

Strona 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

Strona 253

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

Strona 254

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

Strona 255 - Scripting Guide 255

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

Strona 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

Strona 257 - Scripting Guide 257

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

Strona 258 - Scripting Guide 258

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

Strona 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

Strona 260 - Scripting Guide 260

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

Strona 261

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

Strona 262 - 707131-001

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

Komentarze do niniejszej Instrukcji

Brak uwag