HP 3000 Manuals

Command Interpreter Access and Variables Programmer's Guide : COPYRIGHT NOTICE [ Command Interpreter Access and Variables Programmer's Guide ] MPE/iX 5.0 Documentation


Command Interpreter Access and Variables Programmer's Guide


900 Series HP 3000 Computer Systems Command Interpreter Access and Variables Programmer's Guide HP Part No. 32650-90011 Printed in U.S.A. Edition Fourth Edition E0494
________________________________________________________________________ |The information contained in this document is subject to change | |without notice. | | | |Hewlett-Packard makes no warranty of any kind with regard to this | |material, including, but not limited to, the implied warranties of | |merchantability or fitness for a particular purpose. Hewlett-Packard | |shall not be liable for errors contained herein or for direct, | |indirect, special, incidental or consequential damages in connection | |with the furnishing or use of this material. | | | |Hewlett-Packard assumes no responsibility for the use or reliability | |of its software on equipment that is not furnished by Hewlett-Packard.| | | |This document contains proprietary information which is protected by | |copyright. All rights are reserved. Reproduction, adaptation, or | |translation without prior written permission is prohibited, except as | |allowed under the copyright laws. | ________________________________________________________________________ Copyright (c) 1994 by Hewlett-Packard Company ________________________________________________________________________ |Use, duplication, or disclosure by the U.S. Government is subject to | |restrictions as set forth in subparagraph (c) (1) (ii) of the Rights | |in Technical Data and Computer Software clause at DFARS 252.227-7013. | |Rights for non-DoD U.S. Government Departments and agencies are as set| |forth in FAR 52.227-19 (c) (1,2). | | | |Hewlett-Packard Company | |3000 Hanover Street | |Palo Alto, CA 94304 U.S.A. | ________________________________________________________________________ Restricted Rights Legend Printed 1994 Printing History The following table lists the printings of this document, together with the respective release dates for each edition. The software version indicates the version of the software product at the time this document was issued. Many product releases do not require changes to the document. Therefore, do not expect a one-to-one correspondence between product releases and document editions. Edition Date Software Version --------------------------------------------------------------------------------------- First Edition November 1987 A.01.00 First Edition Update 1 July 1988 A.10.00 Second Edition April 1990 A.40.00 Third Edition June 1992 B.40.00 Fourth Edition April 1994 C.50.00 Preface MPE/iX, Multiprogramming Executive with Integrated POSIX, is the latest in a series of forward-compatible operating systems for the HP 3000 line of computers. In HP documentation and in talking with HP 3000 users, you will encounter references to MPE XL, the direct predecessor of MPE/iX. MPE/iX is a superset of MPE XL. All programs written for MPE XL will run without change under MPE/iX. You can continue to use MPE XL system documentation, although it may not refer to features added to the operating system to support POSIX (for example, hierarchical directories). Finally, you may encounter references to MPE V, which is the operating system for HP 3000s, not based on PA-RISC architecture. MPE V software can be run on the PA-RISC (Series 900) HP 3000s in what is known as compatibility mode. This manual provides a programmer's view of the command interpreter (CI) and its programming capabilities. Through command files and user-defined commands (UDCs), the programmer can develop scripts to accomplish many system-oriented tasks simply and efficiently. This manual presents these capabilities and examples of their use in the following sequence: Chapter 1, "Introduction," describes the CI and how it is viewed by all system users. It further describes the unique attributes that make it especially useful to programmers. Chapter 2, "Accessing the Command Interpreter," presents the various methods of invoking commands. It describes command files and UDCs in detail. Chapter 3, "Setting and Manipulating Variables," describes user-defined variables and predefined variables. It details the methods of setting and modifying any variable, as well as creating, naming, and deleting user-defined variables. Chapter 4, "Evaluating Expressions," describes the expression evaluator and its numerous functions. It provides examples of performing arithmetic and bit operations, and evaluating strings and file characteristics. Chapter 5, "Using Language Constructs Available with the CI," presents key functions that provide variations in receiving input and delivering output. It provides the basis for conditional branching and looping structures. Chapter 6, "Accessing Variables and CI Commands in Applications," describes the intrinsics that provide communication between application programs and built-in CI commands, command files, and UDCs. Chapter 7, "Sample Command Files," provides samples of actual command files offer suggested uses of many of the CI functions. A short description of each points out some of the key processing techniques that can be accomplished with the CI. Chapter 8, "Command Input/Output Redirection (CIOR)," describes how to define different files for command input and command output. Two appendixes provide lists of commonly used predefined variables and evaluator functions. Detailed explanations of all predefined variables, evaluator functions, and CI commands can be found in the MPE/iX Commands Reference Manual (32650-90003). Conventions UPPERCASE In a syntax statement, commands and keywords are shown in uppercase characters. The characters must be entered in the order shown; however, you can enter the characters in either uppercase or lowercase. For example: COMMAND can be entered as any of the following: command Command COMMAND It cannot, however, be entered as: comm com_mand comamnd italics In a syntax statement or an example, a word in italics represents a parameter or argument that you must replace with the actual value. In the following example, you must replace filename with the name of the file: COMMAND filename bold italics In a syntax statement, a word in bold italics represents a parameter that you must replace with the actual value. In the following example, you must replace filename with the name of the file: COMMAND(filename) punctuation In a syntax statement, punctuation characters (other than brackets, braces, vertical bars, and ellipses) must be entered exactly as shown. In the following example, the parentheses and colon must be entered: (filename):(filename) underlining Within an example that contains interactive dialog, user input and user responses to prompts are indicated by underlining. In the following example, yes is the user's response to the prompt: Do you want to continue? >> yes { } In a syntax statement, braces enclose required elements. When several elements are stacked within braces, you must select one. In the following example, you must select either ON or OFF: COMMAND { ON } { OFF} [ ] In a syntax statement, brackets enclose optional elements. In the following example, OPTION can be omitted: COMMAND filename [OPTION] When several elements are stacked within brackets, you can select one or none of the elements. In the following example, you can select OPTION or parameter or neither. The elements cannot be repeated. COMMAND filename [ OPTION ] [ parameter] Conventions (continued) [...] In a syntax statement, horizontal ellipses enclosed in brackets indicate that you can repeatedly select the element(s) that appear within the immediately preceding pair of brackets or braces. In the example below, you can select parameter zero or more times. Each instance of parameter must be preceded by a comma: [,parameter][...] In the example below, you only use the comma as a delimiter if parameter is repeated; no comma is used before the first occurrence of parameter: [parameter][,...] |...| In a syntax statement, horizontal ellipses enclosed in vertical bars indicate that you can select more than one element within the immediately preceding pair of brackets or braces. However, each particular element can only be selected once. In the following example, you must select A, AB, BA, or B. The elements cannot be repeated. { A} |...| { B} ... In an example, horizontal or vertical ellipses indicate where portions of an example have been omitted. In a syntax statement, the space symbol shows a required blank. In the following example, parameter and parameter must be separated with a blank: (parameter) (parameter) The symbol indicates a key on the keyboard. For example, RETURN represents the carriage return key or Shift represents the shift key. CTRLcharacterCTRLcharacter indicates a control character. For example, CTRLY means that you press the control key and the Y key simultaneously.


MPE/iX 5.0 Documentation