AT. -- INDIRECT FILE PROCESSOR The indirect command file processor provides BATCH like capabilities for controling taskbuilds and routine processes. It is sufficiently complex that is is practically a program language. Any MCR command appearing in the command file will be executed if the terminal's privlege allows it to do so. Directives (commands to ...AT.) can be used to control the logic flow of MCR commands, input data from the user's terminal, and create files for future use. A command file is started by @filename.ext/sw where .cmd is the default extension and a number of switches may be used. Specific HELP on the use of AT. may be obtained with the keywords. DIRECTIVE [LIST , name] EXPRESSIONS [NUMERIC , STRING] LABEL PARAMETER_PASSING SYMBOLS [LOGICAL , NUMERIC , STRING , SUBSTITUTION] SWITCHES 2 LABEL Any statement in an indirect command file, may have a label. This label is used as a reference point to branch back to or to jump to(.GOTO, .ONEROR, .GOSUB). A label may contain only alphanumeric characters and a $. Lables may be from 1-6 characters long and are followed by a colon, :, and must be preceded by a period (.). Labels may be declared as direct access labels by placing them on lines by themselves. This enables very fast jumps to a label for frequently used lables. 2 PARAMETER-PASSING Parameters may be passed on a command line. If a command of the form ; @cmdfil Parm1 Parm2....Parm9 is issued, Parm1 through Parm9 will appear in variables P1 through P9. P0 will contain '@cmdfil' and 'COMMAN' will contain the entire command line(in case you want to reparse it). 2 DIRECTIVE 3 LIST LABEL Define a lable .ASK Ask operater a YES/NO question. .ASKN Ask operator for numeric value. .ASKS Ask operator for string value. .CHAIN filename Close current file, and start executing new one. .CLOSE Close an open output file. .DATA Send a single line of data to a secondary file .DEC Decrement numeric symbol by 1. .DELAY Delay execution for specified time. .DISABLE Disable substitution, data, global symbol,lowercase or escape recognition. .ENABLE Enable substitution, data, global symbol,lowercase, or escape recognition. .ERASE Erase LOCAL or GLOBAL symbols. .EXIT [status] Exit from level of indirect file and set status. .GOTO Goto the specified lable .GOSUB Goto a subroutine. .IF Determine if symbol,or string expression meets one of several possible conditions. .IFACT/.IFNACT Determine if task is active or not active on TI: .IFDF/.IFNDF Determine if a symbol is/is not defined .IFINS/.IFNINS Determine if a task is installed. .IFLOA/.IFNLOA Determine if a driver is loaded. .IFT/.IFF Determine if a logical symbol is True or False. .INC Increment a numeric symbol. .ONERR Branch to a label if error detected. .OPEN #N FILESPEC Open a file for write output .OPENA #N FILESPEC Open a file for write APPEND output .OPENR #n FILESPEC Open a file for reading. .PARSE Parse a string variable .PAUSE Pause for operator action. .READ #N stringvar Read one ASCII line into the string variable .RETURN Return from subroutine. .SETT/.SETF Set logical symbol True/False. .SETN Set value of numeric symbol .SETS Set value of string symbol. .STOP [status] Exit from ...AT. and optionally set status. .TEST string sym Test length and character type of string symbol. .TESTFILE filespec Test a file for existance. .WAIT Wait for specified task to exit. .XQT Start a task but do not wait for it to complete. 3 .ASK Three forms are available to ask a question and wait for a reply. They are, .ASK, .ASKN, .ASKS. For HELP with .ASKN, or .ASKS try HELP AT. DIRECTIVE .ASK [.ASKN, or .ASKS]. .ASK Ask a question and wait for reply .ASK ssssss txt-string where: ssssss = 1 - 6 character symbol to be assigned a true/false value. txt-string = any ascii string of characters preceeded by a blank. The processor recognizes only 4 answers to a .ASK directive. 1. Y - set symbol ssssss to true. 2. N - set symbol ssssss to false. 4. - set symbol false. 4. - set special logical symbol to true if and only if escape recognition has been enabled. 4 .ASKN .ASKN Ask for definition of Numeric symbol. .ASKN ssssss txt-string .ASKN[low:high] ssssss txt-string .ASKN[::def] ssssss txt-string .ASKN[low:high:def] ssssss txt-string (brackets are required syntax) Where: low:high = inclusive limits for response. Octal assumed unless a decimal point present. def = the default value. ssssss = the 1 to 6 character symbol to be assigned a value. 4 .ASKS .ASKS ask for a definition of a string symbol .ASKS ssssss txt-string .ASKS [Low:high] ssssss txt-string (brackets required syntax) where: ssssss = 1-6 character symbol to be assigned to a value. txt-string = any ascii string of characters preceded by at least one blank. low:high = the inclusive limit for he numbetr of characters response string. 3 .CHAIN .CHAIN Continue processing using another file. Closes the current indirect file and erases all local symbols and then opens a new command file(however data files not closed). format: CHAIN filespecifier/SW where /SW is one of the switches /DE, /TR, /MC 3 .SETT .SETT/.SETF Set a symbol True or False .SETT ssssss or .SETF ssssss where: ssssss is a 1-6 charachter logical symbol being set. 3 .SETN .SETN Set Symbol to Numeric Value .SETN ssssss numexp where: ssssss = 1-6 character numeric symbol numexp = a numeric expression(no embedded blanks or tabs allowed). 3 .SETS .SETS Set Symbol to STring Value .SETS ssssss strexp where: ssssss = 1-6 character string symbol strexp = any string expression 3 .INC .INC Increment a Numeric Symbol .INC ssssss Increment the symbol ssssss by 1. 3 .DEC .DEC ssssss Decrement a numeric symbol by one. .DEC Decrement a Numeric Symbol 3 .IF .IF ssssss relop-expr Command Test if symbol meets specified conditio where: ssssss = 1-6 character symbol name relop = one of the following relational operators 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 expr = expression of same type as symbol Command = indirect file processor command(.GOTO, etc) MCR command, etc. .IF clauses may be combined into elaborate tests using the logical operators .OR and .AND to combine various types of IF clauses. Further types of IF clauses may be found by typing HELP AT. DIRECTIVE .IF [.IFACT, .IFDF, .IFINS, .IFLOA, or .IFT] 4 .IFACT .IFACT/.IFNACT Test if task is active(not active) .IFACT tttttt Conditional Command Execute Conditional Command if task tttttt is active. .IFNACT tttttt Conditional COmmand Execute Conditional Command if task tttttt is not active. 4 .IFDF .IFDF/.IFNDF Test if Symbol is Defined(not defined) .IFDF symbol Conditional Command .IFNDF symbol Conditional Command 4 .IFINS .IFINS/.IFNINS Test if task is installed(not installed) .IFINS tttttt Conditional Command .IFNINS tttttt Conditional Command 4 .IFLOA .IFLOA/.IFNLOA Test if Driver is Loaded .IFLOA dd: Conditional Command .IFNLOA dd: Conditional Command 4 .IFT .IFT/.IFF Test if condition is true or false .IFT logical-symbol Conditional Command .IFF logical-symbol Conditional Command 3 .TEST .TEST Test String Symbol Length .TEST ssssss where ssssss is a string symbol. The .TEST directive places the length of the string into , and sets the special logical symbols and according to the type of characters in ssssss. 3 .DELAY .DELAY Delay execution for a specified period of time. .DELAY nnu where: nn = Number of time units to delay. u = T - tics; S - seconds; M - minutes; H - hours. The value of nn is taken to be octal if no decimal point (.) is present. 3 .WAIT .WAIT Wait for a Task to Finish Execution .WAIT tttttt where tttttt is the task name. If tttttt is omitted the task name defaults to TTnn, where nn is the nymber of the user's terminal. 3 .PAUSE .PAUSE Pause for operator action. The operator must type UNSTOP tttttt where tttttt is the name of the indirect file processor task active at TI: to start .AT going again. 3 .GOTO .GOTO label Branch to a labelwhere label is any of the labels in the command file. 3 .GOSUB .GOSUB label Jump to subroutine whose starting point is marked with the label. When a .RETURN is encountered, return to the next statement following the .GOSUB. 3 .RETURN .RETURN Return to the next statement following the last .GOSUB. 3 .ONERR .ONERR label If an error in the logic, syntax, data entry, etc. is detected in .AT. , goto the label last specified by the .ONERR directive. 3 .OPEN .OPEN [#N] filename (brackets not part of syntax) Where file name is name of file to be created, N specifies which of 4 possible files(0-3) may be open. If omitted, .OPEN defaults to zero. The default extension for the file name is .DAT. 3 .OPENA .OPENA [#N] filename (brackets not part of syntax) Where filename is the name of a file to be opened for append, and where N specifies which of 4 possible files(0-3) is to be opened. If N is omitted, .OPENA defaults to 0. If no 'filename' does not exist it is created. The default extension name is .DAT. 3 .OPENR [#N] filename (brackets not part of syntax) Exactly like the normal .OPEN directive with the IMPORTANT distinction that the file is opened for READ. A file opened for READ can be read using the .READ directive. 3 .READ .READ [#N] stringvar (brackets not part of syntax) The .READ command reads in one ASCII data line from the command file into the string variable 'stringvar'. The file must have been opened with a .OPENR directive. If the end of file is reached on a .READ, is set to be true. 3 .TESTFILE filspec The .TESTFILE directive executes an FCS .PARSE on the file specifier. The FCS error code is returned to the variable . If the file exists = 1. Any other values mean something is wrong and the ambitious programer can get out the I/O operations manual and find out what. .TESTFILE can be used for finding out the physical device assigned to a logical device; ie a .TESTFILE TI: will return the string TTn: to the string variable . 3 .PARSE .PARSE stringvar control-string OS1 OS2 OS3 .... OSN The .PARSE command is the most complicated of all of AT.'s directives. It will take an initial string(stringvar) and parse it into N substring variables. The parsing is controled by a control string which contains from 1 to (N-1) characters which are to be used as delimiters for parsing the input string. If there are fewer than (N-1) control characters, the last control character is used for all the rest of the delimiters. Control characters may be any character but typically are spaces punctuation marks, etc. The format for the control string can be any of: a quoted string, a string expression, a string variable. no string may be longer than 80 bytes long. The first output string gets from the start of 'stringvar' up to the first delimiting character. The second output string gets from right after the first delimeter up to the second. The last output string gets from after the last delimiter up to the end of the input string. 3 .CLOSE .CLOSE [#N] Close the specified output file(file 0 if #N is omitted. 3 .DATA .DATA [#N] text-string Output a line of data to the file open on channel #N. 3 .XQT Command line Start up a task without waiting explicitly for it to finish. 3 EXIT .EXIT status The .EXIT directive is provided for leaving a block in a structured fashon. When a .EXIT is encountered, a scan is done for the next .END which is then executed and the current level of the indirect command file processor is exited. is set according to the 'status' variable. 3 .STOP The .STOP directive sets the status for the exit of the task ...AT. .STOP status 3 .ENABLE Specific HELP may be requested on .ENABLE SUBSTITUTION .ENABLE QUIET .ENABLE DATA .ENABLE LOWERCASE .ENABLE GLOBAL .ENABLE ESCAPE 4 LOWERCASE If the command .ENABLE LOWERCASE has been issued, values entered at the terminal in response to a .ASKS are not converted from lowercase to uppercase. 4 DATA If the command .ENABLE DATA #N is given, all lines following the .ENABLE DATA are output to the secondary file. 4 GLOBAL If global symbols have been enabled(.ENABLE GLOBAL), then global symbols will be preserved across chain boundaries. 4 QUIET If .ENABLE QUIET is issued and the system has Parent/Offspring tasking, MCR commands will cease to print out on TI: 4 SUBSTITUTION Substitution must be enabled if one is to substitute an input parameter into a command string. 4 ESCAPE If escape sequence recognition is recognized, the logical symbol will be set true if the answer to a .ASK, .ASKS, or .ASKN is answered with an ESCAPE. 3 .END #.BEGIN 3 .BEGIN .BEGIN/.END blocks are used for defining symbols only within the block defined by the .BEGIN and .END directives. All local symbols defined within the block will be undefined after the next .END is encountered. All local symbols defined outside the block are defined within the block and retain their definitions after the next .END. An .ERASE LOCAL command erases only those local symbols within the block. No .GOTO may branch into or out of a block but, .GOTO's may branch across nested blocks. A .GOSUB saves the current block context and scans down the file looking for the first occurance of the subroutine lable Any intervening .BEGIN's or .END's are ignorred. The .RETURN directive restores the block context. 3 .ERASE The directive .ERASE LOCAL or .ERASE GLOBAL erases(removes from the symbol table) all LOCAL or GLOBAL symbols respectively. If the .ERASE LOCAL directive is issued from within a .BEGIN / .END block, only those local symbols defined within the block are erased. 3 .DISABLE .DISABLE DATA [#N] .DISABLE GLOBAL .DISABLE LOWERCASE .DISABLE ESCAPE Undoes whatever was done with the .ENABLE commands. 2 SYMBOLS There are three symbol types: LOGICAL, STRING, NUMERIC. A Logical symbol may be either true or false. A String symbol may have up to 80 ASCII characters. A Numeric symbol is assigned a value in the range of 0-65535(10) and may be defined as either decimal or octal. In addition a symbol may be either local or GLOBLE. A local symbol, is erased when a command file is chained to from another. However, the value of globlal symbols are preserved. If global symbols have been enabled (.ENABLE GLOBAL), then symbols preceeded by a $ become global symbols. 3 LOGICAL True if the last querry was answered with a single escape. True if answer to last numeric querry was defaulted. True if last string entered via .ASKS or tested with .TEST contains only alphanumeric characters. True if last string entered via .ASKS or tested with .TEST contains only RADIX-50 characters(alphanumeric characters plus . and $). True if system is mapped. True if the last .READ directive encountered the End Of File (EOF). 3 NUMERIC Memory size in K words. Assigned the value of 0,1,2, or 4 depending on the exit status from the last MCR command executed or from the last .WAIT tskname directive where 'tskname' was activated by the .XQT directive. This special numeric symbol is modified at the completion of a synchronous MCR command or at the completion of a .WAIT directive. The value is returned from the task that has completed if the task exits with status. Otherwise the value is returned rom MCR. The values 0,1,2 and 4 indicate 0 Warning 1 Success 2 Error 4 Severe error Unit number of system device (SY:). Length of string entered via .ASKS, or tested with .TEST. Contains the last FCS error code for opening/closing a file. Success =1. Operating system type. RSX11M = 1 RSX11M+ = 6 3 STRING Device mnemonic of system device(SY:). Current UIC. System UIC. System LBUIC The date in form DD-MMM-YY.