The Indirect Command Processor allows CLI command lines to be placed in a file. The file is then executed as though the command lines were entered from a terminal. Indirect also supports other numeric and string manipulation commands. A summary of commands and special symbols can be obtained by typing HELP INDIRECT SUMMARY Individual command descriptions can be obtained by typing HELP INDIRECT commandname For the commands with many forms and similar names, type HELP INDIRECT SET, HELP INDIRECT IF, HELP INDIRECT OPEN Operators (relational and arithmetic) are described at HELP INDIRECT OPERATORS Special symbol descriptions can be obtained by typing HELP INDIRECT symbolname NOTE: symbolname does not include the angle brackets. A list of Indirect error messages, including their severity class numbers, can be obtained by typing HELP INDIRECT ERROR 2 OPERATORS A numeric symbol or constant can be combined with another numeric symbol or constant by a logical or arithmetic operator to form a numeric expression. Arithmetic and logical operators are: + Add - Subtract * Multiply / Divide ! Logical inclusive OR & Logical AND # Logical NOT No embedded blanks or tabs are permitted between operators. The string operator + (Concatenation) can be used to form longer strings from a collection of shorter strings. The substring operator [start:end] describes a substring range of a given string, for example, STRING[x:y], where x is the first position of the substring and y is the last. If the total length of the string is unknown, the syntax STRING[5:*] can be used to express "from position 5 to the end of the string." Relational operators are as follows: EQ or = Equal to NE or <> Not equal to GE or >= Greater than or equal to LE or <= Less than or equal to GT or > Greater than LT or < Less than 2 SUMMARY Information about the following Indirect commands is available: .ASK .ASKN .ASKS .BEGIN .CHAIN .CLOSE .DATA .DEC .DELAY .DISABLE .ENABLE .END .ERASE .EXIT .FORM .GOSUB .GOTO .IF .INC .OPEN .OPENA .OPENR .ONERR .PARSE .PAUSE .READ .RETURN .IFDF .IFNDF .IFT .IFF .IFACT .IFNACT .IFENABLED .IFDISABLED .IFINS .IFNINS .IFNLOA .IFLOA .SETD .SETF .SETL .SETN .SETO .SETS .SETT .STOP .TEST .TESTDEVICE .TESTFILE .TESTPARTITION .WAIT .XQT .label Information about the following special symbols is available: ACCOUN ALPHAN ALTMOD BASLIN CLI CONFIG DATE DEFAUL EOF ERRCTL ERRNUM ERROR ERRSEV ERSEEN ESCAPE EXSTAT EXSTRI FALSE FILERR FILER2 FILATR FILSPC FORATT FMASK IAS LIBUIC LOCAL LOGDEV LOGUIC MAPPED MEMSIZ NETUIC NETNOD NXTSYM NOSTAT NUMBER OCTAL PRIVIL RAD50 RSX11D SEVERE SPACE STRLEN SUCCES SYDISK SYMTYP SYSDEV SYSID SYSTEM SYSUIC SYUNIT TICLPP TICWID TISPED TIME TIMOUT TITYPE TRUE UIC WARNIN Reserved symbols created by Indirect are: P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, COMMAN Other Indirect operations for which help is available are: SWITCHES SUBSTITUTION of symbols PARAMETER passing LIBRARY procedures FORMATTING for readability ADVANCED techniques 2 .ASK #ASK 2 ASK Defines or redefines a logical symbol and assigns it a true or false value. Format: .ASK [def:tmt] sym txt where: def - Optional default value to be assigned to the symbol if a line terminator is typed in response to the question or if a timeout occurs. The default can be or or another logical variable. tmt - Optional decimal timeout count describing the length of time before the default value is used. The format of the parameter is the same as that used for the .DELAY directive. sym - Logical symbol name consisting of 1 through 6 alphanumeric characters. txt - Text to be displayed on the output display line. Example: .ASK [:10S] L1 Logical value produces >* Logical value [Y/N D:Y T:10S]: See also HELP INDIRECT ASKN and HELP INDIRECT ASKS. 2 .ASKN #ASKN 2 ASKN Defines or redefines a numeric symbol and assigns it an octal or decimal value. Format: .ASKN [low:high:def:tmt] sym txt where: low:high - Numeric values that define the range for the response. The input or default value must be within the range to be valid. def - Optional default value to be assigned to the symbol if a line terminator is typed in response to the question or if a timeout occurs. The default can be a numeric expression or another numeric symbol. tmt - Optional decimal timeout count describing the length of time before the default value is used. The format of the parameter is the same as that used for the .DELAY directive. sym - Logical symbol name consisting of 1 through 6 alphanumeric characters. txt - Text to be displayed on the output display line. Example: .ASKN [1:3:2:10S] N1 Numeric value produces >* Numeric value [O R:1-3 D:2 T:10S]: See also HELP INDIRECT ASK and HELP INDIRECT ASKS. 2 .ASKS #ASKS 2 ASKS Defines or redefines a string symbol and assigns it an ASCII text string. Format: .ASKS [low:high:def:tmt] sym txt where: low:high - Numeric values that define the range for the response. The length of the input or default value must be within the range to be valid. def - Optional default value to be assigned to the symbol if a line terminator is typed in response to the question or if a timeout occurs. The default can be a string expression or another string symbol. tmt - Optional decimal timeout count describing the length of time before the default value is used. The format of the parameter is the same as that used for the .DELAY directive. sym - Logical symbol name consisting of 1 through 6 alphanumeric characters. txt - Text to be displayed on the output display line. Example: .SETS DEF "abc" .ASKS [1:3:DEF:10S] S1 String value produces >* String value [S R:1-3 D:"abc" T:10S]: See also HELP INDIRECT ASKN and HELP INDIRECT ASK. 2 .BEGIN #BEGIN 2 BEGIN Delimits the start of a BEGIN-END block. Format: .BEGIN Note that the .BEGIN command must appear on a line by itself. It cannot be part of an .IFx command line. A BEGIN-END block defines a set of Indirect commands that must be entered and exited as a unit. Local symbols defined outside of the block are accessible, but those created within the block are deleted when Indirect exits from the block (reaches .END). 2 .CHAIN #CHAIN 2 CHAIN The .CHAIN command continues execution from a new command file. Unlike the "@filename" construction, the current file context is not preserved. All local symbols are erased (unless the /LO switch is specified) and execution continues at the first line of the file specified with .CHAIN. Examples: .CHAIN SYSGEN2.CMD .CHAIN PROCLIB/LB:PART2 2 .CLOSE #CLOSE 2 CLOSE Closes a secondary data file. No error is returned if the file is already closed. Format: .CLOSE #n where n is the channel number of the file to be closed. 2 .DATA #DATA 2 DATA Specifies a single line of data to be output to a secondary file previously opened by an .OPEN directive. Example: .DATA #n This line will go into data file n One or more blanks or tabs can follow the .DATA command. If the first character is a blank, it is removed and not placed in the output file. If the first character is a tab, it is transferred to the output file. 2 .END #END 2 END Delimits the end of a BEGIN-END block. All local symbols defined since the last .BEGIN command are erased by this command. Format: .END Note that an .END command must appear on a line by itself. It cannot be part of an .IFx command line. 2 .EXIT #EXIT 2 EXIT Leaves a BEGIN-END block or a command file, optionally specifying exit status. The exit status value can be any 16-bit encoded value. This value will be available in the next outer command file as the value of or to the task that spawned Indirect as the exit status value (RSX-11M-PLUS only). Format: .EXIT [n] where n is the numeric expression for the exit status. 2 .FORM #FORM 2 FORM The .FORM command is an optional feature of Indirect and supported only on nonprivileged versions running under RSX-11M-PLUS. You must have a license and have installed the FMS-11/RSX V1.0 kit. Familiarize yourself with the documentation before attempting to use the .FORM command. The FMS-11 support included when the nonprivileged Indirect task is built incorporates support for the VT100 and VT52 terminals. The syntax of the .FORM command parallels the format of the MACRO-11 call interface to FMS-11. You are encouraged to read the FMS-11/RSX V1.0 Programmers Guide, particularly the chapters on form driver operation and the MACRO-11 interface. For more information, type HELP INDIRECT FORM COMMANDS and HELP INDIRECT FORM SUMMARY. 3 COMMANDS In the following summaries, square brackets enclose optional arguments. Formal parameters are: LINENUM The screen line number where form display is to begin. RETTRM The name of a numeric variable to contain the code for the terminator typed by the user. FILENAME The name of a string variable or string constant naming the file in which the form definitions are stored. RETNAM The name of the field completed by the user. RETINX The index of the field completed by the user. TERMINATOR The code for the terminator to be processed. VALUE A string variable or constant to be placed in the indicated field. FLDNAME The name of a field defined in the currently displayed form. INDEX In an indexed field, the index referencing the specific field being addressed. RETVAL The name of a string variable into which the returned value will be placed. String values supplied TO the .FORM command can be expressed as a constant enclosed in quotation marks or as the name of a previously defined string variable. For example: .FORM OPN,"FMSDEM.FLB" and .SETS LIBR "FMSDEM.FLB" .FORM OPN,LIBR are equivalent. String and numeric values returned FROM the .FORM command are passed as though a .SETS or .SETN command were being executed. This means that the name of the variable to receive the value must be supplied and that it must either be not previously defined or defined as the appropriate string or numeric type. For example: .FORM GET,"CHOICE",,,,FLDVAL FLDVAL is defined or redefined as required and contains the string typed by the user to fill the field named CHOICE on the currently displayed form. The general syntax of the .FORM command is .FORM FNC,p1,p2,....pn where FNC is a three-letter code indicating which FMS operation is to be performed. These codes are a subset of the codes used in the MACRO-11/FMS interface and are summarized below. A demonstration procedure is included in LB:[1,2]INDSYS.CLB. This procedure library is packaged on the distribution kit with the privileged MCR task sources. Please refer to HELP INDIRECT INDSYS for installation information. To execute the demonstration procedure, type the following command line: | @LB:[1,2]INDSYS.CLB/LB:FMSDEM After verifying the terminal type, a copy of the forms library will be placed in your directory. The procedure is identical to that provided in MACRO-11 form on the FMS/RSX V1.0 kit. Refer to the FMS documentation for a fuller description of the demonstration. Commands: CSH -- Clear screen and show form .FORM CSH,FLDNAME[,LINENUM] SHO -- Show form .FORM SHO,FLDNAME[,LINENUM] GET -- Get value for specified field .FORM GET,FLDNAME[,INDEX[,RETNAM[,RETINX[,RETVAL[,RETTRM]]]]] ANY -- Return any field value .FORM ANY[,RETNAM[,RETINX[,RETVAL[,RETTRM]]]]] ALL -- Return all fields .FORM ALL[,RETVAL[,RETTRM]] DAT -- Get data from form .FORM DAT,[FLDNAME],[INDEX],[RETVAL] GSC -- Get current line of scrolled area .FORM GSC,FLDNAME,RETVAL[,RETTRM] CLO -- Close forms library .FORM CLO OPN -- Open forms library .FORM OPN,FILENAME PSC -- Put to current line of scrolled area .FORM PSC,FLDNAME,VALUE TRM -- Process field terminator .FORM TRM,[FLDNAME],[VALUE],TERMINATOR [,RETNAM [,RETINX]] PUT -- Put to specified field .FORM PUT,FLDNAME,[INDEX],VALUE PAL -- Put all fields .FORM PAL [,VALUE] LST -- Output to last line of screen .FORM LST [,VALUE] RAL -- Return all fields .FORM RAL,VALUE RTN -- Return value for specified field .FORM RTN,FLDNAME,[INDEX],RETVAL SPF/SPN -- Supervisor mode control .FORM SPF .FORM SPN 3 SUMMARY .FORM CSH,FLDNAME[,LINENUM] .FORM SHO,FLDNAME[,LINENUM] .FORM GET,FLDNAME[,INDEX[,RETNAM[,RETINX[,RETVAL[,RETTRM]]]]] .FORM ANY[,RETNAM[,RETINX[,RETVAL[,RETTRM]]]]] .FORM ALL[,RETVAL[,RETTRM]] .FORM DAT,[FLDNAME],[INDEX],[RETVAL] .FORM GSC,FLDNAME,RETVAL[,RETTRM] .FORM CLO .FORM OPN,FILENAME .FORM PSC,FLDNAME,VALUE .FORM TRM,[FLDNAME],[VALUE],TERMINATOR [,RETNAM [,RETINX]] .FORM PUT,FLDNAME,[INDEX],VALUE .FORM PAL [,VALUE] .FORM LST [,VALUE] .FORM RAL,VALUE .FORM RTN,FLDNAME,[INDEX],RETVAL .FORM SPF .FORM SPN 2 .DISABLE #ENABLE 2 DISABLE #ENABLE 2 .ENABLE #ENABLE 2 ENABLE With the .ENABLE and .DISABLE commands, several Indirect operating modes can be controlled. These modes are: Mode Default Scope Default Effect ---- ------- ----- ------- ------ setting ------- ATTACH Enabled G Indirect attaches to TI: for comment lines. CONTROL-Z Disabled G CTRL/Z in response to .ASKx exits Indirect. DECIMAL Disabled G Numeric symbols are created as OCTAL. DELETE Disabled L The current command file is not deleted at end. DETACH Enabled G Indirect detaches from TI: for command lines. DISPLAY Enabled G Indirect displays the current fields for .ASKx and "@ ". ESCAPE Disabled G ESCAPE or ALTMODE is legal for .ASKx response. ESCAPE-SEQ Disabled G When Indirect attaches, escape-sequence recognition is not enabled. FMS Read-only G If enabled, the .FORM command is supported (RSX-11M-PLUS only). FULL-DUPLEX Read-only G If enabled, the full-duplex terminal driver is available. GLOBAL Enabled L Symbols of the form $xxxx are placed in a global symbol table. LOWERCASE Enabled L Indirect is not sensitive to the case of commands or strings. MCR Enabled L Commands not processed by Indirect are passed to the default CLI for the terminal. QUIET Disabled L Comments and CLI commands are displayed on the terminal. SUBSTITUTION Disabled L String substitution is not performed before command line evaluation. TIMEOUT Enabled G The timeout parameter of .ASKx commands is processed. TRACE Disabled G Commands processed by Indirect are not displayed on the terminal. TRUNCATE Disabled G Truncate errors on a .READ command are not ignored. DATA Disabled L Input lines are written to an open data file. OVERFLOW Disabled L Allows signed numeric operations that would normally cause under- or overflow errors. 2 .DEC #DEC 2 DEC Decrement the value of a numeric symbol by one. Format example: .DEC I 2 .DELAY #DELAY 2 DELAY Delay the execution of an indirect command file for a specified period of time. The argument is a decimal number of time units followed by the character H, M, S, or T (for hours, minutes, seconds, or ticks respectively). Format example: .DELAY 10S ! Delay 10 seconds 2 .ERASE #ERASE 2 ERASE .ERASE GLOBAL Deletes all global symbols from the symbol table. .ERASE LOCAL Deletes all local symbols defined in the current block from the symbol table. .ERASE SYMBOL global-name Erases the single symbol 'global-name' from the global symbol table. 2 .GOTO #GOTO 2 GOTO Branches to a label. Format example: .GOTO ERROR .EXIT 1 .ERROR: ; Warning, error encountered. 2 .GOSUB #GOSUB 2 GOSUB Saves the location of the next Indirect command and branches to a label identifying a subroutine. Upon execution of a .RETURN command, control returns to the next command line following the .GOSUB command. Any parameters to the right of the label and to the left of a comment are transferred to the local symbol COMMAN. The value of COMMAN can then be parsed to obtain formal call parameters. Format examples: .GOSUB DCB .GOSUB BLDTBL DB,2,176450,210 !Build device table For the second example, the following command line will separate the call parameters: .PARSE COMMAN "," DEVICE COUNT CSRADR VECADR 2 .IF #IF 2 IF .IF - Determines whether or not a symbol satisfies one of several possible conditions. .IFACT/.IFNACT - Determines whether or not a task is active. .IFDF/.IFNDF - Determines whether or not a symbol is defined. .IFINS/.IFNINS - Determines whether or not a task is installed in the system. .IFLOA/.IFNLOA - Determines whether or not a device driver is loaded. .IFT/.IFF - Determines whether a logical symbol is true or false. .IFENABLED/.IFDISABLED - Determines whether an Indirect operating mode is enabled or disabled, or whether an environmental condition is met. Legal options are: MCR, TRACE, DELETE, CONTROL-Z, GLOBAL, SUBSTITUTION, LOWERCASE, ESCAPE, QUIET, TIMEOUT, FMS, FULL-DUPLEX, DECIMAL, LOCAL, ESCAPE-SEQ, TRUNCATE, POTASK, DISPLAY, ATTACH, DETACH, OVERFLOW Examples: .IF ADDRES = "14 GARBLE ROAD" .GOTO 10 .IFNACT PIP pip /li .IFDF DLG ; Long dialog .IFNINS PIP ins $pip/inc=20000/task=...pip .IFNLOA MM: loa mm: .IFT START .GOTO START .IFDISABLED QUIET PRI *.LST 2 .INC #INC 2 INC Increment the value of a numeric symbol by one. Format example: .INC I 2 .LABEL: #LABEL: 2 LABEL: Assigns a name to a line in the command file so that the line can be referenced. For example: .GOTO CLNUP ! Jump to clean-up routine . . .CLNUP: ! Beginning of clean-up code Labels that are placed alone on command lines are called Direct Access. Indirect remembers the exact location of these labels, and they can be used to decrease search time for .GOTO and .GOSUB directives. 2 .ONERR #ONERR 2 ONERR Defines a label to branch to upon detecting an error condition. The scope of the label is limited to the current BEGIN-END block or to the currently open command file, whichever is appropriate. Format example: .ONERR ERRSRV ! Define the label for a .GOTO ERRSRV ! ...operation in case of error Once an error condition has occurred, another .ONERR label must be defined to re-enable error processing. 2 .OPEN #OPEN 2 OPEN .OPEN [#channel_number] filename Creates an output file on the indicated channel. Format examples: .OPEN DATA.DAT .OPEN returns the FCS-11 status code for the operation in the special symbol . Alternative forms .OPENA and .OPENR are described below. .OPENA [#channel_number] filename If the indicated file exists, opens it for an append operation. If the file does not exist, a new file is created in the same manner as for .OPEN. .OPENA returns the FCS-11 status code for the operation in the special symbol . .OPENA #3 DB4:DATALOG.LST .OPENR [#channel_number] filename Opens the indicated file for a read operation by means of the .READ command. .OPENR returns the FCS-11 status code for the operation in the special symbol . .OPENR #3 DB4:DATALOG.LST 2 .PARSE #PARSE 2 PARSE Strings can be parsed into substrings with the .PARSE command. The command line is in the form: .PARSE ... The string is decomposed into substrings as specified by the control string. The substrings are stored in the specified variables. The first character of the control string delimits the first substring, the second character of the control string delimits the second substring, and so on. The last character of the control string is repeated if the number of destination variables exceeds the length of the control string. If there are more variables specified than substrings, the additional variables are set to be null strings. If there are fewer variables than parsable substrings, the last variable contains the unparsed fragment of . The symbol contains the actual number of substrings processed (including explicit null substrings). For an example, type HELP INDIRECT PARSE EXAMPLE 3 EXAMPLE An example of using the .PARSE command is: .PARSE COMMAN " ," FILE A1 A2 A3 A4 A5 Given that COMMAN contains "TESTFILE IND,MCR,,LOA", the results would be: FILE= TESTFILE A1= IND A2= MCR A3= Null A4= LOA A5= Null would contain a 5. Note that the explicit null substring is counted in . 2 .PAUSE #PAUSE 2 PAUSE Stop Indirect from processing to allow user action. Indirect displays the command line you must enter to resume Indirect operation. Format: .PAUSE 2 .READ #READ 2 READ Files can be opened and read by using the following commands: .OPENR [#file] Open a file for reading. .READ [#file] Read next record into specified string variable. After a .READ, true if end-of-file encountered, false if not. Contains the FCS-11 error code if an error ocurred on the .READ operation. For more information, type HELP INDIRECT READ DETAILS For an example, type HELP INDIRECT READ EXAMPLE 3 DETAILS To read from a data file, the file must first be opened successfully using the .OPENR command. Records can then be read using the .READ command until either is set to true or returns an error code. When processing is complete, the file should be closed using a .CLOSE command. The .OPENR command has the same format as the .OPEN and .OPENA commands, and also sets the special variables , , and . The .READ command is similar in format to the .DATA command, except that, instead of having as its argument the text to be written out to a file, the argument is a string variable. The entire record is written into the string variable. If an error occurs while reading a file, the variable is unchanged from its previous state. The variable is set by the .READ command. This means specifically that its state is unknown following an .OPENR command. If an end-of-file has occurred, both and are set to indicate the end-of-file. 3 EXAMPLE The following indirect command file routine lists a file on the terminal: .OPENR FILE .IF NE 1 .GOTO ERROR .LOOP: .READ A .IFT .GOTO DONE .IF NE 1 .GOTO ERROR ; 'A' .GOTO LOOP .DONE: .CLOSE 2 .RETURN #RETURN 2 RETURN Effects an exit from a subroutine and returns to the command line immediately following the corresponding .GOSUB subroutine call. Format: .RETURN 2 .STOP #STOP 2 STOP Immediately stop command file execution, optionally specifying the exit status for the Indirect task. The .STOP command is synonymous with the logical end-of-file command (/). Format example: .STOP 1 2 .SET #SET 2 SET .SETN variable numeric-expression .SETD variable .SETO variable Define or redefine a numeric symbol and assign it a specific numeric value. The .SETO and .SETD directives change the default radix of the variable to be octal or decimal respectively. .SETS variable string-expression Defines or redefines a string symbol and assigns the symbol a specific ASCII-character string value. .SETT variable .SETF variable .SETL variable logical-expression Define or redefine a logical symbol and assign the symbol a true or false value. Examples: .SETN NUM COUNT*2 .SETS ADDRES "14 GARBLE ROAD" .SETT MALE .SETL FLAG FLAG!NEWERR 2 .TEST #TEST 2 TEST The .TEST command is used to determine the symbol type and return a type code in . If the symbol is a string, the command tests the length of the string or locates a substring. Format examples: .TEST ADDRES .IF GT 20. ; Length of response too long .TEST ADDRES "STREET" ! Look for the string "STREET" in the string ! ...contained in ADDRESS. .IF = 0 .GOTO NOTFND ! = the character position ! where "STREET" begins. If the variable being tested is a string, then the following symbols are set to reflect characteristics about the string: , , , If the variable being tested is numeric and octal, then the following symbol is set to reflect the symbol radix: See also HELP INDIRECT TESTDEVICE TESTPARTITION TESTFILE 2 .TESTDEVICE #TESTDEVICE 2 TESTDEVICE Allows a command file to acquire information about any device in the system. The returned data, including error indication, is found as a string in . For example: .TESTDEVICE MP: This command obtains information about the indicated device and returns a string in the string symbol . The various fields can be isolated with the .PARSE or .TEST substring directives. The string is in the following format: DB3:,140210,4405,31276,1000,atr,atr,...,atr, where: DB3: is the translated device name for "MP:" The next four parameters are the four device-characteristics words in octal notation "atr" are various device attributes from the following list: NSD "No such device" is configured in this system LOD The device driver is loaded UNL The device driver is not loaded ONL The device is on-line OFL The device is off-line MTD The device is a mountable volume and is mounted NMT The device is not mountable or is not mounted FOR The device is mountable and mounted foreign NFO The device is not mountable or not mounted foreign PUB The device is a public device NPU The device is not a public device ATT The device is attached to another task ATU The device is attached to this copy of Indirect NAT The device is not attached ALO The device is allocated to another terminal ALU The device is allocated to this terminal NAL The device is not allocated See also HELP INDIRECT TEST TESTPARTITION TESTFILE 2 .TESTPARTITION #TESTPARTITION 2 TESTPARTITION Allows a command procedure to obtain information about the current or any other partition in the system. It can be used to verify that a partition is of sufficient size before an INSTALL command is issued or that it is present before special systems are loaded. The syntax of the directive is: .TESTPARTITION partition-name where "partition-name" is any one- to six-character legal partition name. If the character "*" is found, then it is assumed the reference is to the same partition in which this version of Indirect is executing. The returned data is in the form: partition-name,base in 32-word units,size in 32-word units,type, If the partition is not found, the error ,,,NSP, (No such partition) is returned. For example: .TESTPARTITION GEN ;'' might show: ;GEN,1500,2303,SYS, The partition type is SYS for system-controlled, USR for user-controlled, or NSP for an unknown partition. See also HELP INDIRECT TEST TESTDEVICE TESTFILE 2 .TESTFILE #TESTFILE 2 TESTFILE Determines if a specific file exists or the translation of assigned devices. The format of the command line is: .TESTFILE filespec The output of the command is contained in the and special symbols. returns the fully qualified file specification and returns the FCS status code from the look-up. (For more information on these special symbols, type HELP INDIRECT FILE.) If no file name is included in the file specification, only device translation is performed. If a file name is included, the specified file is searched for and the fully qualified file specification returned in . For several examples, type HELP INDIRECT TESTFILE EXAMPLES See also HELP INDIRECT TEST TESTPARTITION TESTDEVICE 3 EXAMPLES An example of using the .TESTFILE command for logical device translation: .TESTFILE TI: Returns: = 1. = TT10:.DAT;0 An example of using the .TESTFILE command for file information: .TESTFILE MP:IND.MAP If the file exists: = 1. = DR1:[101,300]IND.MAP;6 If not: = 230. = DR1:[101,300]IND.MAP;0 2 FILE After a .TESTFILE, .OPEN, .OPENA, .OPENR, or .DATA operation, the two special symbols and are returned. is a string symbol that contains the fully qualified file specification. is a decimal numeric symbol that contains the status code resulting from the previous operation. The code will be one of the following: 1. Operation was successful. negative word Operation failed; code is an operating-system error code. postitive word Operation failed; code is a file-system error code. but negative lower bye For example, the error code -1. means "Insufficient dynamic storage", while 230. (-26. as a byte) means "No such file." For a complete listing of all error codes, see the IAS/RSX-11 I/O Operations Manual. 2 .WAIT #WAIT 2 WAIT Wait for a specified task to finish executing or get exit status from a previously completed task that was started with the .XQT directive. Format examples: .WAIT PAYROL .WAIT PIP ! Wait for the copy of PIP running ! ...on this terminal to complete 2 .XQT #XQT 2 XQT Initiate a task, pass a command line to it, and then continue indirect command file processing. Format example: .XQT MAC TEST,TEST=TEST In this case, use the .WAIT MAC command line to verify that the MAC task has completed and exited. 2 ACCOUN is a string symbol that contains certain accounting information from the user's RSX-11M-PLUS accounting block. On RSX-11M or if accounting is not running on M-PLUS, this symbol returns a series of commas with null entries. The string returned is in the following format: User_name,Session_id,Account_number,CPU,DIR,QIO,TAS,Active_tasks, User_name The first 14. characters of the user name as it appears in the system account file followed by the first initial Session_id The three-letter session-ID code followed by the unique login number Account_number The user's account number as it appears in the system account file CPU CPU ticks used since login DIR Total system directives issued since login QIO Total QIO directives issued since login TAS Total tasks run since login Active_tasks Current count of active tasks The individual fields can be isolated with the .PARSE command: .PARSE "," NAME SID ACNT CPU DIR QIO TAS ACT JUNK Note that since double precision arithmetic is not available in Indirect, these count values cannot be converted to numeric form and manipulated in arithemetic expressions. 2 ALPHAN is a logical symbol TRUE if last response to a .ASKS query was an alphanumeric string; else FALSE. is also set by a .TEST command. 2 ALTMOD is a logical symbol set TRUE if last question was answered with an ALTmode or ESCape; else FALSE. 2 BASLIN is a logical symbol set TRUE if the current operating system is a baseline configuration. This option is used by DIGITAL system generation procedures to determine what resources are available for the SYSGEN process. 2 CLI is a string symbol set to "MCR", "DCL", or another 1- through 6-character CLI name, depending on the current command line interpreter for the terminal. 2 CONFIG is a string symbol that contains the build-time parameters and values for the current running version of Indirect. 2 DATE is a string symbol set to the current date. The date is in the format dd-mmm-yy. 2 DEFAUL is a logical symbol set TRUE if the answer to the last question was defaulted; else FALSE. 2 EOF is a logical symbol set to if the last .READ command resulted in reading past the end of the file. If you type a CTRL/Z in response to a .ASKx command and Control-Z mode is .ENABLEd, then is also set to . Format example: .READ #3 nxtlin .IFT .GOTO END 2 ERRCTL is a numeric symbol that controls Indirect processing upon encountering an error. It is treated as an 8-bit mask with bits 0 through 7 set to indicate that the user's .ONERR target routine will process that class of error. If the bit is clear, Indirect exits after printing the error information. The eighth bit (the sign bit or 200 octal) is used to control whether Indirect will print any indication of an error. If the bit is set, no error information is printed. The initial default value for is 1, which implies that only class 1 errors can be handled with an .ONERR address and that error messages will be printed. You are cautioned about indiscriminate use of this mask because debugging a command file becomes very difficult. Refer to HELP INDIRECT ERRORS for a list of error messages and their assigned class values. If you attempt to trap errors other than default class 1, note that processing cannot continue in most cases. The error service routine is limited to a fatal error message and .EXIT. The internal state of Indirect is unknown in all but class 1 error cases. 2 ERRNUM After processing an error, Indirect places in the error number associated with the error. This value can be used for error-type-specific processing in an .ONERR routine. See HELP INDIRECT ERRORS for a list of error messages and their assigned numbers. 2 SEVERE #ERROR 2 SUCCES #ERROR 2 WARNIN #ERROR 2 ERROR The five symbols below are defined as a convenience for determining the exit status of a command. Their values are: = 0 = 1 = 2 = 4 = 17 Note that a user or program can encode more than just the low-order 3 bits of the exit status. If this is the case, a comparison in the following form will not always succeed: .IF = .GOTO CONTIN In this case, the appropriate bits must be masked in order to isolate the reserved success/fail status field of the exit status. A general form is .IF = &7 .GOTO CONTIN 2 ERRSEV After processing an error, Indirect places in the error severity mask associated with the error. This bit mask corresponds with the bits of the mask used to control Indirect error processing. 2 ERSEEN is a logical symbol that takes the value if any of the following conditions are true: 1. < 0 if a negative error code was returned 2. (&7) .GT. 1. if an exit status value worse than was returned 3. is TRUE 4. is non-zero 5. If you have specifically used the command line .SETT If you use the command line .SETF , the following side effects are noted: 1. is set to 0 2. is set to 0 3. is set to 4. is set to 0 2 ESCAPE is a logical symbol set TRUE if last question was answered with an ESCape or ALTmode; else FALSE. 2 EXSTAT is a numeric symbol that contains the exit status value as set by the last exiting task or by the .EXIT command. warning = 0 = success = 1 = error = 2 = severe error = 4 = no status = 17 = For more information, type HELP INDIRECT ERROR. 2 EXSTRI is a string symbol used to return string results from a more deeply nested command file to the calling command file. To allow controlled return of values from a nested file, the symbol can be set with a string value. In a fashion similar to , the string value is propagated back to the CALLING file. Examples: ! @deeperfile param1 param2 param3 ! .sets result OR ! .gosub maktab ! .sets switch For an extended example, please refer to: HELP INDIRECT ADVANCED Note that is set to null when Indirect waits for the completion of a task. 2 FALSE is a logical literal symbol used in comparisons with other logical symbols to determine if they have a false value. 2 FILERR After a .TESTFILE, .OPENx, or .READ statement, contains the FCS-11 or I/O driver status code resulting from the operation. These codes are documented in the RSX-11M/M-PLUS I/O Drivers Reference Manual. For an extended example of code translation to messge strings, see HELP INDIRECT ADVANCED. 2 FILER2 contains the FMS error code that was returned from the last .FORM directive issued. 2 FILATR The special symbol returns the 7 words of file-attribute information contained in the FCS-11 File Descriptor Block. The data is from the FDB used in the last preceding .OPENx operation. Refer to the IAS/RSX-11 I/O Operations Manual for a description of file attributes and the values of each field. 2 FILSPC The string symbol contains the fully qualified specification for the file referred to with the last .OPENx or .TESTFILE directive operation, or in the last specification for a nested command file. Examples: .SETS CMDSPC ! Save the name of "this" command file .TESTFILE TI: .SETS TERMIN ! Get the name of "this" terminal 2 FORATT is a numeric symbol that contains the octal value of the file attributes used in opening all data files. This symbol can be reset with the .SETN directive to allow foreign-attribute files to be written. 2 FMASK is a string symbol that contains the octal value of the three system feature mask words, separated by commas to allow easy parsing by the .PARSE directive. 2 IAS #RSX11D 2 LIBUIC is a string symbol set to the UIC containing nonprivileged utility tasks; format is [g,m]. This special symbol has a meaningful value on RSX11M-PLUS systems only. The string symbol is a constant with the value of [1,54] for RSX11M systems. 2 LOCAL is a logical symbol set to TRUE if the terminal from which Indirect is executing ("TI:") is flagged by the terminal driver as a local terminal. 2 LOGDEV is a string symbol equal to the device name and unit number of the user's login account. This value is available only on systems supporting the multiuser SYSGEN option; otherwise, is set with "SY0". 2 LOGUIC is assigned the login UIC for the current user. In systems without multiuser protection, is assigned the current default UIC. 2 MAPPED is a logical symbol set to TRUE if the current system supports memory management; else FALSE. 2 MEMSIZ is a numeric symbol assigned the size of memory in K words (1K = 1024.). 2 NETUIC is a string symbol that contains the value of the UIC/DIRECTORY string used on the system volume to hold the DECnet tasks. This symbol is used with the and symbols to separate and manage the components of your system. (Meaningful on RSX11M-PLUS systems only). 2 NETNOD is a string symbol that contains the name of this system in a DECnet network. 2 NOSTAT is a numeric literal symbol that is used in comparisons to determine if a value returned from a task was an actual valid exit status. 2 NUMBER is a logical symbol used to verify that the last string entered in response to an .ASKS directive or tested in the last .TEST directive contains only numeric characters. An empty string also sets to . 2 NXTSYM is a unique string/operation symbol used in the utility library procedure INDDMP to display the current contents of the local and global symbol tables. 2 OCTAL is a logical symbol set to TRUE if the numeric answer to the last .ASKN command or the value of the symbol tested in the last .TEST command is octal. If the .TEST command referenced a string and only the numeric characters 0 through 7 were found in the string, is set to TRUE. 2 PRIVIL is a logical symbol set to TRUE if the current user is privileged. 2 RAD50 is a logical symbol set to TRUE if the last string tested or typed in response to a .ASK question contained only characters in the Radix-50 character set; else FALSE. 2 RSX11D and are logical symbols set to TRUE if the current system is RSX-11D or IAS; otherwise, it is set to FALSE. 2 SPACE is a numeric symbol set to the number of free bytes left in the symbol table. This value does not include symbol table space that could be gained by a later automatic extension of the Indirect task. 2 STRLEN is a numeric symbol set by the .TEST command to the length in bytes of the tested string. Upon initial entry into Indirect, contains the count of valid parameters passed in the command line. 2 SYDISK is a string symbol set to the system disk mnemonic. There is no associated unit number (see ). 2 SYMTYP As a result of a .TEST command, contains a numeric code indicating the type of symbol tested. The values returned are: Logical = 0 Numeric = 2 String = 4 2 SYSDEV is a string symbol that contains the physical device specification of the system boot device. 2 SYSID is a string symbol that contains the 1- through 6-character operating system baselevel number. 2 SYSTEM is a numeric symbol set with the value 1 if the system is RSX-11M or 6 for RSX-11M-PLUS. 2 SYSUIC is a string symbol set to the current system UIC; format is [g,m]. 2 SYUNIT is a numeric symbol set to the unit number of the system device. See . 2 TIME