System Software Library NonStop NET/MASTER NCL Reference Manual Abstract Part Number Edition Published Product Version Release ID Supported Releases This manual provides a complete description of the NonStop NET/MASTER Network Control Language (NCL). This manual is intended for all NonStop NET/MASTER users who write and maintain NCL procedures. 106126 First December 1994 NonStop NET/MASTER D30 D30.00 This manual supports D30.00 and all subsequent releases until otherwise indicated in a new edition.
Document History Edition Part Number Product Version Earliest Supported Release Published First 106126 D30 D30.00 December 1994 New editions incorporate any updates issued since the previous edition. A plus sign (+) after a release ID indicates that this manual describes function added to the base release, either by an interim product modification (IPM) or by a new product version on a .99 site update tape (SUT).
New and Changed Information The operating system for Tandem NonStop systems, formerly called the Guardian operating system, is now called the Tandem NonStop Kernel. This change reflects Tandem's current and future operating system enhancements that further enable open systems and application portability. The Sterling Software services to which NonStop NET/MASTER MS connects, formerly the product called NET/MASTER, is now referred to as the SOLVE management services.
New and Changed Information EMSCONT—The BKGCOLOR/BKGCOLOUR operand is new. FILE ADD—The UDB identifier can refer to a UDB pair. FILE CLOSE—The UDB identifier can refer to a UDB pair. FILE DEL—The UDB identifier can refer to a UDB pair. FILE GET—The PATH operand is new. The UDB identifier can refer to a UDB pair. FILE OPEN—The UDB identifier can refer to a UDB pair. FILE PUT—The UDB identifier can refer to a UDB pair. FILE SET—The UDB identifier can refer to a UDB pair.
New and Changed Information Section 6 Panel Control Statements This section has new and changed panel control statements, as follows: New Panel Control Statements The following panel control statements are new: #ALIAS #INCLUDE #TRAILER. Changed Panel Control Statement The following panel control statements have been changed: #FLD—The BKGCOLOR/BKGCOLOUR operand is new. The TYPE operand has an additional value, OUTVAR. #ERR—The BKGCOLOR/BKGCOLOUR operand is new.
New and Changed Information (This page left intentionally blank) vi 106126 Tandem Computers Incorporated
Contents About This Manual xxiii Notation Conventions Section 1 xxix Introduction to NCL NCL and Major NonStop NET/MASTER MS Services Operator Control Services (OCS) 1-1 Edit Services 1-2 User ID Management Services (UMS) 1-2 Inter-NET/MASTER Connection (INMC) 1-2 Remote Operator Control (ROC) 1-2 Inter-System Routing (ISR) 1-3 1-1 Operations Available Through NCL 1-3 Accessing Data in User Databases (UDBs) 1-3 Automating Operations 1-4 Communicating With NonStop NET/MASTER MS Users and Terminals 1-4
Contents GOSUB GOTO IF 2-24 2-27 2-30 ITERATE LEAVE NOP ON 2-32 2-34 2-36 2-37 PROCEDURE RESUME RETRY 2-43 2-49 2-51 RETSUB 2-53 RETURN 2-55 REVERT 2-57 SAY 2-59 SELECT 2-60 Format 1 2-60 Format 2 2-61 SIGNAL Section 3 2-64 Verbs Summary of Verbs 3-1 Frequently Occurring Operands ASSIGN 3-6 Format 1 Format 2 Format 3 Format 4 CMDLINE 3-22 CNMALERT 3-24 CNMCLEAR 3-27 CNMREAD 3-28 CNMSEND 3-34 CNMVECTR CONTROL viii 3-6 3-13 3-16 3-19 3-37 3-40 106126 Tandem Computers Incor
Contents DELAY DROP 3-47 3-48 EMSALERT 3-50 EMSCONT EMSDEL 3-53 3-58 EMSREAD 3-60 EMSSEND 3-65 EVENTTD 3-67 FILE ADD 3-69 FILE CLOSE 3-73 FILE DEL 3-75 FILE GET 3-78 FILE OPEN 3-87 FILE PUT 3-90 FILE PUTGET FILE SET 3-95 3-100 INTCLEAR INTCMD 3-103 3-105 INTCONT 3-107 INTREAD 3-110 LOCK 3-115 LOGCONT LOGDEL 3-120 3-122 LOGREAD 3-123 MSGCONT 3-127 MSGDEL 3-131 MSGREAD NRDDEL OCS 3-132 3-137 3-138 PANEL 3-139 PANELEND PARSE 3-144 PAUSE 3-148 3-143 106126 T
Contents PSEND CLOSE 3-152 PSEND OPEN 3-153 PSEND SEND 3-156 PSEND SET QEXIT 3-160 3-162 SECCALL ADD 3-163 SECCALL CHANGE 3-165 SECCALL CHECK 3-167 SECCALL DELETE 3-168 SECCALL EXIT 3-169 SECCALL GET 3-172 SECCALL QUERY 3-174 SECCALL UPDATE START 3-175 3-177 SWGUID 3-184 VARTABLE ADD 3-186 VARTABLE ALLOC 3-190 VARTABLE DELETE VARTABLE FREE 3-195 3-199 VARTABLE GET 3-201 VARTABLE PUT 3-208 VARTABLE QUERY VARTABLE RESET 3-213 3-216 VARTABLE UPDATE WRITE Section 4 3-
Contents BOOLEXPR C2B 4-26 C2D 4-27 C2X 4-28 CENTER 4-12 4-29 COMPARE COPIES 4-30 4-31 D2C 4-32 D2X 4-33 DATATYPE DATE 4-34 4-36 DATECONV DELSTR 4-38 4-40 DELWORD E2A 4-41 4-42 INSERT 4-44 JUSTIFY 4-46 LASTPOS LEFT 4-48 4-50 LENGTH LOWER 4-51 4-52 MASKCHK MAX 4-55 MIN 4-56 4-53 NAMTONOD NEXTFILE 4-57 4-58 NEXTSVOL 4-60 NODTONAM NOYES 4-62 NULL0 4-63 OVERLAY POS 4-61 4-64 4-66 QUOTE 4-67 106126 Tandem Computers Incorporated xi
Contents RANDOM REMSTR 4-69 4-70 REVERSE RIGHT 4-72 SELSTR SIGN 4-71 4-73 4-74 SPACE 4-75 SSIDTOTEXT STRIP 4-76 4-77 SUBSTR 4-79 SUBWORD SYMBOL 4-81 4-82 TEXTTOSSID TIME 4-83 4-84 TRANSLATE TRUNC 4-88 TYPECHK UPPER 4-86 4-89 4-92 VALDEV1 4-93 VALDEV2 4-94 VALFILE1 4-95 VALFILE2 4-96 VALFILE3 4-97 VALPROC1 4-99 VALPROC2 4-100 VARSUB VERIFY WORD 4-101 4-103 4-105 WORDINDEX 4-106 WORDLENGTH WORDPOS WORDS X2C xii 4-107 4-108 4-110 4-111 106126 Tandem Computers
Contents X2D 4-112 XRANGE Section 5 4-113 ZFEATURE 4-114 ZNCLKWD 4-115 System Variables Summary of System Variables &SYS.ALLPARMS 5-8 &SYS.CURS.COL 5-10 &SYS.CURS.FLD 5-11 &SYS.CURS.POS 5-12 &SYS.CURS.ROW 5-13 &SYS.DATE.DAY 5-14 &SYS.DATE.n 5-15 &SYS.DOM.ID 5-17 &SYS.ERROR.CODE 5-18 &SYS.ERROR.COLUMN &SYS.ERROR.COND &SYS.ERROR.FILE 5-19 5-20 5-21 &SYS.ERROR.KEYWORD &SYS.ERROR.LIB 5-3 5-22 5-23 &SYS.ERROR.LINE 5-24 &SYS.ERROR.NAME 5-25 &SYS.ERROR.PROCNAME 5-26 &SYS.
Contents &SYS.ERROR.VALUE2OK &SYS.FDBK 5-36 5-37 &SYS.FILE.ERROR &SYS.FILE.ID 5-38 5-39 &SYS.FILE.KEY 5-40 &SYS.FILE.PATH &SYS.FILE.RC 5-41 5-42 &SYS.FILE.RCNT 5-44 &SYS.GUID.GROUP &SYS.GUID.USER &SYS.INKEY 5-45 5-45 5-46 &SYS.INT.REQ# 5-48 &SYS.INT.RSP# 5-49 &SYS.INTYPE 5-50 &SYS.LASTLOGON.DATE 5-51 &SYS.LASTLOGON.TIME 5-51 &SYS.LASTLOGON.LOGITERM 5-52 &SYS.LASTLOGON.PHYSTERM 5-52 &SYS.LOCK.MSG &SYS.LOOPCTL &SYSMSG 5-53 5-54 5-55 &SYS.NATIVE.INKEY 5-57 &SYS.NCL.
Contents &SYS.NNM.RELDATE 5-67 &SYS.NNM.VERSION 5-68 &SYS.NODE.NAME &SYS.NODE.NUM 5-68 5-69 &SYS.OCS.ID and &SYS.OCS.IDO 5-70 &SYS.OS.GENERIC and &SYS.OS.SPECIFIC &SYS.PANEL.ERRORC 5-72 &SYS.PANEL.ERRORH 5-73 &SYS.PANEL.FKEYC &SYS.PANEL.FLD 5-74 5-75 &SYS.PANEL.ID 5-76 &SYS.PANEL.INPHIC 5-77 &SYS.PANEL.INPLOC 5-78 &SYS.PANEL.INPUTH 5-79 &SYS.PANEL.INPUTP 5-80 &SYS.PANEL.LABELC 5-81 &SYS.PANEL.MODFLD 5-82 &SYS.PANEL.OUTHIC 5-84 &SYS.PANEL.OUTLOC 5-85 &SYS.PANEL.
Contents &SYS.TERM.EXTCO 5-97 &SYS.TERM.EXTHI 5-98 &SYS.TERM.NAME 5-99 &SYS.TERM.ROWS 5-100 &SYS.TERM.TYPE &SYS.TIME 5-101 5-102 &SYS.USER.AUTH 5-102 &SYS.USER.ID 5-103 &SYS.USER.LC 5-104 &SYS.USER.MODE 5-105 &SYS.USER.PWSTATE &SYS.VARCNT 5-105 5-106 &SYS.WINDOW.COLS 5-107 &SYS.WINDOW.NUMBER &SYS.WINDOW.OCS 5-108 &SYS.WINDOW.REAL &SYS.WINDOW.
Contents Message Text 7-11 Prefix Information 7-12 PPO Information 7-14 Resource Information Source Information Section 8 7-17 SPI Information 7-20 User Map Name 7-20 User MDO 7-16 7-20 Compiler Operation The Compilation Process 8-1 Lexical Elements of NCL 8-1 Analysis of Lexical Elements Symbols 8-4 Quoted Strings 8-5 Special Characters 8-8 Comments 8-9 Labels 8-10 8-1 Statement Analysis 8-10 Terminating and Continuing a Statement Determining Statement Type 8-11 8-10 Compiler Directi
Contents Section 9 Variables An Overview of Variables 9-1 The Variable Character Set Data Length 9-2 Name Length 9-2 Data Storage 9-2 9-1 Variable Name Syntax 9-2 Simple Variables 9-2 Complex Variables 9-4 Stem Variables 9-6 Compound Variables 9-7 Nested Variables 9-8 Variable Name Substitution 9-10 Substitution and Determining the Value of a Variable Simple Variable Substitution 9-11 Complex Variable Substitution 9-11 Stem Variable Substitution 9-13 Compound Variable Substitution 9-13 Nested Variable S
Contents Using Parentheses in Expressions 10-6 Using Parentheses to Alter Evaluation Order 10-6 Using Parentheses to Clarify an Expression 10-6 Using Parentheses When Referring to a Function 10-6 Arithmetic Operators and Expressions Arithmetic Operators 10-8 Arithmetic Expressions 10-12 10-8 Relational Operators and Expressions Relational Operators 10-14 Relational Expressions 10-15 10-14 Boolean Operators and Expressions Boolean Operators 10-16 Boolean Expressions 10-16 10-16 Concatenation Operator
Contents Specifying a Range of Variables Using ARGS 11-18 Multiple Variable Assignment Using ASSIGN 11-19 Assigning Source Data to Target Variables 11-19 Assigning Values From One Range to Another 11-20 Assigning Values Using Prefixes and Suffixes 11-22 Deleting Variables Using DROP 11-25 Using PARSE and SEGMENT 11-25 Using the PARSE Keywords 11-25 Using the SEGMENT Keyword 11-26 Using the PARSE Verb 11-27 Glossary Glossary–1 Index Figures Index–1 Figure 1. Tables Table 2-1.
Contents Table 7-3. PPOCNTL.Control.Flags Table 8-1. Illegal Characters Table 8-2. Rules For Delimiting Lexical Elements Table 8-3. Symbol Characters 8-4 Table 8-4. Special Characters 8-8 Table 8-5. Compiler Directives 8-12 Table 9-1. Variable Characters 9-1 Table 9-2. System Variables That You Can Update Table 10-1. Precedence of Operators Table 10-2. Arithmetic Operators in Order of Precedence Table 10-3. Simple Relational Operators Table 10-4.
Contents (This page left intentionally blank) xxii 106126 Tandem Computers Incorporated
About This Manual Network Control Language (NCL) is a structured, high-level language, supplied with NonStop NET/MASTER Management Services (MS). NCL is a comprehensive and advanced development tool that can be used to implement the specific requirements of your installation. The NonStop NET/MASTER NCL Reference Manual is designed to give you a complete description of NCL constructs. This manual should be used in conjunction with the NonStop NET/MASTER NCL Programmer's Guide.
About This Manual How This Manual Is Organized Section 5, “System Variables,” lists and describes each system variable in alphabetic order, with syntax, considerations, and examples. System variables provide access to system-related information. Section 6, “Panel Control Statements,” lists and describes each panel control statement in alphabetic order, with syntax, considerations, and examples. Panel control statements are used in panel description files to control how a panel is displayed and processed.
About This Manual How to Use This Manual How to Use This Manual This manual contains a section for each of the following NCL constructs: core statements, verbs, built-in functions, system variables, panel control statements, and message profile variables. The first page of each section has a summary of the type of NCL construct described. Then there is an outline of the section, followed by a list of the topics discussed in the section.
About This Manual Where to Go for More Information Where to Go for More This manual is part of the NonStop NET/MASTER MS manual set. Figure 1 shows Information the functional breakdown of the NonStop NET/MASTER MS manual set and its relationship to other Distributed Systems Management (DSM) manuals.
About This Manual Documentation Road Map Figure 1.
About This Manual Documentation Road Map (This page left intentionally blank) xxviii 106126 Tandem Computers Incorporated
Notation Conventions General Syntax Notation UPPERCASE LETTERS The following list summarizes the notation conventions for syntax presentation in this manual. Uppercase letters indicate keywords and reserved words; enter these items exactly as shown. Items not enclosed in brackets are required. For example: MAXATTACH lowercase italic letters Lowercase italic letters indicate variable items that you supply. Items not enclosed in brackets are required.
Notation Conventions General Syntax Notation Ellipsis ... An ellipsis immediately following a pair of brackets or braces indicates that you can repeat the enclosed sequence of syntax items any number of times. For example: M address-1 [ , new-value ]... [ - ] {0|1|2|3|4|5|6|7|8|9}... An ellipsis immediately following a single syntax item indicates that you can repeat that syntax item any number of times. For example: "s-char...
1 Introduction to NCL The NonStop NET/MASTER Network Control Language (NCL) is a structured, highlevel language supplied with NonStop NET/MASTER Management Services (MS) and integrated with other NonStop NET/MASTER MS services. This section introduces NCL. It explains where NCL fits in with major NonStop NET/MASTER MS services and describes some of the operations available through NCL.
Introduction to NCL NCL and Major NonStop NET/MASTER Services Edit Services Edit Services is the NonStop NET/MASTER MS service that provides access to the Tandem text editor, PS Text Edit (TEDIT). Edit Services allows NCL programmers to create and check NCL procedures and panel description files. For more information on Edit Services, refer to the NonStop NET/MASTER MS Operator’s Guide.
Introduction to NCL Operations Available Through NCL Inter-System Routing (ISR) ISR is the NonStop NET/MASTER MS service that enables, disables, and controls system-level message flow between multiple NonStop NET/MASTER MS systems and multiple users of the SOLVE management services. EMSPROC is the major system-level NCL procedure that gathers messages from remote systems according to the established ISR definitions.
Introduction to NCL Operations Available Through NCL An NCL process can read records from, and write records to, an Enscribe file created from NonStop NET/MASTER MS or, by using a user-defined map, an Enscribe file created by an external application. This feature helps to integrate Tandem NonStop Kernel processes with NonStop NET/MASTER MS processes. The NonStop NET/MASTER NCL Programmer's Guide contains information about how to create and use user-defined maps.
Introduction to NCL Operations Available Through NCL Communicating With Pathway Server Classes An NCL process can act as a PATHSEND requester to communicate with existing Pathway server classes. It can send a request message to the server class and receive a reply message from the server class. A server process typically controls access to a database. A requester process typically makes requests of a server process: for example, to add, update, or delete records in a database.
Introduction to NCL Operations Available Through NCL Executing Distributed Systems Network Management (DSNM) Commands You can execute DSNM commands from an NCL process. This includes the standard set of DSNM commands in addition to others supported only by NonStop NET/MASTER MS. This allows you to start and stop objects from an NCL process. You can write an NCL procedure to automatically monitor objects. For more information on DSNM commands, refer to the User’s Guide to DSNM Commands.
2 Core Statements Core statements in an NCL procedure cause an action to occur. The action can change the structure and flow of an NCL procedure. You can use core statements in any part of a procedure. This section describes all core statements in NCL. The full description of each statement contains: A brief overview of what the statement does. A diagram showing the syntax of the statement. Descriptions of each operand of the statement. Considerations affecting the use of the statement.
Core Statements Summary of Core Statements Summary of Core Table 2-1 contains a list and a brief description of all core statements. For a detailed Statements description of each statement, see the entry for that statement in this section. The entries are arranged in the same order as they appear in this table. Table 2-1. List of Core Statements Core Statement Description Assignment Statement CALL CMD DO Assigns the value of an expression to a specified variable.
Core Statements Assignment Statement Assignment Statement The assignment core statement assigns the value of an expression to a specified variable. variable = [ expression ] variable specifies a valid variable reference, including the initial variable designator (&). Complex, compound, and nested variables are evaluated to generate a final simple variable name. You can assign a value to the following system variables: &SYS.RETCODE, &SYS.PANEL.SKIP, and &SYS.LOOPCTL.
Core Statements CALL CALL The CALL core statement calls an NCL procedure. Arguments can be passed to the called procedure. You can either share or not share variables with the called procedure by specifying the variables in a list (share list). The called procedure executes sequentially in the context of the caller. That is, NCL suspends the caller until the called procedure completes. The CALL statement interacts with other core statements, such as DO, GOSUB, ON, and PROCEDURE.
Core Statements CALL expr specifies an expression that equates at run time to the name of an NCL procedure. expr must represent a valid NCL procedure name. The search sequence followed is: Note 1. Internal procedure label 2. External procedure name If the label or procedure is not found, NCL generates a run-time error. However, if the FINDRC operand of the CONTROL verb is specified in the calling procedure, NCL sets the &SYS.RETCODE system variable to 100.
Core Statements CALL &stem-variable.[*] specifies a stem variable, in which * can be any combination of characters that can legitimately form a variable name. CALLER specifies that the list of variables currently specified in the calling environment replaces this keyword. NO specifies that no sharing of variables is permitted. NOSHARE specifies whether the current variable-sharing status is to be overridden for this function call and whether variable sharing is not to be enabled.
Core Statements CALL Considerations If the called procedure is not found, NCL generates a LOADFAIL_ERROR. If the FINDRC operand of the CONTROL verb is specified, and a called procedure is not found, NCL sets an error return code of 100 in the &SYS.RETCODE system variable instead of generating the error. See Section 3, “Verbs,” for a description of the CONTROL verb. The LOADFAIL_ERROR indicates a failure to load a procedure or function.
Core Statements CMD CMD The CMD core statement initiates a NonStop NET/MASTER MS command in the current processing environment. The responses from the command are delivered to the owner of the NCL process, not to the initiating process. There are two such owner processing environments: primary and background. In the primary environment, responses go to the OCS window. In the background environment, responses go to all users profiled to receive a monitor-class message.
Core Statements CMD For a discussion of NCL execution environments, refer to the NonStop NET/MASTER NCL Programmer's Guide. See also the following verbs in Section 3, “Verbs”: CONTROL, INTCLEAR, INTCMD, INTCONT, and INTREAD. The CMDSEP operand of the CONTROL verb allows you to initiate multiple commands, which are separated by semicolons, as shown in the second example later in this description. INTCMD issues commands in the dependent processing environment.
Core Statements DO DO The DO core statement brings multiple statements together for execution either once, repeatedly, or not at all. Statements within a DO group form an active group when they are executing. A DO group is sometimes referred to as a “block.” When a DO statement begins executing, it is said to “open a block.” Inner procedure, subroutine, and function definitions are not permitted within DO groups. This means that GOSUB and CALL target labels are not permitted within DO groups.
Core Statements DO Note A target label is one that is the object of a CALL, GOTO, GOSUB, FUNCTION, or SIGNAL core statement. repetitor specifies one of three mutually exclusive formats for the repetitive execution of a DO group. repetitor uses its own set of operands and an internal counter to control the number of repetitions of the DO group. The syntax of repetitor is: control-variable specifies a variable that controls the execution of the iterative DO loop.
Core Statements DO exprr specifies a value containing the number of times you want the DO group to execute. exprr must be zero or a positive integer. If exprr starts with a variable name followed by an equal sign (=), the first control variable format is assumed unless you enclose the expression in parentheses (). conditional executes a DO group under the control of one or more conditional expressions. NCL can test these expressions before or after each DO loop, or both.
Core Statements DO If an iterative DO statement has a control variable (such as expri, exprb, exprt, exprf, or exprr) or any iteration control expressions, the result of evaluating these expressions must be stored and used during loop iteration processing. The target control variable is tested and assigned the current iteration value once in each iteration of the loop.
Core Statements DO See GOSUB, GOTO, ITERATE, and LEAVE. The GOSUB and GOTO core statements have some restrictions in transferring to labels within DO groups. The ITERATE and LEAVE core statements can pass control out of a DO group. Examples The following example is a simple iterative DO group.
Core Statements DO The following example is similar to the previous example, but uses the UNTIL keyword instead of the WHILE keyword.
Core Statements END END The END core statement ends a DO group, or a FUNCTION, PROCEDURE, or SELECT statement. Omitting an END statement after a DO group, or after a FUNCTION, PROCEDURE, or SELECT statement, generates a compilation error. Specifying a label name with the END statement is optional; if used, the label must be identical to the label name of the core statement it ends.
Core Statements EXIT EXIT The EXIT core statement ends the current procedure and returns control to the caller. EXIT also terminates all DO, GOSUB, and ON nesting for the calling procedure. You can use the EXIT statement to return a value to the &SYS.RETCODE system variable. An exit from an ON block is treated as an exit from the procedure that established the ON block. This implies that all procedure and function nesting between the establishing procedure and the active ON block is terminated.
Core Statements FLUSH FLUSH The FLUSH core statement immediately terminates an NCL process. This statement flushes all nested levels in the process and acts as an unconditional end. Processing returns to the initiator of the process. A process can consist of one or more executable procedures. You can have nested calls to different procedures at various levels within a process; however, only one of the procedures within the process can be executing at any one time.
Core Statements FUNCTION FUNCTION The FUNCTION core statement declares a user-written function. A function performs a task and returns a single result. The result of a function effectively replaces the expression (function reference) that called the function. NCL distinguishes between three different types of functions: external functions, internal functions, and built-in functions.
Core Statements FUNCTION label specifies the function. You must specify at least one label for a function. If this is an external function definition (the FUNCTION statement is the first statement in the file), NCL treats the label(s) attached to this function as extra, internal labels for the function. These labels are visible only to statements within the same source file. The external name of an external function is the name of the containing source file. label can have any valid symbol value.
Core Statements FUNCTION NO specifies that no sharing of variables is permitted. NOSHARE specifies whether the current variable-sharing status is to be overridden for this function call and whether variable sharing is not to be enabled. If this operand is not specified, NCL uses the setting of the [NO]SHRVARS operand of the CONTROL verb. share-list specifies one or more variables that are to be shared, or not shared, with the function. The CALLER keyword can be part of the list.
Core Statements FUNCTION Considerations Functions save the caller's DO, GOSUB, and ON statuses. Any error conditions triggered by a function determine the current ON block for that condition. ON blocks can be defined within a function. (The ON core statement, described later in this section, defines an ON block.) For a full discussion of the sharing of variables between NCL procedures and functions, refer to the NonStop NET/MASTER NCL Programmer's Guide. See also the CONTROL verb in Section 3, “Verbs.
Core Statements FUNCTION The following example shows a procedure that contains a function definition. This procedure displays five pairs of literal strings, typed in by the user at an OCS window or supplied from another calling procedure. The ASSIGN verb uses the VARS operand to invoke the GETIT function, to return the pairs of strings.
Core Statements GOSUB GOSUB The GOSUB core statement registers the current position in the procedure (the statement after the GOSUB), then branches to the statement at a specified label. The label must not be in a DO group. The label must be in the same scope as the current procedure or function. Unlike a GOTO statement, the GOSUB statement does not deactivate DO groups. To resume processing at the point after the GOSUB statement, you must use the RETSUB core statement.
Core Statements GOSUB You can use the LIMIT keyword to stop an unsuccessful search from reaching the end of a procedure or function, or from wrapping around to the beginning of a procedure or function. This stops a search from finding a label with the same name as the target label elsewhere in the procedure or function. If you specify the LIMIT keyword, limit-expr must be either a constant or an expression that equates to a constant.
Core Statements GOSUB Considerations The GOSUB statement records the procedure position within the current DO nesting environment. The DO nesting level is then cleared. This allows new DO groups to be nested. A GOTO statement within a GOSUB subroutine clears only the nesting levels of DO groups initiated within the GOSUB. The &SYS.LOOPCTL system variable has a default setting of 1000; this value decrements by 1 each time a GOSUB statement is executed.
Core Statements GOTO GOTO The GOTO core statement unconditionally transfers control to a label within a procedure or function. Execution restarts at a user-specified label. GOTO label [ LIMIT limit-expr ] [ MATCH { EQ | GE | GT | LE | LT | NE } ] label specifies a label. label must be a constant label or an expression that equates to a legal label name without the trailing colon (:).
Core Statements GOTO MATCH specifies the comparison to be performed between the label being searched for and the statement labels. By default, NCL expects an exact match, both in length and in value. MATCH has the following qualifiers: Note In the following comparisons, the collating sequence for sorting ASCII characters is used. In general, numerals sort before uppercase letters, which sort before lowercase letters.
Core Statements GOTO A GOTO statement out of an ON block causes that ON block to be terminated. It also terminates any intermediate procedure or function that called the procedure or function that established the ON block. This can include other established and activated ON blocks. It might not be possible to determine, when the procedure is compiled, the exact number of ON blocks that would be released. (The ON core statement, described later in this section, defines an ON block.) The &SYS.
Core Statements IF IF The IF core statement evaluates an expression and selects an execution path based on the outcome. The THEN keyword, which must be used with the IF statement, precedes the NCL statements that you want to execute if the expression is true. You can construct nested IF statements by pairing each ELSE clause with the innermost IF statement, as shown in the second example for this core statement. NCL treats the IF through ELSE statements as a block.
Core Statements IF See also DO and SELECT. The DO core statement extends the range of possible actions of the IF statement. The SELECT core statement provides you with an alternative to the IF statement for multiple path processing. Examples The following example executes one of two statements, depending on the value of the variable &1: APROC: PROCEDURE IF &1 = "YES" THEN SAY "&1 EQUALS YES" ELSE SAY "&1 DOES NOT EQUAL YES AND THE STATEMENT IS FALSE.
Core Statements ITERATE ITERATE The ITERATE core statement performs the next iteration of a repetitive DO group by logically passing control to the DO group’s END statement. The ITERATE statement terminates all blocks nested between the DO group whose label is specified in the ITERATE core statement (the target DO group) and the ITERATE statement itself.
Core Statements ITERATE Example The following example is a procedure called AGAIN. This procedure adds up random numbers supplied by the built-in function RANDOM. If the number obtained from RANDOM is not less than 50, the procedure issues an error message and gets another random number.
Core Statements LEAVE LEAVE The LEAVE core statement exits a repetitive DO group. Logically, this is the same as transferring to the NCL statement after the END statement that closes that DO group. The LEAVE statement also terminates any nesting within the active DO group and terminates any current ON blocks. If you use the LEAVE core statement in an ON block, it causes the termination of all intermediate active procedure and function calls, back to the time at which the ON block was established.
Core Statements LEAVE Example The following procedure increments the counter &A by 1, if the counter is less than a random number &B.
Core Statements NOP NOP The NOP core statement performs no action. It can be used to provide an ELSE path on an inner IF statement, thus allowing an outer ELSE path to be specified without superfluous coding. See the following examples of this core statement. NOP Consideration See also the IF core statement. You can use the NOP core statement within an IF statement as a no action path.
Core Statements ON ON The ON core statement establishes a routine to handle a run-time event. The event can be a run-time error, a user-specified condition, or a system-defined condition. A collection of one or more NCL statements that is executed whenever an event occurs is an “ON block.” An ON block is sometimes referred to as a “condition handler” or “error handler.” (For user-specified conditions, or events, see the SIGNAL core statement, described later in this section.
Core Statements ON Considerations If an event occurs and there is no ON block to handle it, NCL terminates the procedure with an error statement. Errors that occur when executing the NCL FILE verbs are an exception. Such errors are ignored if there is no user coded ON block, and the NCL procedure is resumed from the statement after the one that caused the error.
Core Statements ON Table 2-2 lists system-defined condition names and provides a description of their meaning. You can substitute any of these condition names for condition-name in an ON block. Refer to the NonStop NET/MASTER NCL Programmer's Guide for a detailed discussion of error handling in NCL. Table 2-3 gives a list of the NCL run-time error codes associated with each of these conditions. Table 2-2.
Core Statements ON Table 2-3 lists the system-defined condition (or error) names and the NCL error codes that generate the error. Table 2-3.
Core Statements ON Examples The following procedure named ONPROC has an error in it. The ON block (error handler) displays information that can help you find the error: ONPROC: PROCEDURE ON ERROR DO WRITE DATA="AN ERROR OCCURRED IN KEYWORD", &SYS.ERROR.KEYWORD, "of STATEMENT" &SYS.ERROR.STMT_NAME, "AT POSITION " &SYS.ERROR.STMT, "IN LINE " &SYS.ERROR.LINE RESUME END &COL=OOPS WRITE COLOR=&COL DATA="THIS IS TEST TEXT" END ONPROC The previous procedure displays: &SYS.ERROR.
Core Statements ON In the following example, an ON block is coded to specifically intercept or trap a user error condition by using the SIGNAL core statement: ONPROC: PROCEDURE ON USER_ERROR DO SAY "HERE IS THE USER ERROR" END SIGNAL USER_ERROR END ONPROC In the previous example, because there is no explicit action (such as including a RESUME, or an EXIT statement) taken in the ON block, the procedure terminates with an error code of 22.
Core Statements PROCEDURE PROCEDURE The PROCEDURE core statement indicates the start of a callable procedure. If this statement is the first executable statement in a source file, it declares the source file a procedure. If the first executable statement in a source file is not a PROCEDURE or a FUNCTION statement, NCL assumes it is a procedure. NCL interprets the name of the procedure as a single label, equal to the source file name; NCL also assumes a matching END statement for each such procedure.
Core Statements PROCEDURE SIMPLE splits parameters only on blank boundaries. Parameters are placed into the variables &1 through &n, where &n is the number of parameters supplied. SMART splits parameters using both blanks and commas. A valid quoted string preserves embedded blanks and commas. You can form a null parameter by using two adjacent commas (,,), or a null quoted string by using two adjacent quote marks ("").
Core Statements PROCEDURE &stem-variable.[*] specifies a stem variable, in which * can be any combination of characters that can legitimately form a variable name. CALLER specifies that the list of variables currently specified in the calling environment replaces this keyword. NO specifies that no sharing of variables is permitted. NOSHARE specifies whether the current variable-sharing status is to be overridden for this function call and whether variable sharing is not to be enabled.
Core Statements PROCEDURE statement specifies the NCL statement or statements that constitute the procedure. Execution flows through these statements until NCL encounters one of the following: An EXIT statement. Control returns to the caller. The &SYS.RETCODE system variable can also be set. A RETURN statement. The RETURN statement returns specified variables to the caller. The enclosing END statement. Control returns to the caller with the return of all shared variables.
Core Statements PROCEDURE See also CALL and RETURN. The CALL core statement allows you to specify certain options that affect the sharing of variables with a procedure. The RETURN core statement provides you with a method of augmenting any list of shared variables on returning from a procedure. For further information on the use of the FOLD and NOFOLD operands, and the SIMPLE and SMART operands, refer to the NonStop NET/MASTER NCL Programmer's Guide.
Core Statements PROCEDURE The following example shows how specifying the NO operand on a procedure declaration affects the sharing of variables: PROC3: PROCEDURE /* The NO keyword in the procedure definition */ &VAR_3 = 1 CALL CONTROL_PROC SHARE &VAR_3 CONTROL_PROC: PROCEDURE SHARE NO &VAR_3 = 2 END CONTROL_PROC SAY "Value for &VAR_3 is" &VAR_3 END PROC3 In the preceding example, the call to CONTROL_PROC attempts to share the variable &VAR_3, but the NO operand is specified on the called procedure’s PROCED
Core Statements RESUME RESUME The RESUME core statement returns control to the NCL line of code directly after the statement that caused an ON block to be executed. The RESUME statement terminates any execution environment established by the most recently executed ON block. This includes DO groups and calls to procedures or functions. If you attempt to issue a RESUME statement outside of an ON block, NCL generates a run-time error.
Core Statements RESUME Examples The following example shows the general method of coding an ON block (error handler) using the RESUME core statement: PROC1: PROCEDURE ON TESTERROR DO IF &SYS.ERROR.
Core Statements RETRY RETRY The RETRY core statement returns to and retries the statement that caused an ON block to be executed. The RETRY statement terminates any execution environment established after the start of the most recently executed ON block. (The ON core statement, described earlier in this section, defines an ON block.) This includes DO groups and calls to procedures, and functions. Like the RESUME core statement, RETRY is always located within an ON block.
Core Statements RETRY Example The following example retries the statement that generated the error condition (division by 0 (zero)). After testing the &SYS.ERROR.RETRYOK system variable to see if the error can be retried, the error is corrected and the statement retried: PROC1: PROCEDURE ON ERROR DO IF &SYS.ERROR.RETRYOK = 1 THEN DO &B=1 /* CORRECT THE ERROR */ RETRY END ELSE SAY "GOING ... GONE!" FLUSH END &A=10 &B=0 &C=&A/&B /* DIVIDE BY ZERO */ SAY " IT’S O.K.
Core Statements RETSUB RETSUB The RETSUB core statement returns to the statement after the most recently executed GOSUB statement in a procedure. A RETSUB deactivates any DO group opened since the most recently executed GOSUB statement. It does not replace the END statement of a DO group. A RETSUB statement also reinstates DO group nesting, active at the time of the GOSUB statement. If no GOSUB statement is active when RETSUB is issued, a run-time error results.
Core Statements RETSUB Examples The following example shows the result of executing a RETSUB statement from a routine called SUBTASK: GOGOGO: PROCEDURE SAY "STARTING A GOSUB" GOSUB SUBTASK SAY "&SYS.RETCODE = " &SYS.RETCODE EXIT SUBTASK: SAY "THIS IS THE START OF THE SUBROUTINE" DO &A=20 END RETSUB &A END GOGOGO In the preceding example, the effect is to set the &SYS.RETCODE system variable in the SUBTASK subroutine and then exit from the procedure GOSUB.
Core Statements RETURN RETURN The RETURN core statement returns from a called function or procedure. It can return from a procedure with the values of optionally specified variables. If you execute the RETURN statement in a function, you must enclose the expression in parentheses, as shown in the first example of this core statement. This value replaces the expression in the statement that called the function. You cannot pass any additional variables with this form of the RETURN statement.
Core Statements RETURN Examples The following example is a complete procedure named APROC, which calls another procedure named PROC1, then passes back the variables &1, &2, and &3. The variable &1 is displayed and has the value AA as supplied by PROC1: APROC: PROCEDURE CALL PROC1 (A, B, C) SAY "&1 = " &1 EXIT PROC1: PROCEDURE &1=AA RETURN &1, &2, &3 END PROC1 END APROC The following example shows how a result is returned from a function.
Core Statements REVERT REVERT The REVERT core statement releases (in the current block) the most recently executed ON block for the specified condition. This leaves unaffected any handler for the same condition in an outer block, because that handler now becomes the current handler. If there is no condition handler in the current block, REVERT behaves as a NOP statement. (The ON core statement, described earlier in this section, defines an ON block.
Core Statements REVERT Example In the following example, the REVERT statement releases the ON ERROR handler established in the FUNCTION core statement: PROC: PROCEDURE /* Top level error handler for ERROR */ ON ERROR DO SAY "We are in the top level error handler." SAY "This is the correct handler to be invoked." END SAY FUNC() FUNC: FUNCTION /* Nested error handler for ERROR */ ON ERROR DO SAY "We are in the nested error handler.
Core Statements SAY SAY The SAY core statement writes a message to a terminal’s OCS window or to the execution environment of the process. SAY [ expression ] expression specifies a character string that NCL displays in the execution environment (OCS window). If omitted, NCL displays a blank line. Considerations NCL truncates output from the SAY statement after 2047 characters. NCL replaces undisplayable characters with a period (.), except the null character (x’00’), which is displayed as a blank.
Core Statements SELECT SELECT The SELECT core statement selects one of several process paths, depending on the evaluation of a set of expressions. There are two formats for the SELECT core statement. In both formats, NCL generates a run-time error if, after evaluating the expressions, none of the expressions is true and no statement follows the OTHERWISE operand. You can intercept or trap this type of error in an ON block, but you cannot RETRY the SELECT core statement for this type of error.
Core Statements SELECT statement specifies any NCL statement or group of statements. statement can follow THEN, OTHERWISE, or both. NCL gives a compilation error if you provide an OTHERWISE operand without a matching statement. The NOP core statement is acceptable, following THEN or OTHERWISE. Consideration See also IF, which provides an alternative to the SELECT statement for conditionaltype processing. Example The following example executes specific procedures, depending on the value of &A.
Core Statements SELECT expression-2 specifies an expression that NCL evaluates and saves for later comparison with expression-3. expression-2 can be any valid NCL expression. See Section 10, “Expressions and Operators,” for a discussion of the evaluation of expressions that can equate to true or false conditions. STRICT specifies that the comparison between expression-2 and expression-3 is to be done using the strict equality operator, rather than the simple equality operator.
Core Statements SELECT Example The following example shows an NCL procedure called SELECTEP. This procedure uses the SELECT statement to evaluate the parameter entered when the procedure is executed. The procedure performs a simple test of equality.
Core Statements SIGNAL SIGNAL The SIGNAL core statement either generates a specified condition or transfers control to a specific label. SIGNAL { cond-expr | LABEL label } cond-expr generates a user-specified condition or a system condition. If a handler for the condition is active (has been created by an ON statement), control passes to the handler. The handler can be in an outer procedure. NCL checks the condition name cond-expr against the active condition handlers, as created by ON statements.
Core Statements SIGNAL See also GOSUB, GOTO, ON, RESUME, RETRY, and REVERT. The GOSUB and GOTO core statements search labels differently from the SIGNAL statement. The other four core statements are all relevant to condition and error handling. The ON core statement defines an ON block, which determines what you want to do for a specified condition or error. The RESUME core statement ignores the statement that generated the condition or error.
Core Statements SIGNAL (This page left intentionally blank) 2–66 106126 Tandem Computers Incorporated
3 Verbs An NCL verb is a keyword that denotes a specific action, such as creating a variable or generating a message. Some verbs require additional parameters known as operands. The CONTROL verb is a singular case in which the operands may modify NCL execution characteristics. This section describes the verbs that you can use in NCL. The full description of each verb contains: A brief overview of what the verb does. A diagram showing the syntax of the verb. Descriptions of each operand in the verb.
Verbs Summary of Verbs Table 3-1. List of NCL Verbs (Page 2 of 3) Verb Function EMSCONT Resumes normal processing of an EMS event message or redirects the event message to another system. Deletes an EMS event message. Receives the next EMS event message. Generates an event message from an NCL procedure to the EMS event collector. Retrieves EMS help information from a database. Adds a record to a file, pair of files, or to an operating system process.
Verbs Summary of Verbs Table 3-1. List of NCL Verbs (Page 3 of 3) Verb Function PAUSE Suspends processing of an NCL procedure until the operator requests that processing be continued or terminated. Makes a Pathway server class unavailable for use by an NCL process. Makes a Pathway server class available for use by an NCL process. Sends a request message to and receives a reply message from a Pathway server class.
Verbs Frequently Occurring Operands Frequently Occurring Five operands are used by many verbs: ARGS, PARSE, RANGE, SEGMENT, and Operands VARS. For your convenience and to avoid unnecessary repetition, this subsection describes common usage. Individual variations in usage appear in the description of the relevant verb. See also Section 11, “Verb Syntax and Variable Access Methods,” for more information on these operands. The ALIAS panel control statement also uses VARS and RANGE.
Verbs Frequently Occurring Operands VARS specifies a set of variables, as determined by the accompanying variable specification, input-vars-list, output-vars-list, or variable*: input-vars-list specifies a list of input variables. For the result of specifying too few or too many variables, see the relevant verb in which this operand is used. Multiple variables must be enclosed in parentheses and separated by commas. output-vars-list specifies a list of output variables.
Verbs ASSIGN ASSIGN The ASSIGN verb manipulates multiple variables in a single operation. There are four different syntax layouts for the ASSIGN verb: Format 1 ASSIGN OPT=VALUE Format 2 ASSIGN OPT={ MAPNAME | MAPELEMENTS | MAPFIELDS | MDOELEMENTS | MDOFIELDS | MDOCOUNTS } Format 3 ASSIGN OPT={ SETERR | RESETERR | SETMOD | RESETMOD SETOUT | RESETOUT } Format 4 ASSIGN OPT=MODFLD A discussion of each of these formats follows.
Verbs ASSIGN RANGE=( start,end ) determines the range of variables specified by the ARGS operand. See “Frequently Occurring Operands,” at the beginning of this section, for more information. MDO=variable-name specifies the name of the target MDO. MAP=map-name specifies the name of a map, which can be a user-defined map, to be used by the MDO. If you omit this operand, the map name of the source MDO is used.
Verbs ASSIGN RANGE=( start,end ) determines the range of variables specified by the VARS operand. See “Frequently Occurring Operands,” at the beginning of this section, for more information. BYNAME specifies that all existing target variables starting with the supplied prefix are to be updated with the contents of the matching FROM variable. The suffix of the target variables must match the suffix of the variables given in the variable* operand after the FROM operand.
Verbs ASSIGN DATA=rest-of-statement specifies a text string that you can use to replace the contents of one or more variables. If no text is supplied after the keyword DATA=, then NCL supplies a null value. Note DATA, if specified, must be the last keyword in this verb. FROM specifies which source variables you want to use for creating the target variables. After FROM, you must code one of the operands: ARGS, MDO, or VARS. These operands are described next. ARGS specifies a range of variables.
Verbs ASSIGN GENERIC specifies that the VARS=variable* operand acts as a modifier that you can use to select a range of currently existing variables with alphanumeric suffixes. NCL then sorts these variables in ascending order of suffix (numeric suffixes sort lower than alphabetic suffixes). This list becomes the input list for this format of the ASSIGN verb. See the final example at the end of the definition of the ASSIGN verb, in Format 1. Considerations For all functions, the &SYS.
Verbs ASSIGN Examples The examples following, in which the operand OPT=VALUE is the NCL default, show the use of Format 1 of the ASSIGN verb.
Verbs ASSIGN For each example that follows, the assumed initial values for the relevant variables are: &A1=xxx, &AB=yyy, &D2=zzz, and &DB=ABC. The following example performs the assignment &AB=&DB. The previous value of &AB was yyy; it becomes ABC. Other variables are unaffected: ASSIGN VARS=&A* BYNAME FROM VARS=&D* In the following example, the value of &AB remains unchanged (yyy), because it already exists. The nonexistent variable &A2 is newly created with the value zzz (the value of &D2).
Verbs ASSIGN Format 2 This format allows you to obtain information about mapped data objects (MDOs) and maps. ASSIGN OPT={ MAPNAME | MAPELEMENTS | MAPFIELDS | MDOELEMENTS | MDOFIELDS | MDOCOUNTS } { ARGS [ RANGE=( start,end ) ] | VARS={ output-vars-list | variable* } [ RANGE=( start,end ) ] } FROM MDO=variable-name OPT specifies that you want to obtain information about MDO variables and maps. MAPNAME specifies that you want NCL to return the name of the map being used by the supplied MDO operand.
Verbs ASSIGN MDOFIELDS specifies that you want the names of groups or fields within the actual MDO structure returned. MDOCOUNTS specifies that you want NCL to return the number of occurrences of the element, group, or field referred to by the MDO. ARGS specifies a range of variables. See “Frequently Occurring Operands,” at the beginning of this section, for more information. RANGE=( start,end ) determines the range of variables specified by the ARGS operand.
Verbs ASSIGN Examples The examples following show the use of Format 2 of the ASSIGN verb. The following example obtains the map of an MDO: ASSIGN OPT=MAPNAME VARS=&MDOMAP FROM MDO=&SOURCE. The following example obtains the names of defined elements in an MDO: ASSIGN OPT=MAPELEMENTS VARS=&ME* FROM MDO=&$INT.MSGATTR The following example determines the fields present in an MDO: ASSIGN OPT=MDOFIELDS VARS=&MF* FROM MDO=&$INT.MSGATTR.
Verbs ASSIGN Format 3 This format allows you to set or reset the ERROR, MODFLD, or OUTVAR attributes for one or more variables. The PANEL verb is an NCL verb that can set, and use ERROR, MODFLD, or OUTVAR attributes for a variable. See Section 6, “Panel Control Statements,” and a description of the PANEL verb, later in this section, for more information on panels.
Verbs ASSIGN SETOUT specifies that the target variables are to be given the attributes of an outvar field. A check of the field being changed is made, and if it has the current standard input field attributes, these attributes are switched to the corresponding standard output field attributes. See Section 6, “Panel Control Statements,” for a summary of the standard input and output field attributes. RESETOUT specifies that the target variables are to have the outvar attributes reset.
Verbs ASSIGN A variable retains the MODFLD attribute across many panel redisplays until it is reset by the use of &SYS.PANEL.MODFLD system variable, ASSIGN OPT=MODFLD, or a panel display that does not contain the variable. Null variables may be flagged as ERROR or MODIFIED. When using OPT=SETOUT to set output attributes for variables that are the subject of input field characters, CAPS, MODFLD, and ERRFLD processing is not done; also, NCL does not supply any fill characters.
Verbs ASSIGN Format 4 This format allows you to obtain the names of variables that have the MODFLD attribute, and place them in a list or range of variables. The &SYS.PANEL.MODFLD system variable points to the first variable name in a list that contains those variables that have had their content changed because of input from a panel, or because of using the NCL verb CNMVECTR. Such variables acquire the MODFLD attribute.
Verbs ASSIGN ARGS specifies a range of generated variables. See “Frequently Occurring Operands,” at the beginning of this section, for more information. RANGE=( start,end ) determines the range of variables specified by the ARGS operand. See “Frequently Occurring Operands,” at the beginning of this section, for more information. VARS output-vars-list specifies which variables are to be used.
Verbs ASSIGN VARS input-vars-list specifies the name(s) of the variable(s) for the sending list of the assignment operation. Multiple variables must be enclosed in parentheses and separated by commas. variable* specifies a set of input variables. See “Frequently Occurring Operands,” at the beginning of this section, for more information. RANGE=( start,end ) determines the range of variables specified by the VARS operand.
Verbs CMDLINE CMDLINE The CMDLINE verb writes the specified text from an NCL process to an Operator Control Services (OCS) command input line. Any command text of 255 characters or less can be written and the cursor positioned to any location within that text. CMDLINE is ignored if it is used within a procedure that does not have direct access to an OCS window (for example, from a system-level NCL procedure). CMDLINE text text specifies the text to be displayed in the OCS command entry line.
Verbs CMDLINE Examples In the following example, GO YES is written to the command input line of the user's OCS window. The cursor is positioned at the end of the text: CMDLINE GO YES In the following example, the text THIS IS A TEST is written to the command input line of the user's OCS window with the cursor positioned on the first letter of TEST. The two leading blanks are displayed because they are enclosed in quotes.
Verbs CNMALERT CNMALERT The CNMALERT verb queues a communications network management (CNM) record to an EMSPROC procedure running in a local system. Using this verb requires an understanding of IBM System Network Architecture (SNA) networks. CNMALERT { ARGS [ RANGE=( start,end ) ] [ SEGMENT=n ] | VARS={ output-vars-list | variable* } [ RANGE=( start,end ) ] [ SEGMENT=n ] | DATA=text } [ MODE={ CREATE | INSERT } ] When control is returned to the NCL procedure, the &SYS.
Verbs CNMALERT RANGE=( start,end ) determines the range of variables specified by the VARS operand. See “Frequently Occurring Operands,” at the beginning of this section, for more information. SEGMENT=n specifies the amount of data (in bytes) to be put into the variables specified. See “Frequently Occurring Operands,” at the beginning of this section, for more information. DATA=text contains the text to be sent as the message. No division of individual fields within the record is performed.
Verbs CNMALERT See EMSREAD, described later in this section, for information on how to retrieve unsolicited CNM data (data generated by CNMALERT). See also the related verbs CNMCLEAR, CNMREAD, CNMSEND, and CNMVECTR. Examples In the following example, &A represents the hexadecimal string 81081000000000084103, and &B represents the hexadecimal string 040000000182F103D7E4C1.
Verbs CNMCLEAR CNMCLEAR The CNMCLEAR verb requests that all outstanding communications network management (CNM) reply data solicited by a CNMSEND request be discarded. CNMCLEAR is normally used when a procedure is about to terminate and some possibility exists that not all data solicited by CNMSEND has been processed. CNMCLEAR purges this unprocessed data so that the results of a subsequent CNMSEND verb can be guaranteed to be the next available data for processing by a CNMREAD verb.
Verbs CNMREAD CNMREAD The CNMREAD verb requests that the next communications network management (CNM) record be made available to an NCL process. This verb allows you to read any record that was solicited by, or was the response to, a CNM request. Using this verb requires an understanding of IBM System Network Architecture (SNA) networks.
Verbs CNMREAD CNMSENDs have been issued (that is, further requests have queued response information). When all RUs have been processed for a particular request (or where the CNMSEND request did not solicit) and the response has already been processed by a CNMREAD TYPE=RESP, a subsequent CNMREAD TYPE=RESP returns the response information from the next CNMSEND verb. When a single CNMSEND request that does not solicit data is followed by a CNMREAD request for data, the CNMREAD completes with the &SYS.
Verbs CNMREAD variable* specifies a set of variables. See “Frequently Occurring Operands,” at the beginning of this section, for more information. RANGE=(start,end) determines the range of variables specified by the VARS operand. See “Frequently Occurring Operands,” at the beginning of this section, for more information. SEGMENT=n specifies the amount of data (in bytes) to be put into the variables specified. See “Frequently Occurring Operands,” at the beginning of this section, for more information.
Verbs CNMREAD &$CNMHLU, &$CNMHTPU, &$CNMHPU, &$CNMHLNK and &$CNMHSPU contain hierarchy information concerning the originating device. Each variable that is set contains the eight-character name of the resource (in EBCDIC) and a type code that may be: Type Code Description CHAN Local channel link. CPU CTRL DEV LINE LKST NCP Host. PU or control unit. Device. Telecommunications line on an NCP. Link station. NCP PU.
Verbs CNMREAD &$CNMNVnn additional variables may be set by NonStop NET/MASTER MS under certain conditions and contain externally sourced data pertinent to the NSRU. You can set up additional variables by using CNMVECTR with the operand TYPE=RU. &$CNMSVxxnn and &$CNMSVLIST contain the CNM subvector information for the NMVT and Type RECFMS 0 RUs. Each CNM subvector in the RU is placed in a user variable in which the name reflects the contents.
Verbs CNMREAD nnnn the procedure waits for the time interval supplied (in seconds) before processing resumes. Considerations CNMREAD processing always sets the &SYS.RETCODE system variable. If variables are created, the &SYS.VARCNT system variable is set to reflect the number of variables created. If you use TYPE=SEG or TYPE=BOTH, you must specify the ARGS or VARS operand. NCL sets the &SYS.
Verbs CNMSEND CNMSEND The CNMSEND verb forwards the CNM Response Unit (RU) supplied data across the SNAX/CNM interface. The data is supplied in one or more NCL variables that contain the entire record to be sent. Using this verb requires an understanding of IBM System Network Architecture (SNA) networks.
Verbs CNMSEND VARS output-vars-list specifies that NCL is to form the text of the message from variables. The output message is constructed from the supplied variables from left to right. If insufficient variables are provided, some data is not available. Excess variables can cause an error if the record size is exceeded. Multiple variables must be enclosed in parentheses and separated by commas. variable* specifies a set of variables.
Verbs CNMSEND READ specifies where any RUs solicited by this CNMSEND request are to be processed. USER returns the results to the soliciting user. CNM specifies that any solicited data undergoes standard EMS delivery. These operands are synonymous. EMS specifies that any solicited data undergoes standard EMS delivery. This operand is synonymous with CNM. BOTH allows a user to process the returned results as well as providing standard delivery to EMSPROC.
Verbs CNMVECTR CNMVECTR The CNMVECTR verb allows you to format a communications network management message—the (CNM) Request Unit (RU) data—into user variables. The user variables that receive the RU data have a default prefix of &CNM. The PREFIX operand, described later, allows you to change this default prefix. Using this verb requires an understanding of IBM System Network Architecture (SNA) networks.
Verbs CNMVECTR SEGMENT=n specifies the amount of data (in bytes) to be put into the variables specified. See “Frequently Occurring Operands,” at the beginning of this section, for more information. DATA=text contains the message. Note text must be enclosed in quotes if it contains any keywords. MVNUM=nn specifies the major vectors to be formatted. If the specified major vector does not exist, no variables are created.
Verbs CNMVECTR CV is used to partition SNA control vectors. These vectors have the format nl, where n is the control vector type and l is the one-byte field containing the length of the data in the control vector &prefixSVnnoo. The length l excludes the type and length bytes. CNM specifies that a standard NonStop NET/MASTER MS MDO construction is to be delivered to CNMREAD (TYPE=RU). It also includes NonStop NET/MASTER MS control information.
Verbs CONTROL CONTROL The CONTROL verb defines all NCL processing options that can be used to modify NCL execution characteristics. You can use it to tailor your NCL procedure’s operational features. If you specify CONTROL with no operands, NCL reverts to default values.
Verbs CONTROL NOCMDSEP specifies that commands executed by an NCL process are not to be scanned for the concatenation character (;). ENDMSG specifies that a message is to be displayed and sent to the activity log when an NCL process terminates normally. NOENDMSG specifies that a termination message is to be displayed only when an NCL process terminates due to a FLUSH or an error. A message is sent to the activity log when an NCL process terminates normally. FINDRC specifies that the &SYS.
Verbs CONTROL PAKEYS specifies that an NCL process can process program attention (PA) keys. For an IBM 3270 or compatible terminal, using program attention keys PA1, PA2, or PA3 when operating in split-screen mode is discouraged; these keys do not transmit the cursor position to NCL. Because NCL does not know where the cursor was when any of these keys is pressed, indeterminate results may occur. NOPAKEYS specifies that an NCL process cannot process program attention (PA) keys.
Verbs CONTROL PFK3270 specifies that mapping is to be performed, where defined, from terminal-dependent keys to IBM 3270 or compatible keys. This operand is mutually exclusive with PFKGEN and with PFKNATIVE. PFKGEN specifies mapping is to be performed, where defined, from terminal-dependent keys to generic keynames. This operand is mutually exclusive with PFK3270 and with PFKNATIVE. PFKNATIVE specifies that no mapping is to be performed on the terminal-dependent key definitions. The PFKMAP still applies.
Verbs CONTROL For more information on variable sharing, refer to the NonStop NET/MASTER NCL Programmer's Guide, in which there are a number of examples of the sharing of variables between NCL procedures and functions. share-list specifies one or more variables that are to be shared between the called and the calling procedures. The CALLER keyword can be part of the list. The terms must be separated by commas. element specifies a variable type or the CALLER keyword.
Verbs CONTROL TRACE causes statements to be displayed prior to execution. TRACEALL specifies that expanded trace information is to be provided. TRACELAB specifies that tracing of NCL procedure labels only is to be performed. TRACELOG specifies that tracing of NCL statements to the system log, in addition to the operator's terminal, is to be performed. USRCMD specifies that commands issued within an NCL process are to be replaced by REPL equates, if a matching REPL equate exists.
Verbs CONTROL In the following example, a procedure is coded to call a nonexistent procedure. The CONTROL FINDRC option allows the calling procedure to continue execution without a run-time error. The &SYS.RETCODE system variable then shows that it contains 100: NO_ERROR: PROCEDURE CONTROL FINDRC /* CALL A PROCEDURE THAT DOES NOT EXIST */ CALL SNOOPY SAY "&SYS.RETCODE = " &SYS.
Verbs DELAY DELAY The DELAY verb suspends an NCL process for a specified period of time. You can use the DELAY verb to pause an NCL process, and thus allow time for another, usually external, event to complete. You can restart an NCL process that has suspended processing because of a DELAY verb by issuing the NonStop NET/MASTER MS GO command, or you can terminate the NCL process by issuing a NonStop NET/MASTER MS FLUSH command. DELAY n [.
Verbs DROP DROP The DROP verb deletes (drops) multiple variables in a single operation. When you use this verb, not only the content, but also the names of variables cease to exist within the current scope of the NCL procedure. The DROP verb can delete any variable that has attached attributes, such as ERROR or MODFLD attributes that are attached to variables by PANEL statements. You can delete MDO and global variables using the DROP verb.
Verbs DROP Consideration See also the ASSIGN verb in this section for a more detailed description of the format of the variable* operand, and in particular the GENERIC operand. The ASSIGN verb also contains a description of how you can alter the attributes of certain variables.
Verbs EMSALERT EMSALERT The EMSALERT verb generates an Event Management Service (EMS) event message from an NCL procedure and sends it to the EMSPROC NCL procedure. The message is always marked as originating from the local system. You use this verb in an NCL procedure to generate event messages and feed them to the standard event processing points. These points can be in the local system or in single or multiple connected systems using Inter-System Routing (ISR).
Verbs EMSALERT LINK=linkname specifies that the EMSALERT message is to be delivered to the system connected by the specified linkname. LOCAL specifies that the EMSALERT message is to be delivered to the local system (through EMSPROC, if active). REMOTE specifies that the EMSALERT message is to be sent to connected remote systems. MDO=mdo-name specifies the MDO that is delivered to be mapped by $MSG.
Verbs EMSALERT Considerations The &SYS.FDBK system variable is set after execution with the following values: Return Code 0 8 12 16 20 28 Meaning The message was sent successfully. The specified link or domain was not found. The ISR link was not enabled for outbound EMS traffic. Shortage of storage—message not sent. ISR Queue overflow—message not sent. ISR internal error. The EMSALERT verb does not pass any messages through the EMS collector (default $0). This is in contrast to the EMSSEND verb.
Verbs EMSCONT EMSCONT The EMSCONT verb, which is used in an EMSPROC NCL procedure, resumes normal processing of an Event Management Service (EMS) event message or redirects the event message to another system. You can use this verb to return a message to NonStop NET/MASTER MS for standard EMS processing or to send a copy of the message to a specific Inter-System Routing (ISR) link or to all active ISR links.
Verbs EMSCONT DOMAIN=domainid specifies that the EMS message is to be delivered to the connected system with the specified domainid. Remote domain ID addressing may be used. The message is still available to EMSPROC. LINK=linkname specifies that the EMS message is to be delivered to the system connected by the specified linkname. Local link name addressing may be used. The message is still available to EMSPROC. LOCAL specifies that the EMS message is to be released for delivery to local EMS receivers only.
Verbs EMSCONT FLOW specifies which subsystem is to process the message. If this operand is not specified, and the remote system is an IBM system with CNM enabled, then the CNM flow is used. If the remote system is a NonStop NET/MASTER MS system, the flow is the same as the one on which the message was received. Table 3-2 gives the meaning of this operand. Table 3-2.
Verbs EMSCONT LOW specifies low intensity (same as normal). NORMAL specifies normal intensity. NRD specifies that the non-roll-delete attribute of the message is to be changed. NO changes the non-roll-delete attribute to that of a standard message (not a NRD message). OPER changes the non-roll-delete attribute to OPER—no delete operator message identifier (DOM ID) is assigned to it. YES makes the message into a full non-roll-delete message.
Verbs EMSCONT DATA=rest-of-statement replaces only the text of the message received from EMSREAD. The data string is regarded as being everything to the right of DATA= to the end of the statement. Note DATA, if specified, must be the last keyword in this verb. Considerations The &SYS.FDBK system variable is set after execution with the following values: Return Code 0 4 8 12 16 20 24 28 Meaning The message was sent successfully. The message was not sent.
Verbs EMSDEL EMSDEL The EMSDEL verb deletes an Event Management Service (EMS) message; it can eliminate many of the excess messages presented by the system. This verb is used in an EMSPROC NCL procedure to delete a message that was previously delivered for processing by an EMSREAD verb. You can also use this verb to block automatic Inter-System Routing (ISR) delivery for an EMS message. If an EMSDEL verb is used within an NCL procedure other than an EMSPROC NCL procedure, a run-time error is issued.
Verbs EMSDEL Considerations The &SYS.FDBK system variable is set after execution with the following values: Return Code 0 8 24 Meaning Message delivery has been blocked. The specified link or domain was not found. A copy of the message has already been sent by an EMSCONT LINK or an EMSCONT DOMAIN. See also EMSALERT, EMSCONT, EMSREAD, and EMSSEND.
Verbs EMSREAD EMSREAD The EMSREAD verb reads the next Event Management Service (EMS) message. An EMSPROC NCL procedure uses the EMSREAD verb to receive the next available EMS message. EMSREAD requests that processing of the EMSPROC procedure be suspended until the message is available. If an EMSREAD verb is used within an NCL procedure other than an EMSPROC NCL procedure, a run-time error is issued.
Verbs EMSREAD SEGMENT=n specifies the amount of data (in bytes) to be put into the variables specified. See “Frequently Occurring Operands,” at the beginning of this section, for more information. VARS input-vars-list specifies that NCL is to place the text of the message into variables. Each word of the message text is split into the supplied variables from left to right. If insufficient variables are provided, some data is not available.
Verbs EMSREAD WAIT specifies what NCL is to do if no message has arrived. NO specifies that if no message has arrived, control is to return to the EMSPROC NCL process immediately with all specified variables (if any) set to null values and the &SYS.RETCODE system variable set to 12. YES specifies that the EMSPROC NCL process is to be suspended until a message arrives. nnnn specifies the number of seconds that the EMSPROC NCL process is to be suspended for, while waiting for a message to arrive.
Verbs EMSREAD Preloading of an EMSPROC NCL procedure by using the SYSPARMS PRELOAD command offers no performance advantage. The NCL procedure remains loaded for the duration of processing. For more information on the Event Management Service (EMS) verbs, refer to the NonStop NET/MASTER NCL Programmer's Guide, which also contains examples of how to use these verbs; in particular, it contains a description of the SPI map and how to access SPI tokens in the message.
Verbs EMSREAD Examples The following example waits for and reads the next EMS message, then splits it into variables &20 through &80. The &SYS.VARCNT system variable is set to indicate how many variables were created: EMSREAD ARGS RANGE=(20,80) The following example waits for and reads the next EMS message, then splits it into individual words, placing them in the variables &A, &B, &C, &D &E, and &F.
Verbs EMSSEND EMSSEND The EMSSEND verb generates an event message from an NCL procedure to the EMS event collector. The EMSSEND verb sends messages to a collector in the local system or, through Inter System-Routing (ISR), to remote NonStop NET/MASTER MS systems. The message is always marked as originating from the local system. See the note under EMSALERT for a distinction between EMSSEND and EMSALERT. EMSSEND [ DOMAIN=domainid | LINK=linkname ] { EVENTNUM=nnnnn SSID=owner.number.
Verbs EMSSEND Considerations The &SYS.FDBK system variable is set after execution with the following values: Return Code 0 8 12 16 20 28 Meaning The message was sent successfully. The specified link or domain was not found. The ISR link was not enabled for solicited EMS traffic, or an attempt was made to send to a system other than a NonStop NET/MASTER MS system. Shortage of storage—message not sent. ISR Queue overflow—message not sent.
Verbs EVENTTD EVENTTD The EVENTTD verb retrieves EMS help information from a database. EVENTTD GET { MSGNO=msgno | SSID=ssid EVENTNUM=num } [ STEM=&stem ] GET specifies that NCL retrieves help information as defined by the following operands: MSGNO=msgno specifies the message number for which help text is required. SSID=ssid specifies the SSID number for which help text is required. EVENTNUM=num specifies the event number for which help text is required.
Verbs EVENTTD Examples The following example requests help information for message EMS0513: EVENT1: PROCEDURE /* Procedure to display the help text for a message */ EVENTTD GET MSGNO=EMS0513 DO &I = 1 TO &$EVTD.CAUSE.COUNT SAY 'CAUSE '&$ EVTD.CAUSE.&I END DO &J = 1 TO &$EVTD.EFFECT.COUNT SAY 'EFFECT '&$EVTD.EFFECT.&J END DO &K = 1 TO &$EVTD.RECOVERY.COUNT SAY 'RECOVERY '&$EVTD.RECOVERY.
Verbs FILE ADD FILE ADD The FILE ADD verb adds a record to a file pair of files, or to an operating system process. For key-sequenced files, FILE ADD attempts to add the record as a new record. If a record of the same key already exists, the operation fails. For key-sequenced files in a pair of files, FILE ADD attempts to add the record as a new record in the first file only: the second file is a read-only file. If the record is in neither file, the record is added; otherwise, the FILE ADD operation fails.
Verbs FILE ADD variable (or field) in the record of the file. If the data contains any keywords, it must be enclosed in quotes. MDO=mdo-name specifies the mapped data object (MDO) that you wish to use to write to the file. The MDO can be connected to a map, which can be a user-defined map, by using Format 1 of the ASSIGN verb. Note For more information on user-defined maps, refer to the NonStop NET/MASTER NCL Programmer's Guide.
Verbs FILE ADD ID=fileid specifies the identity of the file, or pair of files, you want to access by using the FILE ADD verb. This file, or pair of files, then becomes the current file or pair of files. If this operand is omitted, NCL accesses the last file or pair of files identified by the ID operand in a previous file operation. KEY=keydata specifies the key of the record you want to add. The length of the key operand depends on the length of the key for the current file being processed.
Verbs FILE ADD Considerations The &SYS.FILE.RC system variable reflects the result of all file operations within NCL. NCL sets this variable on completion of the FILE ADD verb, as follows: Return Code 0 4 8 12 16 Meaning Record added successfully. Record already exists. A file system error occurred during processing. Further information is contained in the &SYS.FILE.ERROR system variable. Not used. An error occurred. Further information is contained in &SYSMSG.
Verbs FILE CLOSE FILE CLOSE The FILE CLOSE verb closes a file, pair of files, or an operating system process after processing by NCL. After the FILE CLOSE operation finishes, NCL no longer has a current file, pair of files, or operating system process. Specification of a file or pair of files that has not been opened or that has previously been closed is ignored. NCL also ignores the case in which you specify ALL and no files or file pairs are currently open.
Verbs FILE CLOSE Examples The following example closes all previously opened files and file pairs: FILE CLOSE ALL The following example closes the file, or pair of files, with the local identifier FILE1: FILE CLOSE ID=FILE1 3–74 106126 Tandem Computers Incorporated
Verbs FILE DEL FILE DEL The FILE DEL verb deletes a record or a series of records from a key-sequenced file or pair of files. The FILE DEL verb requires that you already have a current file or pair of files; if not, you must use the ID operand. You must also have already specified a current key; if not, you must use the KEY operand. For key-sequenced files in a pair of files, FILE DEL operates as follows: If the record is in neither file, the operation fails.
Verbs FILE DEL OPT specifies a generic retrieval operand that determines the search argument for the record(s) to be deleted. In both the following operands, a partial key can be specified using the KEY=keydata operand. KEQALL specifies that a series, or generic set of records, is to be deleted. Only those records that match the specified partial key are deleted. KGEALL specifies that all records, commencing with the previously specified partial key through to the end of the file, are to be deleted.
Verbs FILE DEL See also FILE ADD, FILE GET, and FILE SET. For more information on key-sequenced and entry-sequenced files, refer to the NonStop NET/MASTER NCL Programmer's Guide. Example The following example deletes all records with keys EGS through EGZ: all keys that begin with the partial key EG and are greater than or equal to EGS are deleted. This is because GENLEN has been set to 2 (the first two characters of the KEY) and OPT=KEQALL.
Verbs FILE GET FILE GET The FILE GET verb retrieves a record from the current file or pair of files. You can use the FILE GET verb on key-sequenced, entry-sequenced, or edit files. When you retrieve records by using the FILE GET verb, each field within the record can be returned in variables that you specify. File processing supports the retrieval of records from key-sequenced files by both full and partial keys. In a full key, all the characters required for the FILE GET operation are present.
Verbs FILE GET ALTKEY=altkey specifies the two-character identifier that identifies the record's alternate key. This is applicable to key-sequenced files only. GENLEN=num specifies the length of the generic key portion to be used for a generic FILE GET operation. You can set a current GENLEN value by using the FILE SET verb; this is the value that NCL uses if this operand is omitted.
Verbs FILE GET operand cannot be used to start sequential accessing for entry-sequenced files. For this file type, the starting point is always the last record in the file. This operand cannot be used for edit files. You must use a KEY=keydata operand if you want to position the file at a specific point in a key-sequenced file. You can also issue a preliminary FILE GET call using one of the generic retrieval operands.
Verbs FILE GET KEL operand establishes the starting point within the file for subsequent retrievals. This starting point is a record whose full key value is the highest that matches the specified partial key. Subsequent FILE GET verbs that specify KEL return further records with successively lower full key values. The keys of these records must still match the specified partial key.
Verbs FILE GET to position the file at a specific record by using a KEQ call, and then continue accessing by using KGT calls. Alternatively, the procedure could set a partial key lower than that required and allow the KGT call to return the next highest record. After successful retrieval, you can obtain the full key of the record returned from the &SYS.FILE.KEY system variable.
Verbs FILE GET After successful retrieval, you can obtain the full key of the record returned from the &SYS.FILE.KEY system variable. Sequential retrieval is terminated by use of the FILE GET verb with any operand other than OPT=SEQ, or when an end-of-file or start-of-file (depending on the direction of retrieval) is reached. The OPT=END operand can also be used to explicitly terminate sequential accessing.
Verbs FILE GET ONE retrieves a record from a file or the first file in a pair of files. TWO retrieves a record from the second file in a pair of files. An error is raised if TWO is used when retrieving a record from a single file. UPDATE specifies a combination of the OPT=UPD processing with another OPT=operand. MDO=mdo-name specifies the mapped data object (MDO) that you wish to use to read the file.
Verbs FILE GET SEGMENT=n specifies the amount of data (in bytes) to be put into the variables specified. For mapped or delimited files, the default value is 32000. For unmapped files, the default value is 256. You can specify a value from 1 through 32000. VARS input-vars-list specifies that the record is to be split into the supplied variables. The variables must be separated by commas. Each field of the record is placed into the supplied variables, from left to right.
Verbs FILE GET For return codes other than 0 (zero) and 4, the FILE_ERROR condition is signalled. This condition can be trapped (or intercepted) by an error handler. When you read a record by using FILE GET, the key of the record is normally extracted from the data and placed in the &SYS.FILE.KEY system variable. The remaining data is split into the supplied variable or variables.
Verbs FILE OPEN FILE OPEN The FILE OPEN verb opens a file, a pair of files, or an operating system process, and prepares it for accessing by subsequent file verbs. [ DATA=rest-of-statement ] [ FORMAT={ DELIMITED | MAPPED | UNMAPPED } ] ID=fileid [ KEYEXTR={ NO | YES } ] [ MAP=map-name ] [ UDBID=fileid ] FILE OPEN DATA=rest-of-statement contains the text of a message that is sent to the security exit process, if one is configured. Note DATA, if specified, must be specified last.
Verbs FILE OPEN ID=fileid specifies a local identifier of the file, pair of files, or an operating system process being opened and makes it the current file or pair of files. The ID operand must be specified. If you omit the UDBID operand, NCL operates as if the ID operand specifies both the system-wide and local file identifiers. If so, the value of the local identifier must be the value of the system-wide UDB ID, which is set by the UDBCTL filespec definition or UDBCTL OPEN command.
Verbs FILE OPEN It is sometimes necessary to refer to the same file, or pair of files, with different local file identifiers. You can specify multiple local identifiers by using the ID operand in multiple FILE OPEN verbs. If you omit the UDBID operand, NCL operates as if the ID operand specifies both the system-wide and local file identifier. Considerations The &SYS.FILE.RC system variable reflects the result of all file operations within NCL.
Verbs FILE PUT FILE PUT The FILE PUT verb replaces an already existing record in, or adds a new record to, a file, a pair of files, or an operating system process. For key-sequenced files, FILE PUT replaces an existing record, or adds a new record if no record with that key exists. If you know you want to write a new record to a key-sequenced file, use the FILE ADD verb.
Verbs FILE PUT RANGE=( start,end ) determines the range of variables specified by the ARGS operand. See “Frequently Occurring Operands,” at the beginning of this section, for more information. SEGMENT=n specifies the amount of data (in bytes) to be put into the variables specified. For mapped or delimited files, the default value is 32000. For unmapped files, the default value is 256. You can specify a value from 1 through 32000. DATA=text contains the text to be written to the file.
Verbs FILE PUT VARS output-vars-list specifies the name(s) of the variables that you want to use as the data for the FILE PUT operation. The variables are separated by commas. You can cause an error if you exceed the maximum record size by specifying too many variables. Multiple variables must be enclosed in parentheses and separated by commas. variable* specifies a set of variables. See “Frequently Occurring Operands,” at the beginning of this section, for more information.
Verbs FILE PUT The options available are shown in the following table: Category Option Description Paper Movement SKIP0 SKIP1 SKIP2 SKIP3 NEWPAGE USCORE1 Paper not advanced before the record is written. Paper advanced one line before the record is written. Paper advanced two lines before the record is written. Paper advanced three lines before the record is written. Skip to a new page before the record is written. Text of this record (excluding blanks) underlined with an underscore (_) character.
Verbs FILE PUT For more information on key-sequenced and entry-sequenced files, refer to the NonStop NET/MASTER NCL Programmer's Guide. Example The following example replaces the record with the key contained in &USER1 for the file with the local file identifier HELP. The variable &USER1 contains the key of the record.
Verbs FILE PUTGET FILE PUTGET The FILE PUTGET verb puts records into and gets records from a Guardian process. The records sent to or from the operating system process are sent as messages, constructed from variables or a string of text specified by the DATA operand. The message that the operating system process returns is read into the variables specified in the VARS, ARGS, or MDO operand. An end-of-file indicator (EOF) is generated by the operating system process when there is no more data.
Verbs FILE PUTGET DATA=text contains the text to be sent to the operating system process. For unmapped files, the text makes up the whole record. For mapped $NCL files or delimited files, the text is treated as the first variable (or field) in the record of the file. Note text must be enclosed in quotes if it contains any keywords. MDO=mdo-name specifies the mapped data object (MDO) that you wish to use to write to the file.
Verbs FILE PUTGET RANGE=( start,end ) determines the range of variables specified by the VARS operand. See “Frequently Occurring Operands,” at the beginning of this section, for more information. SEGMENT=n see SEGMENT under the preceding ARGS operand. ID=fileid specifies the identity of the operating system process you want to access by using the FILE PUTGET verb. This operating system process becomes the current file ID.
Verbs FILE PUTGET HEADER specifies whether the MDO header (consisting of the length of the MDO and its Mapping Services key) is attached to the beginning of the record. NO specifies that the header is not attached to the record. YES specifies that the header is attached to the record. It is not necessary to specify the name of the map when retrieving the record. VARS input-vars-list specifies that the received record is to be split into the supplied variables.
Verbs FILE PUTGET Considerations The &SYS.FILE.RC system variable reflects the result of all file operations within NCL. NCL sets this variable on completion of the FILE PUTGET verb as follows: Return Code 0 4 8 12 16 Meaning PUTGET completed successfully. End-of-file detected. A file system error occurred during processing. Further information is contained in the &SYS.FILE.ERROR system variable. Not used. An error occurred. Further information is contained in &SYSMSG.
Verbs FILE SET FILE SET The FILE SET verb specifies a new file, or pair of files, to be the current file or pair of files, or allows you to change the attributes of the current file or pair of files. It also allows you to reset the value of a key.
Verbs FILE SET UNMAPPED any file records can be processed using NCL variables (but not Mapping Services). When reading a record, the contents are segmented and placed into the variables specified. When writing a record, all variables are concatenated to form the actual record. No examination or translation of the variable data takes place for either reading or writing. DELIMITED can be used when reading into, or writing from, NCL variables only.
Verbs FILE SET MAP=map-name specifies the name of the map, which can be a user-defined map, to be used by an MDO. If you do not specify MAP, NCL uses the default map ($NCL). Considerations The &SYS.FILE.RC system variable reflects the result of all file operations within NCL. NCL sets this variable on completion of the FILE SET verb as follows: Return Code 0 4 8 12 16 Meaning FILE SET completed successfully. Not used. Not used. Not used. An error occurred. Further information is contained in &SYSMSG.
Verbs INTCLEAR INTCLEAR The INTCLEAR verb discards outstanding messages queued to a dependent processing environment. The messages may have been queued by a previous WRITE or INTCMD verb, or by INTQ commands issued from OCS, by other NCL processes directing messages to this process, or by a command executing in a dependent region. The INTCLEAR verb eliminates the need to process all of the results from a command or NCL procedure queued to the dependent request or response queue.
Verbs INTCLEAR Considerations Responses from a command started before INTCLEAR TYPE=RESP or TYPE=ANY is executed, and that arrive after INTCLEAR executes, are not affected by the INTCLEAR verb. For more information on the INTCLEAR verb, refer to the NonStop NET/MASTER NCL Programmer's Guide, which also contains examples of the use of the INTCLEAR verb.
Verbs INTCMD INTCMD The INTCMD verb executes a command in the dependent processing environment of an NCL process. The results of the command or procedure are queued to the dependent response queue. The results can then be analyzed. Every NCL process can have a dependent processing environment associated with it. For a full discussion of NCL environments, refer to the NonStop NET/MASTER NCL Programmer's Guide. The command invoked using the INTCMD verb executes independently of the initiating procedure.
Verbs INTCMD Using dependent processing environments is not limited to standard procedures. The INTCMD verb can be used within special procedures, such as the EMSPROC and MSGPROC NCL procedures. The INIT and READY procedures can also execute the INTCMD verb. The results are returned to the initiating process and are queued for processing by the INTREAD verb. However, by default, all command results processed by using the INTREAD verb are logged to the activity log to provide an audit trail of events.
Verbs INTCONT INTCONT The INTCONT verb passes a message that was read through INTREAD to the next-highest processing environment and, optionally, changes its message text. The INTCONT verb can also change some attributes of the message. NCL passes the message to the dependent response queue of the next-higher-level NCL process, if the executing NCL process is running in a dependent processing environment.
Verbs INTCONT BKGCOLOR | BKGCOLOUR=color-option specifies that the background color of the terminal is to be set to the selected value. If you omit this option, or use NONE, the default or native background color of the terminal is used. COLOR | COLOUR=color-option specifies that the message color is to be set to the selected value. If you omit this option, or use NONE, the default or native display color of the terminal is used. HLITE | HLIGHT=hlite-option specifies which message highlight option to use.
Verbs INTCONT OPER changes the non-roll-delete attribute to OPER—no delete operator message identifier (DOM ID) is assigned to it. YES It is not an error to enter NRD=YES, but it is ignored. Full non-roll-delete with a delete operator message identifier (DOM ID) correlation can only be set by the message originator (for example, the WRITE verb). SCAN specifies that the message can contain strings of characters delimited by “at” signs (@).
Verbs INTREAD INTREAD The INTREAD verb retrieves the next message from the dependent response or request queue associated with an NCL process. The dependent response queue holds the results of NonStop NET/MASTER MS commands executed by an NCL process using the INTCMD verb. The dependent request queue holds messages sent from another NCL process by using the WRITE verb, the INTQ command, or an OCS operator using the INTQ command.
Verbs INTREAD by $NCL and PARSE=YES, NCL places the data in that MDO into variables, rather than parsing the text. PARSE See “Frequently Occurring Operands,” at the beginning of this section, for more information. RANGE=( start,end ) determines the range of variables specified by the ARGS operand. See “Frequently Occurring Operands,” at the beginning of this section, for more information. SEGMENT=n specifies the amount of data (in bytes) to be put into the variables specified.
Verbs INTREAD SEGMENT=n specifies the amount of data (in bytes) to be put into the variables specified. See “Frequently Occurring Operands,” at the beginning of this section, for more information. MDO=&mdo-name specifies that an enclosed MDO variable (contained in the message) is to be copied to a newly created MDO variable with the name &mdo-name, mapped by the assigned map contained in the message. The old MDO, if any, is deleted. See the fourth example at the end of this description.
Verbs INTREAD nnnn specifies the number of seconds that the NCL process is to be suspended for, while waiting for a message to arrive. After this time interval, control is returned to the NCL process. WAIT=0 (zero) has the same effect as WAIT=NO. The &SYS.FDBK system variable is set to 4 if the wait time has expired and no message is received. Considerations NCL sets the &SYS.LOOPCTL system variable to 1000 each time the INTREAD verb is executed, unless the user explicitly sets it to 0 (zero).
Verbs INTREAD For the interpretation of Message Profile Variables contained in MDOs, see Section 7, “Message Profile Variables.” For more information on the INTREAD verb, refer to the NonStop NET/MASTER NCL Programmer's Guide, which also contains examples of the use of the INTREAD verb.
Verbs LOCK LOCK The LOCK verb obtains or releases access to a resource (such as a record in a file). It allows an NCL process to specify a resource by name and requests that it be given either exclusive or shared access to that resource. This controls concurrent access to a particular resource by different NCL processes. Other NCL processes that wish to gain access to the resource use this verb to determine whether the resource is available.
Verbs LOCK TEXT=text contains a maximum of 250 characters of free-form text. The value of the text is returned in the &SYS.LOCK.MSG system variable (and the VARS=variable-name operand) for certain LOCK operations. The LOCK operations affected are listed in the considerations for this verb. If no text is supplied in the LOCK verb, the current user ID, suffixed by the name of the base NCL procedure and by the time, is appended.
Verbs LOCK YES specifies that the LOCK function must wait indefinitely until the request can be granted or until it fails (for TYPE=SHR or TYPE=EXCL). For TYPE=TEST, the request waits indefinitely or until the next request, of any type, is made by another NCL process. nnnn specifies that the LOCK function must wait for the indicated interval for the request to be granted. If the request is not granted within this interval, control returns to the issuing NCL process.
Verbs LOCK When TYPE=TEST is specified, the &SYS.RETCODE system variable is set as follows: Return Code Description 0 No other NCL process has shared or exclusive control of the resource or is testing the resource. The request would fail because this NCL process already has control of the resource. The &SYS.LOCK.MSG system variable is set to the text of the existing lock. The &SYS.FDBK system variable is also set; this is described by a later consideration.
Verbs LOCK Termination of the highest level NCL process releases all locks still held by that process and all nested procedures. The LOCK TYPE=TEST WAIT=YES construction can be used to create a flag for signaling between NCL processes. Refer to the PURGE command in the NonStop NET/MASTER MS Command Reference Manual. Example In the following example, a procedure called LOCKIT contains three uses of the LOCK verb. The contents of the &SYS.
Verbs LOGCONT LOGCONT The LOGCONT verb resumes normal processing of a message. This verb must be used within a LOGPROC NCL procedure. It requests that a message previously requested for processing by the LOGREAD verb be returned to NonStop NET/MASTER MS for delivery to the NonStop NET/MASTER MS activity log. The LOGCONT verb can change some of the properties of the message before it is delivered.
Verbs LOGCONT DATA=rest-of-statement contains a text string that may be used to replace the text of the message received by the LOGREAD verb. The length of the new text need not be the same length as the original text. The data string is regarded as being everything to the right of DATA=, to the end of the statement. Note DATA, if specified, must be the last keyword in this verb.
Verbs LOGDEL LOGDEL The LOGDEL verb deletes the last message destined for the NonStop NET/MASTER MS activity log, read by the LOGREAD verb. This verb must be used within a LOGPROC NCL procedure. A LOGDEL verb must only be used after an earlier LOGREAD verb. The message returned by the LOGREAD verb is deleted by the LOGDEL verb. If a LOGDEL verb is used within an NCL procedure other than a LOGPROC NCL procedure, a run-time error is issued.
Verbs LOGREAD LOGREAD The LOGREAD verb reads the next NonStop NET/MASTER MS activity log message. This verb must be used within a LOGPROC NCL procedure. It requests that processing of the LOGPROC NCL process be suspended until the log message is available. You can conveniently place the LOGREAD verb in a DO loop within the LOGPROC NCL procedure. Each message can then be inspected and appropriate action can be taken.
Verbs LOGREAD SEGMENT=n specifies the amount of data (in bytes) to be put into the variables specified. See “Frequently Occurring Operands,” at the beginning of this section, for more information. VARS input-vars-list specifies which variables are to be generated. If too few variables are specified, data is missing. Excess variables are given no value—they are set to the null string. Multiple variables must be enclosed in parentheses and separated by commas.
Verbs LOGREAD SET specifies that the message text is not to be transferred into variables. The LOGREAD statement returns only the message profile. If SET is not specified, use other LOGREAD operands to control the way a message is handled. The absence of any operands implies SET, which is the default. WAIT specifies what NCL is to do if no message has arrived.
Verbs LOGREAD See EMSREAD, INTREAD, and MSGREAD, which also automatically create MDO variables mapped by $MSG. For more information on MDO variables, refer to the NonStop NET/MASTER NCL Programmer's Guide. For more information on the LOGREAD verb, refer to the NonStop NET/MASTER NCL Programmer's Guide, which also contains examples of the use of the LOGREAD verb. Examples The following example waits for the next log message to arrive and then splits it into variables &20 through &80. The &SYS.
Verbs MSGCONT MSGCONT The MSGCONT verb resumes normal processing of a message. This verb must be used within a MSGPROC procedure executing in an Operator Control Services (OCS) environment. It requests that a message, previously requested for processing by a MSGREAD verb, be returned to NonStop NET/MASTER MS for normal delivery to the OCS window. The MSGCONT verb can change some of the attributes of the message before it is delivered.
Verbs MSGCONT YES sounds the terminal alarm. BKGCOLOR | BKGCOLOUR=color-option specifies that the background color of the terminal is to be set to the selected value. If you omit this option, or use NONE, the default or native background color of the terminal is used. COLOR | COLOUR=color-option specifies that the message color is to be set to the selected value. If you omit this option, or use NONE, the default or native display color of the terminal is used.
Verbs MSGCONT NO changes the non-roll-delete attribute to that of a standard message (not a NRD message). OPER changes the non-roll-delete attribute to OPER—no delete operator message identifier (DOM ID) is assigned to it. YES makes the message a full non-roll-delete message. It is not an error to enter NRD=YES, but it is ignored. Full non-roll-delete with a delete operator message identifier (DOM ID) correlation can only be set by the message originator (for example the WRITE verb).
Verbs MSGCONT Example The following example returns a message to NonStop NET/MASTER MS for delivery to the OCS window, using COLOR set to RED and HLITE set to REVERSE: MSGCONT COLOR=RED HLITE=REVERSE 3–130 106126 Tandem Computers Incorporated
Verbs MSGDEL MSGDEL The MSGDEL verb deletes the current message. This verb must be used within a MSGPROC procedure executing in an OCS environment. It requests that a message previously delivered for processing by a MSGREAD be deleted. The message, once deleted, is not available for any further processing. If a MSGDEL verb is used within an NCL procedure other than a MSGPROC NCL procedure, a run-time error is issued. A MSGDEL issued when no message is available is ignored.
Verbs MSGREAD MSGREAD The MSGREAD verb reads the next available OCS message. This verb must be used within a MSGPROC NCL procedure executing in an OCS environment. It requests that processing of the MSGPROC procedure be suspended until the message is available. You can use the MSGREAD verb to split the incoming OCS messages into variables in a variety of forms, so that messages can be analyzed and interpreted.
Verbs MSGREAD RANGE=( start,end ) determines the range of variables specified by the ARGS operand. See “Frequently Occurring Operands,” at the beginning of this section, for more information. SEGMENT=n specifies the amount of data (in bytes) to be put into the variables specified. See “Frequently Occurring Operands,” at the beginning of this section, for more information. VARS input-vars-list specifies which variables are to be generated. If too few variables are specified, data is missing.
Verbs MSGREAD MDO=&mdo-name specifies that an enclosed MDO variable (contained in the message) is to be copied to a newly created MDO variable with the name &mdo-name, mapped by the assigned map. The old MDO, if any, is deleted. See the third example at the end of this description. SET specifies that the message text is not to be transferred into variables. The MSGREAD verb returns only the message profile. If SET is not specified, use other MSGREAD operands to control the way a message is handled.
Verbs MSGREAD YES specifies that NCL is to suspend the MSGPROC process until a message arrives. NO specifies that if no message has arrived, control is to return to the MSGPROC NCL process immediately, with all specified variables (if any) set to null values. nnnn specifies the number of seconds that the MSGPROC NCL process is to be suspended for, while waiting for a message to arrive. After this time interval, control is returned to the MSGPROC NCL process. WAIT=0 (zero) has the same effect as WAIT=NO.
Verbs MSGREAD For the interpretation of Message Profile Variables contained in MDOs, see Section 7, “Message Profile Variables.” For more information on the MSGREAD verb, refer to the NonStop NET/MASTER NCL Programmer's Guide, which also contains examples of the use of the MSGREAD verb.
Verbs NRDDEL NRDDEL The NRDDEL verb deletes one or more non-roll-delete (NRD) messages from the OCS window. Only full NRDs (with a DOM ID) can be deleted from within an NCL procedure using this verb. Note For more information on message deletion, refer to the NonStop NET/MASTER MS PURGE command in the NonStop NET/MASTER Management Services (MS) Operator’s Guide. NRDDEL { domid | ( domid,… ) } domid specifies the DOM ID that identifies the message that you want to delete.
Verbs OCS OCS The OCS verb displays an Operator Control Services (OCS) window within the primary processing environment and suspends the NCL process, allowing the user to enter NonStop NET/MASTER MS commands. To resume the original NCL process, exit from the OCS window by using the function key F3 or by entering the NonStop NET/MASTER MS command X. Processing then resumes at the statement in the procedure that follows the OCS verb.
Verbs PANEL PANEL The PANEL verb displays the specified full-screen panel. The PANEL verb can be used in any NCL procedure that has access to an OCS full-screen window. This includes NCL procedures invoked from the User Services section of the primary menu, or from NCL procedures invoked from OCS. Using the PANEL verb in a process that does not have access to an OCS full-screen window causes a run-time error.
Verbs PANEL ASYNC specifies an asynchronous type panel display. Asynchronous requests result in the immediate return of control to the NCL process, with input arrival being notified through INTREAD. SYNC specifies a synchronous-type panel display. Synchronous requests display the panel, and the NCL procedure then waits until either the user operates a function key or a timeout period elapses. The timeout period is set by the NCL panel control statement #OPT INWAIT operand.
Verbs PANEL Any NCL procedure invoked from an OCS window may issue PANEL at any time. When multiple NCL processes are executing in the same NCL processing environment (invoked by the START command), any one of the NCL processes may obtain control of the OCS window to display panels. To prevent another NCL process from obtaining control of the window, the controlling NCL process must use the CONTROL NOSHAREW option.
Verbs PANEL When control is returned to the NCL procedure after a PANEL verb, the &SYS.RETCODE system variable is set to one of the following values: Return Code For Synchronous Panels For Asynchronous Panels 0 One or more panel fields have been modified, and internal validation has not detected any errors. 4 No input fields have been modified, and internal validation has not detected any errors. 8 An error in an input field has been detected by internal validation.
Verbs PANELEND PANELEND The PANELEND verb gives up exclusive control of a display window. It specifies that the issuing NCL process no longer wishes to retain exclusive control of the window that it is executing in. This verb ends the panel service sequence, so that a new panel invocation has to start by issuing another PANEL verb.
Verbs PARSE PARSE The PARSE verb splits a data string into sections according to specified delimiters. You use this verb to define the delimiters and variables for splitting a string and capturing the different sections of it. A complete string can be parsed in one operation. The parse proceeds from left to right through the data until all text has been parsed or all target variables have been assigned a value.
Verbs PARSE VARS input-vars-list specifies that NCL is to place the data string into variables. Each word of the string is split into the supplied variables from left to right. If too few variables are specified, data is missing. Excess variables are given no value—they are set to the null string. Multiple variables must be enclosed in parentheses and separated by commas. variable* specifies a set of variables. See “Frequently Occurring Operands,” at the beginning of this section, for more information.
Verbs PARSE ASIS specifies that leading and trailing blanks are to be preserved when text is assigned to the target variables. If ASIS is not specified, leading and trailing blanks are stripped from the parsed strings as they are placed in the variables. NONULLS specifies the action to be taken if two consecutive delimiters are found within the string being parsed.
Verbs PARSE Examples The following example creates (or reassigns values to) the variables &1, &2, and &3 with the values &1=123, &2= 456, and &3=789. A space precedes the numeric value 456 in the second variable, &2; this space occurs in the data string: PARSE DELIM="," ARGS OPT=ASIS DATA="123, 456,789" The following example creates (or reassigns values to) the variables &A, &B, &C, and &D as follows: &A=aaa, &B=bbb, &C=null value, and &D=ccc.
Verbs PAUSE PAUSE The PAUSE verb suspends processing of an NCL process until the operator requests that processing be continued or be terminated. Any commands may be entered from the terminal while an NCL process is in a paused state. When you use this verb, NCL alerts the operator by issuing an OCS message that an NCL process has been suspended. You can use the PAUSE verb to elicit information from an OCS operator or ask the operator to perform some manual duties.
Verbs PAUSE VARS input-vars-list specifies that the message is to be split into the supplied variables before control is returned to the NCL process, if PARSE=YES has been specified. Each word of the command output line is split into the supplied variables from left to right. If too few variables are specified data is missing. Excess variables are given no value—they are set to the null string. Multiple variables must be enclosed in parentheses and separated by commas.
Verbs PAUSE Considerations PAUSE must appear in the procedure at the precise point at which processing is to be suspended. The highlighted text is displayed as a non-roll-delete message on the OCS window. It remains displayed until the NCL process resumes or terminates. The &SYS.VARCNT system variable is set to the number of variables created or modified by PAUSE. The status of all paused NCL processes in your NCL processing region is displayed by the SHOW NCL command.
Verbs PAUSE Examples The following example uses two instances of the PAUSE verb to request responses from the operator. The procedure tests the initial response, and if it is “GO YES,” a further response is requested. This last response is split into variables &20 through &22: PAUSEX:PROCEDURE WRITE DATA="ENTER ""GO YES"" TO CONTINUE, ""GO NO"" TO END".
Verbs PSEND CLOSE PSEND CLOSE The PSEND CLOSE verb makes a Pathway server class unavailable for use by an NCL process. The NCL process is subsequently unable to exchange messages with the Pathway server class. The Pathway server class can then be made unavailable for use by NonStop NET/MASTER MS (by using the PSNDCTL CLOSE command). PSEND CLOSE { ID=local-pathsend-id | ALL } ID=local-pathsend-id specifies the PATHSEND ID of the Pathway server class you want to make unavailable for use.
Verbs PSEND OPEN PSEND OPEN The PSEND OPEN verb makes a Pathway server class available for use by an NCL process. The NCL process is then able to send request messages to, and receive reply messages from, the Pathway server class (by using the PSEND SEND verb). The Pathway server class must be made available for use by NonStop NET/MASTER MS (by using the PSNDCTL OPEN command) before it can be made available for use by an NCL process.
Verbs PSEND OPEN UNMAPPED specifies that the structure of the request and reply messages is unmapped. NCL treats the reply message as a sequence of contiguous bytes. NCL does not interpret the data in an unmapped reply message. An unmapped reply message can contain any binary data. MAP=map-name specifies the name of the map used to describe and interpret the structure of a reply message from a Pathway server class. PSNDID=system-pathsend-id contains the name of the ID to be used for the PSEND OPEN verb.
Verbs PSEND OPEN Examples The following example opens a Pathway server class for use in an NCL procedure. As FORMAT is defined as MAPPED, an MDO variable is used for reply messages: PSEND OPEN ID=ID1 PSNDID=SRV22 FORMAT=MAPPED MAP=REPMAP The following example opens a Pathway server class for use in an NCL procedure.
Verbs PSEND SEND PSEND SEND The PSEND SEND verb sends a request message to and receives a reply message from a Pathway server class. You can send both the request message and the reply message as either mapped or unmapped data structures. The mixing of mapped and unmapped data structures, however, is not allowed. If both are mapped, you can use a different map for the request message and the reply message.
Verbs PSEND SEND MDO=mdo-name specifies the MDO variable in which to send the request message. This operand is valid only if message structure is mapped. HEADER specifies whether you want NCL to attach the MDO header (consisting of the length of the MDO and its Mapping Services key) to the beginning of the request message. YES specifies that you want the header attached to the request message. NO specifies that you do not want the header attached to the request message.
Verbs PSEND SEND RANGE=( start,end ) determines the range of variables specified by the ARGS operand. See “Frequently Occurring Operands,” at the beginning of this section, for more information. MDO=mdo-name specifies the MDO variable in which to receive the reply message. This operand is valid only if message structure is mapped. Note The FORMAT operand of the PSEND OPEN verb specifies whether the reply is mapped; the MAP operand describes and interprets the structure of the reply message.
Verbs PSEND SEND Considerations The &SYS.PSEND.RC system variable reflects the result of all PATHSEND operations within NCL. NCL sets this variable on completion of the PSEND SEND verb, as follows: Return Code 0 4 8 16 Meaning Completed successfully. A PATHSEND error occurred. See &SYS.PSEND.PSERROR. A Guardian file system error occurred. See &SYS.PSEND.ERROR. An error occurred. See &SYSMSG for more information. See also PSEND CLOSE, PSEND OPEN, and PSEND SET.
Verbs PSEND SET PSEND SET The PSEND SET verb sets the current Pathway server class. PSEND SET can also set the default map used to describe and interpret a reply message from a Pathway server class. PSEND SET [ ID=local-pathsend-id ] [ FORMAT={ MAPPED | UNMAPPED } ] [ MAP=map-name ] ID=local-pathsend-id identifies the Pathway server class being set and sets it to be the current Pathway server class.
Verbs PSEND SET Considerations The &SYS.PSEND.RC system variable reflects the result of all PATHSEND operations within NCL. NCL sets this variable on completion of the PSEND SET verb, as follows: Return Code 0 16 Meaning No errors. An error occurred. See &SYSMSG for more information. See also PSEND CLOSE, PSEND OPEN, and PSEND SEND. For more information on how to use the PATHSEND interface within an NCL process, refer to the NonStop NET/MASTER NCL Programmer's Guide.
Verbs QEXIT QEXIT The QEXIT verb terminates the current NCL process and all higher-level NCL processes. You can use this verb to release the current processing window from within an NCL process. The QEXIT verb is meaningful only when issued from an NCL process that is associated with an OCS window. The current and all higher levels of nested NCL processes are terminated without further processing. The OCS window in which the NCL process was executing is terminated.
Verbs SECCALL ADD SECCALL ADD The SECCALL ADD verb adds a new user to the user ID database. You must have full UMS authority to execute this verb. SECCALL ADD MDO=mdo-name [ NEWPWD=nnnnnnnn ] { TYPE=GROUP | USER } USERID=uuuuuuuu MDO=mdo-name defines the name of the variable stem from which MDO information is to be retrieved. The information supplied in this MDO must contain at least one valid Guardian user ID. NEWPWD=nnnnnnnn specifies the new password to be associated with this user ID.
Verbs SECCALL ADD For more information on SECCALL verbs, refer to the NonStop NET/MASTER NCL Programmer's Guide. Example The following example adds a new user with the user ID BEELING. The initial password is XYZ. The password is required because TYPE=USER has been specified. The MDO &user. contains information about the user's location, name, telephone number, and the user's UMS and OCS access entitlement: ASSIGN MDO=&user. MAP=$SEC &user.location = MALAYSIA &user.username = Bee Ling How &user.
Verbs SECCALL CHANGE SECCALL CHANGE The SECCALL CHANGE verb allows you to change the password of the user ID and, optionally, some user information. SECCALL CHANGE [ MDO=mdo-name ] [ NEWPWD=nnnnnnnn ] [ PWD=pppppppp ] USERID=uuuuuuuu MDO=mdo-name defines the name of the variable stem from which MDO information is to be retrieved. For the SECCALL CHANGE verb, only the user name, location, and phone fields in the MDO may be updated. A password change requires the explicit operand NEWPWD.
Verbs SECCALL CHANGE Examples The following example changes the password of the user ID LYDIA from OLD to NEW: SECCALL CHANGE USERID=LYDIA NEWPWD=NEW PWD=OLD The following example changes the location only: ASSIGN MDO=&USER. MAP=$SEC &USER.LOCATION = " U.S.A." SECCALL CHANGE USERID=LYDIA MDO=&USER.
Verbs SECCALL CHECK SECCALL CHECK The SECCALL CHECK verb provides user ID and password validation. You use this verb to verify whether the specified user ID with its password is allowed to log on. SECCALL CHECK PWD=pppppppp USERID=uuuuuuuu PWD=pppppppp specifies the current password. USERID=uuuuuuuu specifies the user ID to be selected by the SECCALL operation. Considerations When SECCALL CHECK completes (after examining the user ID record in the user ID database), the &SYS.
Verbs SECCALL DELETE SECCALL DELETE The SECCALL DELETE verb deletes a user from the user ID database. You must have full UMS authority to execute this verb. SECCALL DELETE USERID=uuuuuuuu USERID=uuuuuuuu specifies the user ID to be selected by the SECCALL operation. uuuuuuuu must be an existing user ID. Considerations The &SYS.RETCODE system variable is set to 0 (zero) if the SECCALL DELETE completed without errors; otherwise, it is set to 4, in which case further information is available in &SYSMSG.
Verbs SECCALL EXIT SECCALL EXIT The SECCALL EXIT verb provides direct interaction between an NCL procedure and the installation's security exit. You use this verb in an NCL procedure to pass information to, and receive information from, the installation’s security exit. The data defined in the initial variables of the verb is passed to the exit. Any data returned from the exit is placed into the variables defined after the TO operand. The format of messages sent and received follows that of the map $NCL.
Verbs SECCALL EXIT RANGE=( start,end ) determines the range of variables specified by the VARS operand. See “Frequently Occurring Operands,” at the beginning of this section, for more information. SEGMENT=n specifies the amount of data (in bytes) to be put into the variables specified. See “Frequently Occurring Operands,” at the beginning of this section, for more information. DATA=text specifies the information to be passed from NonStop NET/MASTER MS to the installation's security exit.
Verbs SECCALL EXIT variable* specifies a set of input variables. See “Frequently Occurring Operands,” at the beginning of this section, for more information. RANGE=( start,end ) determines the range of variables specified by the VARS operand. See “Frequently Occurring Operands,” at the beginning of this section, for more information. SEGMENT=n specifies the amount of data (in bytes) to be put into the variables specified.
Verbs SECCALL GET SECCALL GET The SECCALL GET verb retrieves user ID information from the user ID database. SECCALL GET MDO=mdo-name [ OPT={ KEQ | KGT | KLT } ] USERID=uuuuuuuu MDO=mdo-name defines the name of the MDO stem variable into which the user information is to be placed. OPT specifies the relationship between the supplied search key and the matching entry, if one can be found.
Verbs SECCALL GET Example The following example obtains information about the user ID BOSTROM. The information is placed into the MDO &mydata.: SECCALL GET USERID=BOSTROM MDO=&mydata.
Verbs SECCALL QUERY SECCALL QUERY The SECCALL QUERY verb retrieves user ID information from memory for the current user. SECCALL QUERY MDO=mdo-name MDO=mdo-name defines the name of the MDO stem variable into which the user information is to be placed. You can obtain information only about the current user. Considerations See SECCALL GET which provides the same type of information as SECCALL QUERY but for any nominated user. SECCALL GET obtains its information from the user ID database on disk.
Verbs SECCALL UPDATE SECCALL UPDATE The SECCALL UPDATE verb updates user ID information held in the user ID database. UMS authority is required to issue this verb. SECCALL UPDATE MDO=mdo-name USERID=uuuuuuuu MDO=mdo-name defines the name of the MDO variable stem that contains the user information to be updated. USERID=uuuuuuuu contains the user ID to be selected by the SECCALL operation. uuuuuuuu must be an existing user ID. Considerations Read-only fields cannot be changed.
Verbs SECCALL UPDATE Example The following example updates the phone, UMS access, and system support information for the user ID BOSTROM: ASSIGN MDO=&DATA. MAP=$SEC &data.phone = 60-3-7654321 &data.ums_access = Y &data.sys_supp = Y SECCALL UPDATE USERID=BOSTROM MDO=&DATA.
Verbs START START The START verb invokes an NCL procedure for asynchronous execution in the specified environment using the specified variables. The invoking NCL process can execute the started NCL procedure in the current processing environment, a dependent processing environment, or a background processing environment. The invoking NCL process can synchronize execution with the started NCL process.
Verbs START RANGE=( start,end ) determines the range of variables specified by the ARGS operand. See “Frequently Occurring Operands,” at the beginning of this section, for more information. SEGMENT specifies the amount of data (in bytes) to be put into the variables specified. See “Frequently Occurring Operands,” at the beginning of this section, for more information. VARS specifies a list of variables to be passed to the started NCL process.
Verbs START CURRENT specifies the processing environment in which the invoking NCL process is currently executing. This is the primary processing environment associated with an OCS window, a dependent processing environment, or a background processing environment. DEPENDENT specifies the dependent processing environment associated with the invoking NCL process. BLOG specifies the background processing environment in which the Background Logger (BLOG) executes.
Verbs START YES specifies synchronization. The invoking NCL process does not continue execution until it receives the results of attempting to start the new NCL process. If execution is successful, &SYSMSG contains the NCL process identifier (NCL ID) of the started NCL process and &SYS.RETCODE contains a return code of 0 (zero); otherwise, &SYSMSG is not affected and &SYS.RETCODE contains a return code indicating an error.
Verbs START If you specify NOTIFY=YES, the &SYS.RETCODE system variable contains one of the following return codes after the START verb completes its operation: Return Code Description 0 4 8 12 16 No errors found. A procedure is required but a function was found. The procedure was found but it contains compilation errors. The procedure was not found in the NCL library search path. A load fail error occurred. See the &SYS.
Verbs START For more information on processing environments, refer to the NonStop NET/MASTER NCL Programmer's Guide. Examples The following example starts an NCL procedure called ABC in the current execution environment. Execution is not synchronized: START PROC=ABC The following example starts an NCL procedure called ABC in the dependent processing environment associated with the invoking NCL process.
Verbs START The following example starts an NCL procedure called ABC in the background processing environment in which LOGP executes. NCL searches for ABC, beginning with the user procedure library of LOGP. Execution is synchronized.
Verbs SWGUID SWGUID The SWGUID verb changes the Guardian user ID under which an NCL process is running. The new value must be one that is valid as defined for the user in the user’s current profile. The current profile is the profile of a user that exists in memory; this is not necessarily the same as the profile of the user that exists in the User ID Management Services (UMS) database.
Verbs SWGUID Example The following example is a complete NCL procedure, showing SWGUID. If the value of the Guardian user ID (100,112) is not allowed, the procedure does not change the Guardian user ID; if the value (100,112) is allowed, it becomes the new Guardian user ID: ONPROC: PROCEDURE SAY NCL PROC GUID IS &SYS.GUID.GROUP ", "&SYS.GUID.USER SWGUID NUMBER=(100,112) SAY NCL PROC GUID IS &SYS.GUID.GROUP ", "&SYS.GUID.
Verbs VARTABLE ADD VARTABLE ADD The VARTABLE ADD verb adds an entry to an existing memory-resident table of variables (vartable). A return code is set in the &SYS.FDBK system variable if the operation is unsuccessful. Syntax errors in the VARTABLE ADD statement cause the NCL procedure to terminate.
Verbs VARTABLE ADD ENV specifies that the named table is visible to all NCL processes executing in the current environment. GLOBAL specifies that the named table is visible to all NCL processes executing in the current NonStop NET/MASTER MS system. PROCESS specifies that the named table is visible to the current NCL process only. This includes all NCL procedures in the current NCL process. REGION specifies that the named table is visible to all NCL processes executing in the current region.
Verbs VARTABLE ADD FIELDS=fieldlist specifies the information you want to store. fieldlist is a list of names in the format shown next: name ( name ) ( name, name… ) name must be one of the values shown in the following table; the names are mutually exclusive: Value Description DATAn or Dn Specifies that you are supplying a data value for the nth data field in this entry. The value of n must be from 1 through 128. You may have several DATAn entries as long as each entry has a unique number n.
Verbs VARTABLE ADD Considerations The &SYS.FDBK system variable is set after a VARTABLE ADD statement, indicating one of the following results: Return Code Description 0 1 The entry was added successfully. The entry was added successfully. The table was at the limit specified by the VARTABLE ALLOC, and DELOLD=YES was specified with VARTABLE ALLOC. The oldest entry was deleted to make room for this entry. An entry with the supplied key value already exists.
Verbs VARTABLE ALLOC VARTABLE ALLOC The VARTABLE ALLOC verb defines a new memory-resident table of variables (vartable). The table, as defined, contains no entries. Once defined, other VARTABLE verbs may refer to the table. Syntax errors in the VARTABLE ALLOC statement cause the NCL procedure to terminate.
Verbs VARTABLE ALLOC Note For further information about NCL processes executing in Guardian processes, see the NonStop NET/MASTER MS System Management Guide. ENV specifies that the named table is visible to all NCL processes executing in the current environment. GLOBAL specifies that the named table is visible to all NCL processes executing in the current NonStop NET/MASTER MS system. PROCESS specifies that the named table is visible to the current NCL process only.
Verbs VARTABLE ALLOC DATA={ 1 | n } specifies how many data fields may be stored in each table entry. A number from 1 through 512 may be specified. The maximum number of characters contained in one or more data fields must not exceed 32000, subject to the amount of memory available to the process. DELOLD specifies whether VARTABLE ADD or VARTABLE PUT (when adding) may delete the oldest entry automatically, if the table is full (for tables allocated with a LIMIT that is not 0 (zero)).
Verbs VARTABLE ALLOC LIMIT specifies whether the table is to have a limit on the number of entries. 0 specifies that the table can have any number of entries. n specifies that no more than n entries (for n equal to 1 through 1,000,000) can be added to the table. If a VARTABLE ADD or VARTABLE PUT causes this limit to be exceeded, and DELOLD=NO is specified, the addition is not performed, and the &SYS.FDBK system variable is set to 24 for the VARTABLE PUT and VARTABLE ADD verbs.
Verbs VARTABLE ALLOC SCOPE=G90PRC is used when NCL processes running in the same Guardian process need to access a vartable that is not visible to NCL processes running in other Guardian processes. A table of the same name may be allocated in each of the five scopes. For example, an NCL procedure could allocate a table called TAB1 with a scope of PROCESS, another with a scope of ENV, G90PRC, GLOBAL, or REGION.
Verbs VARTABLE DELETE VARTABLE DELETE The VARTABLE DELETE verb deletes an entry from an existing memory-resident table of variables (vartable). The delete operation can occur concurrently with vartable updating in other processes. If you want to delete or update a vartable entry, it is recommended that you use a correlator to synchronize any accesses to the entry. See the VARTABLE GET verb in this section for a definition of a correlator. A return code is set in the &SYS.
Verbs VARTABLE DELETE G90PRC specifies that the visibility of the named table is restricted to NCL processes executing in the same Guardian process. This option is useful to improve performance when some sharing is necessary but full global scope is not required. Note For further information about NCL processes executing in Guardian processes, see the NonStop NET/MASTER MS System Management Guide. ENV specifies that the named table is visible to all NCL processes executing in the current environment.
Verbs VARTABLE DELETE name must be one of the values shown in the following table; the names are mutually exclusive: Value Description .USERCORR or USERCORR A user correlator value, obtained from a previous VARTABLE GET, is supplied to check for synchronization. The corresponding variable in the VARS list has the value. VARS=output-vars-list specifies the NCL variables that contain the information for each entry in fieldlist.
Verbs VARTABLE DELETE For more information on VARTABLE verbs, refer to the NonStop NET/MASTER NCL Programmer's Guide. Example The following example deletes the entry with key value KEY001 in the private (SCOPE=PROCESS) VARTABLE called MYTABLE. If there is no entry with that key, the &SYS.
Verbs VARTABLE FREE VARTABLE FREE The VARTABLE FREE verb deletes (frees) an existing memory-resident table of variables (vartable). Use this verb to delete all entries in the table and the table definition itself. This verb also frees all storage associated with the table. Syntax errors in the VARTABLE FREE statement cause the NCL procedure to terminate. VARTABLE FREE ID=tablename [ SCOPE={ CACHED | G90PRC | ENV | GLOBAL | PROCESS | REGION } ] ID=tablename specifies the table to be freed.
Verbs VARTABLE FREE GLOBAL specifies that the named table is visible to all NCL processes executing in the current NonStop NET/MASTER MS system. PROCESS specifies that the named table is visible to the current NCL process only. This includes all NCL procedures in the current NCL process. REGION specifies that the named table is visible to all NCL processes executing in the current region.
Verbs VARTABLE GET VARTABLE GET The VARTABLE GET verb retrieves (gets) an entry from an existing memory-resident table of variables (vartable). It is not necessary to know the exact key of the record. The VARTABLE GET verb must be used if a user wants to know the current value of the correlator for an entry in the table. This information is important if an entry is going to be changed or deleted.
Verbs VARTABLE GET G90PRC specifies that the visibility of the named table is restricted to NCL processes executing in the same Guardian process. This option is useful to improve performance when some sharing is necessary but full global scope is not required. Note For further information about NCL processes executing in Guardian processes, see the NonStop NET/MASTER MS System Management Guide. ENV specifies that the named table is visible to all NCL processes executing in the current environment.
Verbs VARTABLE GET DELETE specifies whether the retrieved entry is to be deleted. DELETE=NO specifies that the entry is not deleted. DELETE=YES specifies that the retrieved entry is deleted from the table. NO specifies that NCL does not delete the entry. YES specifies that NCL deletes the entry. FIELDS=fieldlist specifies the information you want to retrieve.
Verbs VARTABLE GET VARS=output-vars-list specifies the NCL variables that contain the information for each entry in fieldlist. There is a one-to-one correspondence from each entry in output-vars-list to the same entry in fieldlist. The first entry in output-vars-list specifies the variable containing the data for the first entry in fieldlist. If fieldlist includes DATA* or D*, the associated VARS list entry must be in the format prefix*.
Verbs VARTABLE GET GEN specifies the lowest key value generically equal to (matching) the supplied search key for its nonblank length. It may have other characters after it. IGEN specifies the longest nonblank key value that matches the search argument. If the key specified in KEY=&keyname is “ABCDE,” the search looks for a record beginning with all five characters. If no record is found, the search is restarted using a new search key equal to the old one, with the last nonblank character deleted.
Verbs VARTABLE GET When the VARTABLE GET verb is issued with SCOPE=GLOBAL for a global vartable for which a local cache copy exists, all such copies are deleted in all operating system processes; this allows an application to remove the cache during periods of heavy updating. SCOPE=CACHED and AGE=YES are incompatible and result in a compilation error. You must use AGE=NO with SCOPE=CACHED. See also VARTABLE ALLOC, which sets the correlation protection option.
Verbs VARTABLE GET The following example shows the use of VARTABLE GET with SCOPE=CACHED to obtain a local copy of a global vartable. This example allocates a global vartable called GTABLE. The process then adds two entries in the same vartable and specifies the vartable as a local cached table. Both the local cached vartable and the global vartable are updated at the same time.
Verbs VARTABLE PUT VARTABLE PUT The VARTABLE PUT verb adds to or updates an entry in an existing memory-resident table of variables (vartable). If there is no entry with a matching key, the entry is added. If an entry with a matching key already exists, the entry is updated. The PUT operation can occur concurrently with vartable updating in other processes. If you want to delete or update a vartable entry, it is recommended that you use a correlator to synchronize any accesses to the entry.
Verbs VARTABLE PUT G90PRC specifies that the visibility of the named table is restricted to NCL processes executing in the same Guardian process. This option is useful to improve performance when some sharing is necessary but full global scope is not required. Note For further information about NCL processes executing in Guardian processes, see the NonStop NET/MASTER MS System Management Guide. ENV specifies that the named table is visible to all NCL processes executing in the current environment.
Verbs VARTABLE PUT FIELDS=fieldlist specifies the information you want to store. fieldlist is a list of names in the format: name ( name ) ( name, name… ) name must be one of the values shown in the following table; the names are mutually exclusive: Value Description DATAn or Dn Specifies that you are supplying a data value for the nth data field in this entry. The value of n must be from 1 through 128. You may have several DATAn entries as long as each entry has a unique number n.
Verbs VARTABLE PUT Considerations The &SYS.FDBK system variable is set after a VARTABLE PUT statement, indicating one of the following results: Return Code Description 0 1 The entry was updated successfully. The entry was added successfully. The table was at the limit specified by the VARTABLE ALLOC, and DELOLD=YES was specified with VARTABLE ALLOC. The oldest entry was deleted to make room for this entry.
Verbs VARTABLE PUT Examples The following example adds an entry to the private (SCOPE=PROCESS) vartable called MYTABLE. The entry obtains a key value of KEY001 and a data content of DATA001: &K = KEY001 &D = DATA001 VARTABLE PUT ID=MYTABLE KEY=&K FIELDS=DATA1 VARS=&D The following example builds a table containing uniquely identified messages received in a MSGPROC, the identifier being the first word of the message. The data for each entry is the last complete message text with that identifier.
Verbs VARTABLE QUERY VARTABLE QUERY The VARTABLE QUERY verb obtains information about a memory-resident table of variables (vartable). You use this verb in an NCL procedure to inquire about the existence of a given vartable. If it exists, you can optionally retrieve attribute information. Syntax errors in the VARTABLE QUERY statement cause the NCL procedure to terminate.
Verbs VARTABLE QUERY GLOBAL specifies that the named table is visible to all NCL processes executing in the current NonStop NET/MASTER MS system. PROCESS specifies that the named table is visible to the current NCL process only. This includes all NCL procedures in the current NCL process. REGION specifies that the named table is visible to all NCL processes executing in the current region.
Verbs VARTABLE QUERY VARS=output-vars-list specifies the NCL variables that receive the information for each entry in fieldlist. There is a one-to-one correspondence from each entry in output-vars-list to the same entry in fieldlist. The first entry in output-vars-list specifies the variable containing the data for the first entry in fieldlist. Considerations The &SYS.
Verbs VARTABLE RESET VARTABLE RESET The VARTABLE RESET verb deletes all entries from an existing memory-resident table of variables (vartable). It allows an NCL procedure to delete multiple entries from an existing VARTABLE while preserving the definition of the table. Syntax errors in the VARTABLE RESET statement cause the compilation of the NCL procedure to terminate.
Verbs VARTABLE RESET ENV specifies that the named table is visible to all NCL processes executing in the current environment. GLOBAL specifies that the named table is visible to all NCL processes executing in the current NonStop NET/MASTER MS system. PROCESS specifies that the named table is visible to the current NCL process only. This includes all NCL procedures in the current NCL process. REGION specifies that the named table is visible to all NCL processes executing in the current region.
Verbs VARTABLE RESET See also VARTABLE DELETE and VARTABLE FREE. VARTABLE DELETE deletes a single entry from an existing vartable. VARTABLE FREE deletes an entire vartable and all associated storage. For more information on cached vartables, see VARTABLE GET, earlier in this section. For more information on VARTABLE verbs, refer to the NonStop NET/MASTER NCL Programmer's Guide.
Verbs VARTABLE UPDATE VARTABLE UPDATE The VARTABLE UPDATE verb updates an entry in an existing memory-resident table of variables (vartable). The update operation can occur concurrently with vartable updating in other processes. If you want to delete or update a vartable entry, it is recommended that you use a correlator to synchronize any accesses to the entry. See the VARTABLE GET verb in this section for an explanation of a correlator.
Verbs VARTABLE UPDATE Note For further information about NCL processes executing in Guardian processes, see the NonStop NET/MASTER MS System Management Guide. ENV specifies that the named table is visible to all NCL processes executing in the current environment. GLOBAL specifies that the named table is visible to all NCL processes executing in the current NonStop NET/MASTER MS system. PROCESS specifies that the named table is visible to the current NCL process only.
Verbs VARTABLE UPDATE FIELDS=fieldlist specifies the information you want to store. The fieldlist is a list of names in the format: name (name) (name, name… ) name must be one of the values shown in the following table; the names are mutually exclusive: Value Description DATAn or Dn Specifies that you are supplying a data value for the nth data field in this entry. The value of n must be from 1 through 128. You may have several DATAn entries as long as each entry has a unique number n.
Verbs VARTABLE UPDATE Considerations The &SYS.FDBK system variable is set after a VARTABLE UPDATE statement, indicating one of the following results: Return Code 0 4 8 12 16 20 Description The entry was updated successfully. No entry with the supplied key value exists. An entry with the supplied key value exists but the supplied user correlator value did not match the user correlator value in that entry. The supplied key value was longer than the table key length.
Verbs VARTABLE UPDATE Examples The following example updates an entry in the private (SCOPE=PROCESS) VARTABLE called MYTABLE. The entry obtains a key value of KEY001 and updates its three data fields with a data content of DATA001, DATA002, and DATA003.
Verbs WRITE WRITE The WRITE verb writes a message or delivers it to the execution environment of the NCL process: this can be to the user's terminal, to the activity log, or to all monitor class users. With this verb, it is possible to write to another NCL process and pass an MDO to it. When the WRITE verb is invoked by an NCL procedure started by using the INTCMD verb, the output (that would otherwise go to the user’s terminal) is obtained only by using the INTREAD verb.
Verbs WRITE ALL specifies whether the message is to be written to all OCS users. This operand also determines whether or not the message is also written to dependent environments profiled to receive general broadcast messages. NO specifies that the message is not written to all OCS users. YES specifies that the message is written to all OCS users and dependent environments that are profiled to receive such messages. ARGS specifies a range of variables.
Verbs WRITE RANGE=( start,end ) determines the range of variables specified by the VARS operand. See “Frequently Occurring Operands,” at the beginning of this section, for more information. SEGMENT=n specifies the amount of data (in bytes) to be put into the variables specified. See “Frequently Occurring Operands,” at the beginning of this section, for more information. MDO=&mdo-name specifies that an MDO, with the name &mdo-name, is to be stored in the enclosed MDO user variable element of the message.
Verbs WRITE HIGH specifies that the message is displayed in high intensity. LOW specifies that the message is displayed in normal intensity. LOG specifies whether the message is to be written to the NonStop NET/MASTER MS activity log. NO specifies that the message is not written to the NonStop NET/MASTER MS activity log. YES specifies that the message is written to the NonStop NET/MASTER MS activity log. LUNAME=luname specifies the logical name of the terminal to which the message is to be sent.
Verbs WRITE MSGCODE=xx contains a two-character hexadecimal message delivery code. The message is received only by those OCS users whose user profile message code gives a nonzero result after a Boolean AND operation with the value specified by xx. This facility provides the installation with the means to develop and control delivery of messages in a variety of classes designed to meet the needs of the installation.
Verbs WRITE SCAN specifies that the message can contain strings of characters delimited by “at” signs (@). If you specify the YES option, NCL scans the message before it is displayed and removes the @ signs. They are replaced by the appropriate attribute settings to turn highlighting on and off at the terminal. The first @ sign turns highlighting on. Thereafter the intensity alternates with each @ sign. NO specifies that NCL does not scan the message.
Verbs WRITE DATA=rest-of-statement specifies the text of the message you want to display at the terminal and/or write to the activity log. If the message contains references to variables, NCL performs normal variable substitution prior to sending the message. Text can be in uppercase and lowercase. If no text is supplied, a blank line is displayed or written.
Verbs WRITE The following example specifies that you want the text “ring” to be written to your OCS window. The message is written in red with reverse highlighting. The terminal alarm rings when the message is received. The message is also logged to NonStop NET/MASTER MS activity log: WRITE ALARM=YES LOG=YES COLOR=RED HLITE=REVERSE DATA=ring The following example sends an MDO mapped by the map $MSG, and also specifies the DATA operand to send some text.
Verbs WRITE (This page left intentionally blank) 3–232 106126 Tandem Computers Incorporated
4 Built-in Functions Built-in functions provide information that would otherwise require extensive coding to acquire. This section describes all built-in functions available in NCL, including: A brief overview of the built-in function. A diagram showing the syntax of the built-in function. Descriptions of each operand in the built-in function. Considerations that affect the usage of the built-in function. A list of related built-in functions, verbs, or other NCL statements.
Built-in Functions Summary of Built-in Functions Table 4-1. List of Built-in Functions (Page 2 of 3) Built-in Function Description COPIES D2C D2X DATATYPE DATE DATECONV DELSTR DELWORD E2A INSERT JUSTIFY LASTPOS LEFT LENGTH LOWER MASKCHK MAX MIN NAMTONOD NEXTFILE NEXTSVOL NODTONAM NOYES Returns a string made up of repetitions of another string. Converts a decimal number to an ASCII character string. Converts a decimal number to a hexadecimal string. Tests a string for a specified data type.
Built-in Functions Summary of Built-in Functions Table 4-1. List of Built-in Functions (Page 3 of 3) Built-in Function Description STRIP SUBSTR Strips leading and/or trailing occurrences of a specified character from a string. Extracts a substring from a string, starting from a specified character position within the string. Extracts a substring from a string, starting from a specified word in the string. Tests the supplied name to determine if it is a valid NCL variable name.
Built-in Functions A2E A2E The A2E built-in function translates an input string from ASCII to EBCDIC. A2E( string [, T ] ) string specifies the ASCII source string. T specifies that textual translation is to be performed. The ASCII string is assumed to be textual data. This option is implied if omitted. No special consideration is given to signed decimal number codes. Considerations Table 4-2 shows the standard translation table, indexed by the ASCII code.
Built-in Functions A2E Characters that have no EBCDIC equivalent are translated to ‘FF’x. See also E2A, which translates EBCDIC to ASCII. Examples The hexadecimal string ‘C1C2C3F1F2F3’x can be displayed on your OCS window if you use the C2X built-in function on the resulting EBCDIC string, as in the following example.
Built-in Functions ABBREV ABBREV The ABBREV built-in function tests a string for a valid abbreviation by comparing its leading characters to an abbreviation in another string. If the strings match, it is a true condition, and 1 is returned. A false match returns a value of 0 (zero). The case of both strings must match; that is, both must be either lowercase or uppercase. ABBREV( string, abbreviation [, length ] ) string specifies the string that is to be tested.
Built-in Functions ABS ABS The ABS built-in function returns the absolute value of a number. ABS( number ) number specifies the numeric expression for which the absolute value is to be returned. Consideration A numeric value outside the supported range (1e-50 to 1e+50) results in an error. Examples The following example returns the absolute value of 12.34, which is 12.34: &RESULT = ABS(12.34) The following example returns the absolute value of 0012.3400, which is 12.34: SAY ABS(0012.
Built-in Functions B2C B2C The B2C built-in function converts a string of binary digits to characters. B2C( string ) string specifies the source data to be converted. It must consist of 0s (zeros), 1s, or spaces. Spaces are permitted only at byte boundaries, not at the start or end of the string. A binary string can consist of any number of 0s or 1s; these are converted into characters to form one or more bytes. A null string returns a null string.
Built-in Functions BITAND, BITOR, and BITXOR BITAND, BITOR, and The BITAND, BITOR, and BITXOR built-in functions perform, respectively, logical BITXOR AND, OR, and exclusive OR (XOR) operations on two strings. See “Considerations,” next, for a definition of these terms. BITAND( string1 [, [ string2 ] [, pad ] ] ) BITOR( string1 [, [ string2 ] [, pad ] ] ) BITXOR( string1 [, [ string2 ] [, pad ] ] ) BITAND performs a logical AND operation on the strings.
Built-in Functions BITAND, BITOR, and BITXOR Logical or Boolean AND operation (AND): If in the comparison of two strings, both strings contain 1 in the same corresponding bit position, the result is 1; otherwise, the result is 0 (zero). Logically: 1 AND 1=1 1 AND 0=0 0 AND 1=0 0 AND 0=0 Logical or Boolean OR operation (OR): If in the comparison of two strings, either string has 1 in the same corresponding bit position, the result is 1; otherwise, the result is 0 (zero).
Built-in Functions BITAND, BITOR, and BITXOR In the following example, a logical exclusive OR (XOR) operation is performed on the strings '12'x and '22'x: SAY BITXOR('12'x,'22'x) The output string is 0 (zero) or hexadecimal '30'x.
Built-in Functions BOOLEXPR BOOLEXPR The BOOLEXPR built-in function analyzes or evaluates a complex Boolean expression. The expression can be analyzed for syntactic correctness or completely evaluated, after which the logical result is made available. You can supply the values either directly (using quoted strings) or indirectly (using variables). The expression syntax supports the full use of the AND, OR, and NOT Boolean operators, and the simple and strict relational operators.
Built-in Functions BOOLEXPR expr specifies a Boolean expression. NOT specifies the Boolean NOT operator. The backslash (\) is synonymous with this operator. AND specifies the Boolean AND operator. The ampersand (&) is synonymous with this operator. If you use the ampersand for AND, you may require a trailing blank after the ampersand if it is followed by a word such as NOT and if the ampersand is also the variable designator. OR specifies the Boolean OR operator.
Built-in Functions BOOLEXPR ALL for a Boolean expression that contains a list of left operands, specifies that the test of the Boolean expression is true if all left operands pass the test. Evaluation of the list stops if any left operand fails the test. Specifying ALL allows you to override the default processing of lists of operands on the left side of an operator. left_operand [ [, left_operand ] … ] specifies the operand(s) on the left side of an operator.
Built-in Functions BOOLEXPR the FOLD and NOFOLD modifiers, or the FOLD and NOFOLD parameters if no modifier is specified. Specifying the NUMERIC modifier forces a numeric comparison. The following table lists simple relational operators: Operator Operation = \= < > <= >= Simple equal to Simple not equal to Simple less than Simple greater than Simple less than or equal to Simple greater than or equal to Strict relational operators perform a character comparison.
Built-in Functions BOOLEXPR sign (%) as a wild card in the right operand to match zero or more characters in the left operand, and the underscore (_) as a wild card in the right operand to match a single character in the left operand. The LIKE operator honors the FOLD and NOFOLD modifiers, or the FOLD and NOFOLD parameters if no modifier is specified. IS [ NOT ] performs a type check on the left operands using the criteria specified by the right operands. Only variables can be specified as left operands.
Built-in Functions BOOLEXPR You can specify either single quotes (' ') or double quotes (" "). You can represent an occurrence of the quote character in the value by using two adjacent quote characters of the same type or by using the alternate quote character to surround the value. variable specifies a variable. If a variable is compared to a number and the variable value is either null or nonnumeric, the result after evaluation is BAD.
Built-in Functions BOOLEXPR NUMERIC specifies a numeric comparison. This is required only when comparing a variable to another variable. If either variable is nonnumeric, the result after evaluation is BAD. The NUMERIC modifier is invalid when used with the GENERIC modifier. FOLD causes lowercase alphabetic characters to be converted to uppercase alphabetic characters. This modifier overrides the NOFOLD parameter for individual tests in the expression.
Built-in Functions BOOLEXPR EVAL specifies that the Boolean expression is to be validated and then, if it is syntactically correct, to be evaluated. If the expression is invalid, the result after validation is INVALID. If the expression is valid, the result after evaluation is 1 (true), 0 (false), or BAD. See “Considerations” for a detailed description of these values. NOEVAL specifies that the Boolean expression is to be validated, but that evaluation is to be suppressed.
Built-in Functions BOOLEXPR Syntax errors in the EVAL, NOEVAL, FOLD, NOFOLD, and subchar parameters result in an NCL error: a compilation error if the parameter is a constant and a run-time error if the parameter is a variable (into which a value is substituted). Syntax errors in the Boolean expression or data validity errors do not result in an NCL error, but result in either INVALID or BAD. You cannot specify constants on both sides of any operator. At least one side must consist solely of variables.
Built-in Functions BOOLEXPR In the following example, &b contains an invalid value. NCL raises a run-time error (26), which reports an error in parameters passed to a built-in function: &a = "ABCD" &b = "ZZZZ" &result = BOOLEXPR( "&a IS ALPHANUM",, &b ) In the following example, the value of &a is evaluated to determine if it contains a valid date format (specified by DATE1).
Built-in Functions BOOLEXPR In the following example, the tilde (~) is used as the variable designator and a wild card (%) is used to match zero or more characters. The value of &a is evaluated to determine if its first character is A and its last character is D (the letters in the right operand are converted to uppercase).
Built-in Functions BOOLEXPR In the following example, the value of &char1 is evaluated to determine if it is not between the values of &char2 and &char3. The result is false, so NCL returns a value of 0 (zero): &char1 = b &char2 = a &char3 = c &result = BOOLEXPR( "&char1 \= &char2:&char3" ) In the following example, the value of &num is evaluated to determine if it is between 1 and the value of &a. However, the value of &a is nonnumeric.
Built-in Functions BOOLEXPR In the following example, the expression is evaluated to determine if any of 5, 6, or 4 match any of the values of &num2, &num3, or &num1. The result is true, so NCL returns a value of 1: &num1 = &num2 = &num3 = &result 5 6 4 = BOOLEXPR( "ANY '5', '6', '4' =", "ANY &num2, &num3, &num1" ) In the following example, the expression is evaluated to determine if all of 5, 6, and 4 match all of the values of &num2, &num3, and &num1.
Built-in Functions BOOLEXPR The following example shows a complex Boolean expression. The tilde (~) is used as the variable designator by use of the subchar clause. The ampersand (&), vertical bar (|), and backslash (\) represent the AND, OR, and NOT operators, respectively.
Built-in Functions C2B C2B The C2B built-in function converts a string to its binary equivalent. It expands each byte in the character string to eight 0s and/or 1s, giving an output bit string as the returned value. C2B( string ) string specifies the source data to be converted. Considerations A null string returns a null string. See also B2C, which converts a string of binary digits to characters.
Built-in Functions C2D C2D The C2D built-in function converts a character string to a decimal number. The string can be signed or unsigned. C2D( string [, n ] ) string specifies the source data to be converted. n specifies an optional length for the converted value. If omitted, the string is considered as an unsigned binary number. If n is specified and the length of string is greater than n, it is truncated on the left.
Built-in Functions C2X C2X The C2X built-in function converts a string to its hexadecimal equivalent. C2X( string) string specifies the string to be converted. Considerations A null input string returns a null string. The resulting output is exactly twice as long as the input string. An input string must not be greater than 16,000 characters. An output string longer than the maximum supported length of 32,000 characters results in an error.
Built-in Functions CENTER CENTER The CENTER built-in function centers text within a string. The output string is padded or truncated at either end to meet the requirements of a length operand. Note This built-in function may be spelled CENTRE. CENTER( string, length [, pad ] ) string specifies the text string to be centered. length specifies the length of the resulting string. pad specifies the character to be used to pad the resulting string. The default pad character is a space.
Built-in Functions COMPARE COMPARE The COMPARE built-in function compares two strings and returns the numerical position of the first differing character. The shorter string is padded with the pad character to make both strings equal in length. If the strings are identical, 0 (zero) is returned. COMPARE( string1, string2 [, pad ] ) string1 specifies the first string. string2 specifies the second string, which is compared with string1. pad specifies the character to be used to pad the shorter string.
Built-in Functions COPIES COPIES The COPIES built-in function returns a string made up of repetitions of another string. An output string longer than the maximum supported length of 32,000 characters results in an error. COPIES( string, n ) string specifies the string to be copied. n specifies the number of times the specified string is to be copied. n must be a nonnegative whole number.
Built-in Functions D2C D2C The D2C built-in function converts a decimal number to an ASCII character string. D2C( wholenumber [, n ] ) wholenumber specifies the number to be converted. If you specify a wholenumber of 0 (zero), NCL returns a null string. n specifies an optional length (0 (zero) through 4) for the resulting output string. The binary representation of wholenumber is sign-extended or truncated to fit within the length n.
Built-in Functions D2X D2X The D2X built-in function converts a decimal number to a hexadecimal string. D2X( wholenumber [, n ] ) wholenumber specifies the number to be converted. If you specify a wholenumber of 0 (zero), NCL returns a null string. n specifies the length (0 (zero) through 8) of the resulting output string. The hexadecimal representation of the number is sign-extended or truncated to fit within the specified length n.
Built-in Functions DATATYPE DATATYPE The DATATYPE built-in function tests a string for a specified data type. Depending on the type that you specify, the result can be a true value of 1 or a false value of 0 (zero). If you do not specify a type, and the string is wholly numeric, the value NUM is returned. Otherwise the value CHAR is returned. DATATYPE( string [, type ] ) string specifies the string to be tested.
Built-in Functions DATATYPE S (symbol) string is a valid symbol. U (uppercase) string contains only the characters A through Z. W (whole number) string contains a valid whole number (integer). The maximum allowed value of the number is 32767. Consideration See also TYPECHK, which performs type checking on one or more strings for all the types discussed here, and others. Examples In the following example, no value is specified for type.
Built-in Functions DATE DATE The DATE built-in function provides the current date in one of the specified formats. DATE( [ format ] ) format specifies the format in which the date is to be returned. If format is omitted, the value N (normal) is assumed. Table 4-3 lists the formats that you can use. The examples supplied assume that the current system date is 17-AUG-1994. Table 4-3.
Built-in Functions DATE Considerations The &SYS.DATE.n system variable, where n can be 1 through 11, can provide most of the formats of the DATE built-in function. See also DATECONV and TIME. The DATECONV built-in function changes one date format to a different date format. The TIME built-in function returns the current time in one of several formats. See also the &SYS.DATE.n and &SYS.DATE.DAY system variables in Section 5, “System Variables.” &SYS.DATE.
Built-in Functions DATECONV DATECONV The DATECONV built-in function changes one NCL date format to a different NCL date format. A variation to the date may be added or subtracted during the conversion. Table 4-3 lists the date formats supported by NCL. DATECONV( informat, indate, outformat [, variation ] ) informat specifies the format code of the date to be converted. This format code has the same meaning as defined in the DATE built-in function.
Built-in Functions DATECONV In the following example, the Julian date 94296 is converted to the normal (N) format. The date is adjusted by two days.
Built-in Functions DELSTR DELSTR The DELSTR built-in function deletes part of a string, starting at a specified character position, for a specified length. DELSTR( string, n [, length ] ) string specifies the string. n specifies the character position at which deletion starts. n must be a positive whole number. If n specifies a character position beyond the end of the string, the deletion is ignored. length specifies the number of characters to delete.
Built-in Functions DELWORD DELWORD The DELWORD built-in function deletes a specified number of words from a string, starting at a specified word. In this context, a word consists of one or more characters separated by spaces. Care must be taken if the word contains any special characters such as arithmetic or Boolean operators. In this case, the string must be enclosed in quotes for this built-in function to work correctly. See the second example following.
Built-in Functions E2A E2A The E2A built-in function translates an input string from EBCDIC to ASCII. E2A( string [, T ] ) string specifies the EBCDIC string. The output string is the same length. T specifies that textual translation is to be performed. The EBCDIC string is assumed to be textual data. This option is implied if omitted. No special consideration is given to signed decimal number codes. Considerations Characters that have no ASCII equivalent are translated to 'FF'x.
Built-in Functions E2A See also A2E, which performs ASCII-to-EBCDIC character translation. Example The following example translates the EBCDIC text 'C1C2C3F1F2F3'x (“ABC123”) to ASCII: &A = 'C1C2C3F1F2F3'X &RESULT = E2A(&A) The output (ASCII) string is '414243313233'x (“ABC123”).
Built-in Functions INSERT INSERT The INSERT built-in function inserts one string into another. INSERT( new, target [, [ n ] , [ length ] [, pad ] ] ) new specifies the string to be inserted. target specifies the string into which new is to be inserted. Note target remains unchanged; it does not receive the result of any insertion. n specifies the character position at which new is to be inserted. If 0 (zero) is specified, new is inserted at the front of target. n must be a positive whole number.
Built-in Functions INSERT In the following example, NCL inserts the string “123” into the string “abc” at character position 5: &A = 123 &B = ABC &C = 5 &D = 6 &RESULT = INSERT(&A,&B,&C,&D) In the previous example, NCL pads the string “abc” with default pad characters (spaces) to a length of five characters. NCL pads the string “123” with spaces to a length of six characters. The output string is “abc 123 ”. Two spaces follow “abc” and three spaces follow “123”.
Built-in Functions JUSTIFY JUSTIFY The JUSTIFY built-in function inserts spaces or a user-specified pad character into a string. NCL first normalizes the string by removing all leading and trailing spaces. Next, any multiple occurrences of spaces within the given string are replaced by a single space character. Finally, the pad character then replaces the spaces, evenly from left to right, to the required specified length of the string.
Built-in Functions JUSTIFY In the following example, the string “The blue sky” is justified to eight characters in length. The output string is “The blue”, with a single space between each word: &A = The blue sky &B = 8 &RESULT = JUSTIFY(&A,&B) In the following example, the string “The blue sky” is justified to nine characters in length. The pad character is “+”.
Built-in Functions LASTPOS LASTPOS The LASTPOS built-in function locates the last occurrence of a substring within a string. The search starts at the last character of the string and scans backwards, unless you specify an optional starting position. The value returned is the character position of the substring within the string being searched. 0 (zero) is returned if the substring does not exist. LASTPOS( needle, haystack [, start ] ) needle specifies the substring to be searched for.
Built-in Functions LASTPOS In the following example, NCL searches the string “abc def ghi” for a space. The starting character position for the search is specified as character position 7. The last occurrence of a space is found at character position 4: &A = " " &B = ABC DEF GHI &C = 7 &RESULT = LASTPOS(&A,&B,&C) In the following example, NCL searches the string “abcdefghi” for a space. The last occurrence of a space is not found.
Built-in Functions LEFT LEFT The LEFT built-in function returns the leftmost characters of a string. LEFT( string, length [, pad ] ) string specifies the source string. length specifies the number of characters to be returned. This operand must always be a nonnegative whole number. pad specifies the pad character to be used. The default is a space.
Built-in Functions LENGTH LENGTH The LENGTH built-in function returns the length of a specified string. Each space is counted as one character. LENGTH( string ) string specifies the string that is measured. Examples The following example counts the length of the specified string.
Built-in Functions LOWER LOWER The LOWER built-in function converts a specified string to lowercase characters in the native (ASCII) character set. The native character set must be used. LOWER(string) string specifies the string to be converted. Consideration See also TRANSLATE and UPPER. The TRANSLATE built-in function translates all or part of a specified string according to input and output translation tables.
Built-in Functions MASKCHK MASKCHK The MASKCHK built-in function tests a string against a mask. MASKCHK( mask, data [, wildcard ] ) mask specifies the selection mask. If the last character in mask is a wild card, any data strings that match the mask, whether they are longer or shorter, return one of the equal results listed later. Testing of the mask against the string is performed on a character-by-character basis, from left to right.
Built-in Functions MASKCHK Considerations A mask is any combination of characters used as a reference string in the comparative testing of the contents of another supplied string. Each character of the mask is compared with each character of the supplied string, from left to right, to provide one of the four possible results defined previously. A wild-card character in the mask is accepted by NCL as equivalent to any character in the string. See also ABBREV, which tests a string for a valid abbreviation.
Built-in Functions MAX MAX The MAX built-in function returns the highest number in a set of numbers. Nesting of the MAX built-in function is permitted. See the second example following. MAX( number [, number… ] ) number specifies the set of numbers to be evaluated. Each number can be an expression. The number of arguments cannot exceed the NCL limit of 32,000. Consideration See also MIN, which returns the lowest number in a set.
Built-in Functions MIN MIN The MIN built-in function returns the lowest number in a set of numbers. Nesting of the MIN built-in function is permitted. See the second example following. MIN( number [, number… ] ) number specifies the set of numbers to be evaluated. Each number can be an expression. The number of arguments cannot exceed the NCL limit of 32,000. Consideration See also MAX, which returns the highest number in a set of numbers.
Built-in Functions NAMTONOD NAMTONOD The NAMTONOD built-in function converts a system name to its corresponding system number. NAMTONOD( system-name ) system-name specifies the alphanumeric name of the system. Considerations If system-name is not known, or if the system is inoperative, the number 255 is returned. system-name must begin with a backslash (\). The name following the backslash must begin with an alphabetic character and can be followed by up to seven alphanumeric characters.
Built-in Functions NEXTFILE NEXTFILE The NEXTFILE built-in function returns the name of the next file after the one specified; optionally, NCL can return further detailed information about the file. NCL returns the next file name in alphabetic sequence within the subvolume. NEXTFILE( file-spec [, detail ] ) file-spec specifies the name of the file. The supplied file-spec must be formatted as follows: [ \systemname. ]$volume.subvolume[ .
Built-in Functions NEXTFILE Considerations Names of temporary files are not returned. If the file name is omitted, NCL returns the first file name in the subvolume. If the file name is invalid, or if there is no next file in the specified subvolume, a null value is returned. file-spec can contain up to 34 characters. See also NEXTSVOL, which returns the name of the next subvolume.
Built-in Functions NEXTSVOL NEXTSVOL The NEXTSVOL built-in function returns the name of the next subvolume after the one specified. NCL returns the subvolume names in alphabetic sequence. NEXTSVOL( vol-spec ) vol-spec specifies the name of the subvolume. The supplied vol-spec must be formatted as follows: [ \systemname. ]$volume.subvolume If the system name is omitted, NCL supplies the name of the local system. The volume and subvolume names must be given.
Built-in Functions NODTONAM NODTONAM The NODTONAM built-in function converts a system number to its corresponding system name. NODTONAM( system-number ) system-number specifies the number of the system. Considerations If system-number is not known, or if the system is inoperative, a null value is returned. system-number must be a valid number in the range 0 through 254. See also NAMTONOD, which converts a system name to its corresponding system number.
Built-in Functions NOYES NOYES The NOYES built-in function returns a NO or YES value depending on whether a specified expression is true (1) or false (0). A NO is returned if the result of the evaluation is 0 (zero); a YES is returned if the result is 1. An error is issued if NCL cannot evaluate the expression to be true or false. NOYES( expression ) expression specifies an expression to be evaluated. The result of the evaluation must be 0 (zero) or 1; if not, NCL issues an error.
Built-in Functions NULL0 NULL0 The NULL0 built-in function tests a specified string and returns a value of 0 (zero) if the string is null. NULL0( string ) string specifies the string to be tested. If it is not a null string, the input string is returned. If string is a null string, 0 (zero) is returned. Consideration See also NOYES, which determines whether a specified expression is true (1) or false (0).
Built-in Functions OVERLAY OVERLAY The OVERLAY built-in function overlays one string with another, beginning at the character position specified. OVERLAY( new, target [,[ start ] [, [ len ] [, [ pad ] [, [ opt ] [, pad2 ] ] ] ] ] ) new specifies the data that overlays target. target specifies the string that is overlayed. start specifies the overlay starting character position in target. start must be a whole number greater than 0 (zero).
Built-in Functions OVERLAY C specifies that new is centered and padded to the left and right using the character specified as pad2. If pad2 is not specified, then pad is used. pad2 specifies the pad character to be used for padding new. If omitted, the character specified as pad is used. Considerations If start and len are not supplied, overlaying takes place from the first character position of the target string for the length of new. If new and target are null strings, a null string is returned.
Built-in Functions POS POS The POS built-in function returns the first location of a substring within a string, beginning its search either at the first character of the string or at an optional specified starting character position. The value returned is the character position at which the substring starts. If the substring is not found, 0 (zero) is returned. POS( needle, haystack [, start ] ) needle specifies the substring to search for. haystack specifies the string to be searched.
Built-in Functions QUOTE QUOTE The QUOTE built-in function adds leading and trailing user-specified quote characters to a string. QUOTE( string [, quotechar ] ) string specifies the string that is to be placed within quotes. quotechar specifies the character to be used as the quote character. If no character is specified, the single (‘) or double (“) quote characters are used; NCL chooses whichever of these quote characters occurs least within the string.
Built-in Functions QUOTE In the previous example, the result is “ITS A QUOTE,”. The string “IT” is concatenated with the string “S A QUOTE,” and the attempt to specify a single quote character as quotechar also fails. NCL uses the double quote character because none is specified.
Built-in Functions RANDOM RANDOM The RANDOM built-in function returns a pseudorandom number. The number returned lies within a range specified in the function. RANDOM( [ min ] [, [ max ] [, seed ] ] ) min specifies the lowest number in the range. The number must be a nonnegative whole number. The default is 0 (zero). max specifies the highest number in the range. The number must be a nonnegative whole number. The default is 999. seed specifies the number to be used to reset the pseudorandom sequence.
Built-in Functions REMSTR REMSTR The REMSTR built-in function splits a string at a specific character and returns the data after that character. If the character is not found, a null string is returned. REMSTR( char, string ) char specifies the character for which NCL searches and after which string is to be split. An error is issued if you specify char longer than one character. string specifies the string to be searched. The search begins at the leftmost character in the string.
Built-in Functions REVERSE REVERSE The REVERSE built-in function reverses the order of the characters in a string. REVERSE( string ) string specifies the string to be reversed.
Built-in Functions RIGHT RIGHT The RIGHT built-in function returns the rightmost characters of a string. RIGHT( string, length [, pad ] ) string specifies the source string. length specifies the number of characters to be returned. This operand must always be a nonnegative whole number. If length is greater than the length of the specified string, the string is padded on the left to the required length. pad specifies the pad character to be used. The default is a space.
Built-in Functions SELSTR SELSTR The SELSTR built-in function extracts the leading portion of a string, up to a specified character. The result is the substring comprising all characters, in the original string, to the left of the specified search character. If the search character is not found in the string, the entire specified string is returned. If the search character is the first character of the specified string, a null string is returned.
Built-in Functions SIGN SIGN The SIGN built-in function tests the specified number and indicates if it is positive, negative, or 0 (zero). SIGN( number ) number specifies the number to be tested. If the number is negative, a minus one (-1) is returned. If the number is 0, 0 (zero) is returned. If the number is positive, 1 is returned. Example In the following example, 12.34 is tested to determine if it is positive, negative, or 0 (zero). The number is positive, so 1 is returned: &A = 12.
Built-in Functions SPACE SPACE The SPACE built-in function removes extraneous spaces from a string and optionally replaces them with another character. SPACE( string [, [ n ] [, pad ] ] ) string specifies the string to be reformatted. Leading and trailing spaces are always removed. n specifies the number of pad characters to be placed between words. n must be a nonnegative whole number. If 0 (zero) is specified, all spaces are removed; they are not replaced by the pad character.
Built-in Functions SSIDTOTEXT SSIDTOTEXT The SSIDTOTEXT built-in function translates an internal format SSID to an external format string. SSIDTOTEXT( string [, option ] ) string specifies the string to be translated. option specifies a parameter that indicates the type of action to be performed. The following options are available: L specifies that the long form of the translation is carried out. S specifies that the short form of the translation is carried out.
Built-in Functions STRIP STRIP The STRIP built-in function strips leading and/or trailing occurrences of a specified character from a string. STRIP( string [, [ option ] [, char ] ] ) string specifies the string to be processed. option specifies a parameter that indicates the strip action to be performed: B specifies that both leading and trailing occurrences of the specified character are stripped. This is the default if option is omitted.
Built-in Functions STRIP In the following example, both leading and trailing zeros are removed from the string “00012.45000”. The output string is “12.45”: &A = 00012.
Built-in Functions SUBSTR SUBSTR The SUBSTR built-in function extracts a substring from a string, starting from a specified position within the string. Starting from the specified character, a portion or the remainder of the string is returned. SUBSTR( string, n [, [ length ] [, [ pad ] [, length2 ] ] ] ) string specifies the string on which the extraction is to be performed. n specifies the starting position for the extraction. n must be a positive whole number.
Built-in Functions SUBSTR Examples In the following example, beginning at character position 2 of the string “abc”, the next two characters “bc” form the substring that is returned: &A =ABC &B = 2 &RESULT = SUBSTR(&A,&B) In the following example, beginning at character position 7 of the string “abcdefghijklmno”, the rest of the string is returned. length2 is specified as longer than the length of the string from character position 7 to the end of the string.
Built-in Functions SUBWORD SUBWORD The SUBWORD built-in function extracts a substring from a string, starting from a specified word in the string. It deletes trailing spaces after the last word in the output string. All spaces between words are preserved. SUBWORD( string, n [, length ] ) string specifies the string on which the extraction is to be performed. n specifies the word position at which the extraction is to begin. n must be a positive whole number.
Built-in Functions SYMBOL SYMBOL The SYMBOL built-in function tests the supplied name to determine if it can be used as a valid NCL variable name. Both lowercase and uppercase characters may be used for the name. SYMBOL( name ) name specifies the variable to be tested. The variable designator (&) must not be included in name. One of the following values is returned: VAR indicates the symbol can be used as a valid variable name. BAD indicates the symbol is not valid.
Built-in Functions TEXTTOSSID TEXTTOSSID The TEXTTOSSID built-in function translates an external format string to an internal format SSID. TEXTTOSSID( string [, option ] ) string specifies the string to be translated. option specifies a parameter that indicates the type of action to be performed. The following options are available: L specifies that the long form of the translation is carried out. S specifies that the short form of the translation is carried out.
Built-in Functions TIME TIME The TIME built-in function returns the current time, in one of several formats. TIME( [ option ] ) option indicates the format in which the time is to be displayed. The available formats are: A returns the time since midnight in the format sssss.uuuuuu, in which sssss is seconds and uuuuuu is microseconds (that is, 0.000001 seconds). This time is accurate to one microsecond. Leading 0s are suppressed.
Built-in Functions TIME Considerations As for the DATE built-in function, all TIME references within a single expression must yield consistent results. This requires that a single timestamp be used during the lifetime of an expression. The same timestamp need not be maintained for a lower-level user function, but must be reinstated when the user function call returns. See also DATE, which provides the current date in one of several specified formats. See also the related &SYS.
Built-in Functions TRANSLATE TRANSLATE The TRANSLATE built-in function translates all or part of a specified string, according to input and output translation tables. TRANSLATE performs arbitrary substitution of characters in a string, as well as changing specified characters in a string from lowercase to uppercase, or from a hexadecimal value to an alternative character value. TRANSLATE( string [, [ tableo ] [, [ tablei ] [, pad ] ] ] ) string specifies the input string, which may be of any length.
Built-in Functions TRANSLATE See also UPPER and LOWER. The UPPER built-in function converts a string to uppercase characters in the native (ASCII) character set; the LOWER built-in function converts a specified string to lowercase characters in the native (ASCII) character set. Examples Because no tables are specified in this example, the lowercase string “abcdef” is converted (translated) to uppercase characters.
Built-in Functions TRUNC TRUNC The TRUNC built-in function truncates a number to a specific number of decimal places. TRUNC( number [, n ] ) number specifies the number to be truncated. The integer part of the number is not affected. n specifies the number of decimal places to preserve. It must be a positive whole number. If this operand is not specified, 0 (zero) is assumed and all decimal places are truncated.
Built-in Functions TYPECHK TYPECHK The TYPECHK built-in function performs type checking on one or more strings. TYPECHK( typelist, string [, string… ] ) typelist specifies a list of type names to check. The list must be in one of the following formats: typename (typename) “(typename,typename,…)” The valid type names and characters are specified as: ALNUMNAT A-Z, a-z, 0-9, #, @, and $ characters. ALPHA A-Z and a-z characters. ALPHANUM A-Z, a-z, and 0-9 characters. BIN 0 or 1 characters.
Built-in Functions TYPECHK NAME a valid name, from 1 through 8 characters long. The first character of the name must be alphabetic, or one of the characters @, #, or $. NAME12 a valid name, from 1 through 12 characters long. The first character of the name must be alphabetic, or one of the characters @, #, or $. NAME256 a valid name, from 1 through 256 characters long. The first character of the name must be alphabetic, or one of the characters @, #, or $. N uppercase or lowercase.
Built-in Functions TYPECHK string contains the data to be checked. The first string is checked against each type specified in typelist, in turn. Once a type match is found, all additional string arguments must match that same type. If a type match is found, that type is returned. In all other cases, a null string is returned. Considerations If only one string is specified, the type matched is returned. If additional string arguments are specified, they must all match the same type as the first string.
Built-in Functions UPPER UPPER The UPPER built-in function converts a specified string to uppercase characters in the native (ASCII) character set. The native character set must be used. UPPER( string ) string specifies the string to be converted. Consideration See also TRANSLATE and LOWER. The TRANSLATE built-in function translates all or part of a specified string according to input and output translation tables. The LOWER built-in function translates a supplied string to lowercase characters.
Built-in Functions VALDEV1 VALDEV1 The VALDEV1 built-in function determines whether a supplied string is a valid Guardian device name. If so, VALDEV1 returns 1; otherwise, it returns 0 (zero). Only the format of the name is checked. VALDEV1( device-spec ) device-spec specifies the device name. The supplied device name must be formatted as follows: [ \systemname. ]$device[ .#subdevice[ .qualifier ] ] In the preceding format, systemname, device, and subdevice can contain up to seven characters.
Built-in Functions VALDEV2 VALDEV2 The VALDEV2 built-in function determines whether a supplied string is a valid Guardian device name in the specified system. If so, VALDEV2 returns 1. If the string is not a valid device name, or does not exist in the specified system, or cannot be validated because the specified system is inoperative, VALDEV2 returns 0 (zero). VALDEV2( device-spec ) device-spec specifies the device name. The supplied device name must be formatted as follows: [ \systemname. ]$device[ .
Built-in Functions VALFILE1 VALFILE1 The VALFILE1 built-in function determines whether a supplied string is a valid Guardian file name. If so, VALFILE1 returns 1; otherwise, it returns 0 (zero). The file need not exist; only the format of the name is checked. VALFILE1( file-spec ) file-spec specifies the name of the file. The supplied name must be formatted as follows: [ \systemname. ]$volume.subvolume.filename In the preceding format, systemname and volume can each contain up to seven characters.
Built-in Functions VALFILE2 VALFILE2 The VALFILE2 built-in function determines whether a supplied string is a valid Guardian file name in the specified system. If so, VALFILE2 returns 1. If the string is not a valid file name, or does not exist in the specified system, or cannot be validated because the specified system is inoperative, VALFILE2 returns 0 (zero). VALFILE2( file-spec ) file-spec specifies the name of the file. The supplied name must be formatted as follows: \systemname.$volume.subvolume.
Built-in Functions VALFILE3 VALFILE3 The VALFILE3 built-in function determines whether a supplied string is a valid Guardian file name and supplies it with default values for any missing volume or subvolume names. VALFILE3( file-spec [, subvol-spec ]) file-spec specifies the name of the file to be validated. The supplied name must be formatted as follows: [ \systemname. ] [ [ $volume. ] subvolume.
Built-in Functions VALFILE3 Examples Table 4-5 summarizes combinations of file-spec and subvol-spec. The table operates as if nodes \SYS1 and \SYS2 exist, and node \SYS3 does not exist. The table assumes a default subvolume of $X.Y. Table 4-5. Examples of VALFILE3 file-spec subvol-spec VALFILE3 Returns Comment C B.C $A.B.C \SYS1.C \SYS1.B.C \SYS1.$A.B.C C B.C $A.B.C C B.C $A.B.C \SYS1.C null null null null null null $V.S $V.S $V.S \SYS2.$V.S \SYS2.$V.S \SYS2.$V.S \SYS2.$V.S $X.Y.C $X.B.C $A.B.
Built-in Functions VALPROC1 VALPROC1 The VALPROC1 built-in function determines whether a supplied string is a valid Guardian process name. If so, VALPROC1 returns 1; otherwise, it returns 0 (zero). VALPROC1( process-spec ) process-spec specifies the process name. The supplied process name must be formatted as follows: [ \systemname. ]$processname[ .#qualifier1[ .
Built-in Functions VALPROC2 VALPROC2 The VALPROC2 built-in function determines whether a supplied string is a valid Guardian process name in the specified system. If so VALPROC2 returns 1; otherwise, it returns 0 (zero). VALPROC2( process-spec ) process-spec specifies the process name. The supplied process name must be formatted as follows: [ \systemname. ]$processname[ .#qualifier1[ .
Built-in Functions VARSUB VARSUB The VARSUB built-in function performs variable substitution on a string and returns the substituted string. It scans string for variables denoted by subchar and replaces the variable with its contents. The process is repeated until number is reached or there are no more variables to substitute. The built-in function returns a string consisting of either text or text and unsubstituted variable names (if scanning is incomplete).
Built-in Functions VARSUB Examples In the following example, the string requiring variable substitution, “ABC &A XYZ”, is scanned once. The output string is “ABC 123 XYZ”: &A = "123" &result = VARSUB( "ABC &a XYZ" ) SAY "Result is "&result In the following example, the string requiring variable substitution, “ABC &A XYZ”, is scanned twice. During the first scan, &A is replaced by “&B”; the result is “ABC &B XYZ”.
Built-in Functions VERIFY VERIFY The VERIFY built-in function verifies that one or more characters in a string are also in a specified reference string. VERIFY( string, reference [ [, option ] [, start ] ] ) string specifies the string to be verified. If a null string is supplied, the value returned is 0 (zero). reference specifies a string containing the acceptable characters. It is not necessary for all characters that appear in reference to appear in the string; repeated characters are redundant.
Built-in Functions VERIFY Examples In the following example, the string “123” is verified to determine whether it contains one or more of the characters 1, 2, 3, 4, 5, 6, 7, 8, 9, or 0. Neither n (nomatch) or m (match) is specified, so n is assumed.
Built-in Functions WORD WORD The WORD built-in function extracts a specified word from a string. WORD( string, n ) string specifies the string from which the word is to be extracted. n specifies the word position (counted from the left of the string) of the required word. n must be a positive whole number. If n specifies a word position beyond the end of the string, a null string is returned.
Built-in Functions WORDINDEX WORDINDEX The WORDINDEX built-in function returns the character position of the first character of a specified word in a specified string. WORDINDEX( string, n ) string specifies the string to be processed. n specifies the word position in string (counting from the left) to be located. n must be a positive whole number. If n specifies a word position beyond the end of the string, 0 (zero) is returned. Consideration See also WORD and WORDLENGTH.
Built-in Functions WORDLENGTH WORDLENGTH The WORDLENGTH built-in function returns the length of a specified word in a string. WORDLENGTH( string, n ) string specifies the string to be processed. n specifies the word position in string of the word whose length you want. n must be a positive whole number. If n specifies a word position beyond the end of the string, 0 (zero) is returned. Consideration See also WORD and WORDINDEX.
Built-in Functions WORDPOS WORDPOS The WORDPOS built-in function returns the first position of a word or a phrase of words within a specified string. 0 (zero) is returned if the phrase is not found within the string. WORDPOS( phrase, string [, start ] ) phrase specifies the substring to be searched for. string specifies the string to be searched. start specifies a starting position for the search. This optional operand must be a positive whole number.
Built-in Functions WORDPOS In the following example, the string “now is the time” is searched for the word “the”, which is the third word in the string, so a value of “3” is returned: SAY WORDPOS(the,now is the time) In the following example, the string “now is the time” is searched for the word “The”.
Built-in Functions WORDS WORDS The WORDS built-in function returns the number of words in a specified string. WORDS( string ) string specifies the input string that is inspected. If a null string is specified, 0 (zero) is returned. Consideration See also DELWORD and WORDPOS. The DELWORD built-in function deletes a specified number of words from a string. The WORDPOS built-in function returns the first position of a word or a substring of words within a specified string.
Built-in Functions X2C X2C The X2C built-in function converts a string of hexadecimal characters to its ASCII equivalent. X2C( string ) string specifies the string that is converted. The string must consist of 0-9, A-F, or a-f characters only. Spaces are permitted at byte boundaries. If an odd number of hexadecimal characters is found, a single 0 (zero) is added to the front of the string. Considerations If a null string is specified, a null string is returned.
Built-in Functions X2D X2D The X2D built-in function converts a hexadecimal string to a decimal number. The maximum number of hexadecimal digits allowed is eight. X2D( string [, n ] ) string specifies the input string that is converted. n specifies an optional number that defines the significant width, in hexadecimal digits. If specified, the truncated string is treated as a signed binary number. If n is 0, 0 (zero) is returned. A compilation error results if n is greater than the length of string.
Built-in Functions XRANGE XRANGE The XRANGE built-in function returns a string of ASCII characters in a specified range. XRANGE( [ start ] [, end ] ) start specifies the start value. start must be exactly one character long. If omitted, the default is '00'x, which represents a hexadecimal value of 0 (zero). end specifies the end value. end must be exactly one character long. If omitted, the default is 'FF'x. Considerations The range is wrapped if start is greater than end.
Built-in Functions ZFEATURE ZFEATURE The ZFEATURE built-in function indicates whether this system is enabled for selected features; that is, whether certain features are allowed to be used at the site. ZFEATURE( feature [, … ] ) feature specifies the feature name to be tested. Unrecognized features always result in 0 (zero) being returned; the case of letters is unimportant.
Built-in Functions ZNCLKWD ZNCLKWD The ZNCLKWD built-in function indicates whether a specified string is an NCL system or global variable. NCL returns a true value of 1 or a false value of 0 (zero). ZNCLKWD( string ) string specifies the string to be tested. It is always changed to uppercase before testing begins. Consideration See also SYMBOL, which tests the supplied name to determine if it is a valid NCL variable name. Examples In the following example, the string “FRED” does not begin with “SYS.
Built-in Functions ZNCLKWD (This page left intentionally blank) 4–116 106126 Tandem Computers Incorporated
5 System Variables A system variable contains read-only information that is available to all NCL procedures in the system. This information may either be constant (for example, &SYS.TIME always contains the current time) or procedure-dependent (for example, &SYS.RETCODE returns a value dependent on the result of a verb operation). A system variable is indicated by the &SYS. prefix. For system variables in NCL procedures, this prefix must be included.
System Variables System Variables Note &SYSMSG is included in this section although it is not strictly a system variable. NCL uses this variable in certain special cases connected with panel and file processing. It is similar to a user variable in that its value can be set by the user. Unlike system variables, its value is not common to all procedures and functions within the same NCL process.
System Variables Summary of System Variables Summary of System Variables Table 5-1 lists and briefly describes the system variables that are available in NCL. Table 5-1. List of System Variables and Functions (Page 1 of 5) System Variable Function &SYS.ALLPARMS Contains a single string that holds the values of all parameters entered when an NCL procedure is invoked. Contains the column location of the cursor. Contains the name of the input or outvar field for the most recent data entry from a panel.
System Variables Summary of System Variables Table 5-1. List of System Variables and Functions (Page 2 of 5) System Variable Function &SYS.ERROR.VALUEOK Indicates whether &SYS.ERROR.VALUE contains information about an error. Contains a second value that caused the error to be issued. Indicates whether &SYS.ERROR.VALUE2 contains information about an error. Returns numeric completion information after execution of selected NCL verbs. Contains the Guardian file system error.
System Variables Summary of System Variables Table 5-1. List of System Variables and Functions (Page 3 of 5) System Variable Function &SYS.NATIVE.INKEY Contains the natural or untranslated name of the function key that was last used during a panel operation or to enter data. Contains the name of the procedure currently being executed (&SYS.NCL.CURRPROC) and the base procedure that invoked it (&SYS.NCL.BASEPROC). Contains the environment in which the NCL process is executing.
System Variables Summary of System Variables Table 5-1. List of System Variables and Functions (Page 4 of 5) System Variable Function &SYS.PANEL.ID &SYS.PANEL.INPHIC Contains the name of the current panel. Contains the value specified with the command SYSPARMS SPINPHIC—the color of mandatory input fields on a panel. Contains the value specified with the command SYSPARMS SPINPLOC—the color of optional input fields on a panel.
System Variables Summary of System Variables Table 5-1. List of System Variables and Functions (Page 5 of 5) System Variable Function &SYS.RETCODE Contains the current system return code or contains a new user-assigned return code value. Indicates whether a second window has been opened. Contains the current operating system identification. Contains the number of columns available to the physical terminal. Contains the physical name of the terminal with which the NCL procedure is associated.
System Variables &SYS.ALLPARMS &SYS.ALLPARMS The &SYS.ALLPARMS system variable contains a single string that holds the values of all parameters entered when an NCL procedure is invoked. There is no practical limit to the size of this string. If the procedure is invoked without parameters, &SYS.ALLPARMS is set to null. The NCL procedure can refer to the parameters passed to it by individual variable names. These variables have the names &1, &2, …, through &n, where n is the number of parameters. &SYS.
System Variables &SYS.ALLPARMS To invoke the NCL procedure APROC with just two parameters, you can enter START APROC 50 100 on the OCS input line. If you start the following NCL procedure (APROC) in this manner, NCL displays the two parameters 50 and 100 when the procedure executes, as in the following example: APROC:PROCEDURE SAY "VALUE OF &SYS.ALLPARMS = " &SYS.
System Variables &SYS.CURS.COL &SYS.CURS.COL The &SYS.CURS.COL system variable is used in conjunction with &SYS.CURS.ROW to determine the cursor column and row coordinates, respectively, of the last operator input from a panel. These variables are set before control is returned to the procedure that issues the PANEL verb. The panel must have been displayed using the PANEL verb. &SYS.CURS.
System Variables &SYS.CURS.FLD &SYS.CURS.FLD The &SYS.CURS.FLD system variable contains the name of the input or outvar field for the most recent data entry from a panel. &SYS.CURS.FLD Considerations For a 6530-type terminal, the cursor is always on an input field, if one exists. For 3270-type terminals, the cursor can be placed on either an input or an outvar field, if either exists. If the cursor is positioned on an output field, &SYS.CURS.FLD is null.
System Variables &SYS.CURS.POS &SYS.CURS.POS The &SYS.CURS.POS system variable contains the offset to the cursor position from the start of the field defined by &SYS.CURS.FLD. &SYS.CURS.POS Considerations For a 6530-type terminal, the cursor is always on an input field, if one exists. For 3270-type terminals, the cursor can be placed in either an input or an outvar field, if either exists. If the cursor is positioned on an output field, &SYS.CURS.POS is null.
System Variables &SYS.CURS.ROW &SYS.CURS.ROW The &SYS.CURS.COL system variable is used in conjunction with &SYS.CURS.ROW to determine the cursor column and row coordinates, respectively, of the last operator input from a panel. These variables are set before control is returned to the procedure that issues the PANEL verb. The panel must have been displayed using the PANEL verb. &SYS.CURS.ROW is set to the number of the row that contains the cursor, ranging from 1 through 42, depending on the window size.
System Variables &SYS.DATE.DAY &SYS.DATE.DAY The &SYS.DATE.DAY system variable contains the current day of the week. &SYS.DATE.DAY Considerations The value of &SYS.DATE DAY is returned in the form DDD. DDD is set to one of the following values: DDD Day MON TUE WED THU FRI SAT SUN Monday Tuesday Wednesday Thursday Friday Saturday Sunday See also &SYS.DATE.n, which provides the current date in different formats. See also the DATE built-in function in Section 4, “Built-in Functions.
System Variables &SYS.DATE.n &SYS.DATE.n The &SYS.DATE.n system variable contains the current date in one of the specified formats. &SYS.DATE.1 &SYS.DATE.2 &SYS.DATE.3 &SYS.DATE.4 &SYS.DATE.5 &SYS.DATE.6 &SYS.DATE.7 &SYS.DATE.8 &SYS.DATE.9 &SYS.DATE.10 &SYS.DATE.11 Considerations Table 5-2 lists the available formats. For the following examples, the current system date is WED 17-AUG-1994. Table 5-2. Date Formats (&SYS.DATE.n System Variable) System Variable Format Output &SYS.DATE.1 &SYS.DATE.2 &SYS.
System Variables &SYS.DATE.n Example The following example displays today’s date in the form DAY DD-MON-YYYY as defined in Table 5-2: SAY "TODAY’S DATE IS " &SYS.DATE.
System Variables &SYS.DOM.ID &SYS.DOM.ID The &SYS.DOM.ID system variable contains the message identifier (DOM ID) of a non-roll-delete (NRD) message. The NRDDEL verb enables an NCL procedure to delete a NRD message it has created before the procedure terminates. &SYS.DOM.ID contains the DOM ID identifier that must be used with the NRDDEL verb to indicate which NRD message is to be deleted. NRD messages are used to communicate important information to the operator.
System Variables &SYS.ERROR.CODE &SYS.ERROR.CODE The &SYS.ERROR.CODE system variable contains the integer setting that indicates the NCL error type. This system variable can be used only in an ON error handler. &SYS.ERROR.CODE Considerations NCL sets this variable whenever it detects an error. For a list of system-defined error condition names and NCL error codes, see Table 2-3 in Section 2, “Core Statements.” See also &SYS.ERROR COND and &SYS.ERROR.TEXT. &SYS.ERROR.
System Variables &SYS.ERROR.COLUMN &SYS.ERROR.COLUMN The &SYS.ERROR.COLUMN system variable contains the column in a line of code in which an error occurred. If the error occurs in a continued line, the value of this variable is the column number in the continued line. The value of &SYS.ERROR.COLUMN is only an approximate indication of the position of the error. For example, a statement may fail because a previously defined variable was outside an expected range. In this case, the value of &SYS.ERROR.
System Variables &SYS.ERROR.COND &SYS.ERROR.COND The &SYS.ERROR.COND system variable contains the name of the condition or error that was issued. This variable is also set if the user signals a user-defined error condition that has no specific error handler associated with it. This system variable can be used only in an ON error handler. &SYS.ERROR.COND Considerations For a list of system-defined error condition names and NCL error codes, see Table 2-3 in Section 2, “Core Statements.
System Variables &SYS.ERROR.FILE &SYS.ERROR.FILE The &SYS.ERROR.FILE system variable contains the name of the source file associated with the NCL procedure that contained the error. Only the eight-character file name is stored in this variable; the full path name of the file is not stored. This system variable can be used only in an ON error handler. &SYS.ERROR.FILE Consideration See also &SYS.ERROR.LIB, which contains the name of the source library associated with the NCL procedure that issued the error.
System Variables &SYS.ERROR.KEYWORD &SYS.ERROR.KEYWORD The &SYS.ERROR.KEYWORD system variable contains the keyword that caused the error. This system variable is set to null unless the statement that caused the error was a verb, and the syntactic error was related to a keyword. This system variable can be used only in an ON error handler. &SYS.ERROR.KEYWORD Consideration See also the other &SYS.ERROR system variables. Example The following example is a procedure named ONPROC that contains an error.
System Variables &SYS.ERROR.LIB &SYS.ERROR.LIB The &SYS.ERROR.LIB system variable contains the name of the source library associated with the NCL procedure that issued the error. This system variable can be used only in an ON error handler. &SYS.ERROR.LIB Consideration See also &SYS.ERROR.FILE, which contains the name of the source file associated with the NCL procedure that contained the error. Example The following procedure contains an arithmetic error.
System Variables &SYS.ERROR.LINE &SYS.ERROR.LINE The &SYS.ERROR.LINE system variable contains the TEDIT line number in the source file at which the error occurred. This system variable can be used only in an ON error handler. &SYS.ERROR.LINE Considerations If lines have been inserted into the procedure since the last renumbering, the number supplied in this variable may contain a decimal point. See also &SYS.ERROR.COLUMN, which contains the column in a line of code in which an error occurred.
System Variables &SYS.ERROR.NAME &SYS.ERROR.NAME The &SYS.ERROR.NAME system variable contains the name specification that caused the error. In the case of an error raised because of substitution problems, this is the name specification before substitution. In the case of an assignment to an unknown system variable, the name is the illegal target variable name. This system variable can be used only in an ON error handler. &SYS.ERROR.
System Variables &SYS.ERROR.PROCNAME &SYS.ERROR.PROCNAME The &SYS.ERROR.PROCNAME system variable contains the name of the procedure that caused an error. This system variable can be used only in an ON error handler. &SYS.ERROR.PROCNAME Consideration See also &SYS.NCL.CURRPROC, which contains the name of the NCL procedure currently executing.
System Variables &SYS.ERROR.RESUMEOK &SYS.ERROR.RESUMEOK The &SYS.ERROR.RESUMEOK system variable indicates if the procedure can be resumed. This system variable can be used only in an ON error handler. &SYS.ERROR.RESUMEOK The value of the variable is set to either 0 (zero; the procedure cannot be resumed) or 1 (the procedure can be resumed). Considerations The procedure is resumed from the statement immediately after the one that caused the error. See the RESUME verb in Section 3, “Verbs.
System Variables &SYS.ERROR.RETRYOK &SYS.ERROR.RETRYOK The &SYS.ERROR.RETRYOK system variable indicates whether the statement causing the error can be retried. The procedure is resumed from the statement that caused the error. This system variable can be used only in an ON error handler. &SYS.ERROR.RETRYOK The value of the variable is set to either 0 (zero; the procedure cannot be retried) or 1 (the procedure can be retried). Considerations See the RETRY verb in Section 3, “Verbs.” See also the other &SYS.
System Variables &SYS.ERROR.STMT &SYS.ERROR.STMT The &SYS.ERROR.STMT system variable contains the statement number that caused the error to be issued. This system variable can be used only in an ON error handler. &SYS.ERROR.STMT Considerations The value of &SYS.ERROR.STMT is counted from the beginning of the line in which the error occurred. See also &SYS.ERROR.LINE, which contains the line number in which the bad statement appears. Example The following procedure named ONPROC contains an error.
System Variables &SYS.ERROR.STMT_NAME &SYS.ERROR.STMT_NAME The &SYS.ERROR.STMT_NAME system variable contains the name of the statement that caused the error. If the assignment statement is in error, &SYS.ERROR.STMT_NAME contains an equal sign (=). This system variable can be used only in an ON error handler. &SYS.ERROR.STMT_NAME Consideration See also the other &SYS.ERROR system variables. Example The following procedure named ONPROC contains an error.
System Variables &SYS.ERROR.SUBNAME &SYS.ERROR.SUBNAME The &SYS.ERROR.SUBNAME system variable contains the name of a variable that caused an error. In the case of an error raised because of substitution problems, this is the name of the variable after substitution. In the case of an assignment to an unknown system variable, the name is the illegal target variable name. This system variable can be used only in an ON error handler. &SYS.ERROR.SUBNAME Consideration See also &SYS.ERROR.
System Variables &SYS.ERROR.TEXT &SYS.ERROR.TEXT The &SYS.ERROR.TEXT system variable contains additional information on the nature of an NCL error or condition. This system variable can be used only in an ON error handler. &SYS.ERROR.TEXT Considerations Some NCL messages that relate to conditions (such as panel skipping) are placed in &SYS.ERROR.TEXT. Refer to message number NNM1354 in the NonStop NET/MASTER Messages Manual. See also the other &SYS.ERROR system variables.
System Variables &SYS.ERROR.VALUE &SYS.ERROR.VALUE The &SYS.ERROR.VALUE system variable contains the value that caused the error. &SYS.ERROR.VALUE is null if no value is relevant. This system variable can be used only in an ON error handler. &SYS.ERROR.VALUE Consideration See also &SYS.ERROR.VALUEOK, &SYS.ERROR.VALUE2, and &SYS.ERROR.VALUE2OK. These system variables either hold the value(s) that caused the error, or indicate that such error information is available.
System Variables &SYS.ERROR.VALUEOK &SYS.ERROR.VALUEOK The &SYS.ERROR.VALUEOK system variable indicates whether &SYS.ERROR.VALUE contains information about an error. If the &SYS.ERROR.VALUE system variable does contain a value, &SYS.ERROR.VALUEOK is set to 1; otherwise, &SYS.ERROR.VALUEOK is set to 0. This system variable can be used only in an ON error handler. &SYS.ERROR.VALUEOK Consideration See also &SYS.ERROR.VALUE, &SYS.ERROR.VALUE2, and &SYS.ERROR.VALUE2OK.
System Variables &SYS.ERROR.VALUE2 &SYS.ERROR.VALUE2 The &SYS.ERROR.VALUE2 system variable contains a second value that caused the error to be issued. It is set only if two combined values cause the error (for example, in string concatenation or in a multiplication operation). This system variable can be used only in an ON error handler. &SYS.ERROR.VALUE2 Considerations If a mathematical operation contains more than two values, the first two values that cause an error are returned in &SYS.ERROR.
System Variables &SYS.ERROR.VALUE2OK &SYS.ERROR.VALUE2OK The &SYS.ERROR.VALUE2OK system variable indicates whether &SYS.ERROR.VALUE2 contains information about an error. If &SYS.ERROR.VALUE2 does contain a value, &SYS.ERROR.VALUE2OK is set to 1; otherwise, &SYS.ERROR.VALUE2OK is set to 0 (zero). This system variable can be used only in an ON error handler. &SYS.ERROR.VALUE2OK Consideration See also &SYS.ERROR.VALUE, &SYS.ERROR.VALUE2, and &SYS.ERROR.VALUEOK.
System Variables &SYS.FDBK &SYS.FDBK The &SYS.FDBK system variable returns numeric completion information after execution of selected NCL verbs. This completion information, or status information, is returned in the &SYS.FDBK system variable as a numeric value so that results are available from a consistent location and can be easily interpreted. The following verbs can set &SYS.FDBK: EMS verbs INT verbs The LOCK verb MSG verbs The START verb VARTABLE verbs &SYS.FDBK Considerations The contents of &SYS.
System Variables &SYS.FILE.ERROR &SYS.FILE.ERROR The &SYS.FILE.ERROR system variable contains a Guardian file system error. When use of a FILE verb (other than FILE OPEN, FILE CLOSE, or FILE SET) returns a Guardian file system error, &SYS.FILE.ERROR contains the error number. &SYS.FILE.ERROR Considerations Except for the FILE OPEN, FILE CLOSE, and FILE SET verbs, NCL additionally sets the &SYS.FILE.RC system variable to 8 whenever a FILE verb encounters a Guardian file system error. See also &SYS.FILE.
System Variables &SYS.FILE.ID &SYS.FILE.ID The &SYS.FILE.ID system variable contains the current local file identifier. &SYS.FILE.ID Considerations &SYS.FILE.ID is useful when you are using multiple local file identifiers and you wish to know the current one. For more information on this system variable, and an example of its use, refer to the NonStop NET/MASTER NCL Programmer’s Guide. Example In the following example, the procedure FILE_ID opens a file and displays its current local file identifier.
System Variables &SYS.FILE.KEY &SYS.FILE.KEY The &SYS.FILE.KEY system variable contains the value of the full key of the last record read from a UDB. It can be used to refer to the explicit key of each record read from a UDB when a file is being read using partial keys. &SYS.FILE.KEY reflects the unique position of an NCL process within its currently active file. &SYS.FILE.KEY Considerations For more information on partial keys, see the FILE GET verb in Section 3, “Verbs.
System Variables &SYS.FILE.PATH &SYS.FILE.PATH The &SYS.FILE.PATH system variable contains the number of the file from which the FILE GET verb retrieved a record. For a single file, the value is always ONE. For a file pair, the value is either ONE (record retrieved from the first file in the pair) or TWO (record retrieved from the second file in the pair). &SYS.FILE.PATH Consideration If the FILE GET operation is unsuccessful, the value is null.
System Variables &SYS.FILE.RC &SYS.FILE.RC The &SYS.FILE.RC system variable contains the return code of a file processing function after the execution of the FILE ADD, FILE CLOSE, FILE DEL, FILE GET, FILE OPEN, FILE PUT, FILE PUTGET, or FILE SET verb. &SYS.FILE.RC &SYS.FILE.RC can be tested to find the result of the FILE verb operation. The meaning of the various return codes is shown in Table 5-3. Table 5-3.
System Variables &SYS.FILE.RC Table 5-3. FILE Verb Return Codes (Page 2 of 2) File Verb Return Code Explanation FILE PUT 0 4 8 Record added or updated successfully. Record not added or updated; existing alternate key. A file system error occurred during NCL processing. More information is contained in &SYS.FILE.ERROR. Not used. An error occurred. More information is contained in &SYSMSG. 12 16 FILE PUTGET FILE SET 0 4 8 12 16 PUTGET completed successfully. End-of-file detected.
System Variables &SYS.FILE.RCNT &SYS.FILE.RCNT The &SYS.FILE.RCNT system variable contains a count of the number of records generically deleted by the FILE DEL verb. &SYS.FILE.RCNT Considerations If no records are deleted, &SYS.FILE.RCNT is set to 0 (zero). If only a single record is deleted, &SYS.FILE.RCNT is set to 1 (one). &SYS.FILE.RCNT remains unchanged until another FILE DEL or FILE CLOSE verb is issued. See also the FILE DEL and FILE CLOSE verbs in Section 3, “Verbs.
System Variables &SYS.GUID.GROUP &SYS.GUID.GROUP The &SYS.GUID.GROUP system variable contains the group number under which an NCL procedure is currently running. The value is placed there by the operating system software. &SYS.GUID.GROUP Example The following example displays the Guardian group number under which the procedure named GUIDG is running: GUIDG: PROCEDURE SAY "THE GUARDIAN GROUP CURRENTLY RUNNING IS", &SYS.GUID.GROUP END GUIDG &SYS.GUID.USER The &SYS.GUID.
System Variables &SYS.INKEY &SYS.INKEY The &SYS.INKEY system variable contains the name of the function key that terminated user input in the last displayed panel. By examining the contents of &SYS.INKEY, the procedure can determine if the validation can be bypassed. If a synchronous panel has been defined with the #OPT panel control statement and a time interval (specified on the INWAIT operand) has elapsed, &SYS.INKEY is set to null. &SYS.
System Variables &SYS.INKEY Example The following example shows a panel definition named PANEX01. An NCL procedure called SHOW_KEYS is then listed. This procedure displays the &SYS.INKEY and &SYS.NATIVE.INKEY system variables after displaying the panel: #NOTE #NOTE THIS IMPLEMENTS PANEX01 #NOTE % ------------------- &SYS.PANEL.ID ------------------------+ + PANEL OK Y or N ===>_pnlyn + Enter Y if: you like this panel display + or N if you don’t + &INVAR SHOW_KEYS: PROCEDURE PANEL NAME=PANEX01 SAY “&SYS.
System Variables &SYS. INT.REQ# &SYS.INT.REQ# The &SYS.INT.REQ# system variable contains the number of messages queued to the dependent request queue of an NCL process. The dependent request queue is the queue of messages sent to an executing NCL procedure from an external source using the INTQ command. Messages on this queue are read or removed in the NCL procedure by using the TYPE=REQ or TYPE=ANY operand with the INTREAD or INTCLEAR verb.
System Variables &SYS. INT.RSP# &SYS.INT.RSP# The &SYS.INT.RSP# system variable contains the number of messages queued to the dependent response queue of an NCL process. The dependent response queue is the queue of messages either returned in reply to a command issued by the INTCMD verb or sent to an executing NCL procedure from an external source by using the INTQ command.
System Variables &SYS.INTYPE &SYS.INTYPE The &SYS.INTYPE system variable contains the name of the dependent queue on which a message has arrived. &SYS.INTYPE contains REQ if the message was from the dependent request queue or RESP if the message was from the dependent response queue. If there is no message, &SYS.INTYPE contains a null value. &SYS.
System Variables &SYS.LASTLOGON.DATE &SYS.LASTLOGON.DATE The &SYS.LASTLOGON.DATE system variable contains the date when the user last logged on to the system. This date has the format www dd-mmm-yyyy in which: www contains the first three characters of the day of the week. dd contains the numeric value of the day. mmm contains the first three characters of the month of the year. yyyy contains the numeric value of the year. &SYS.LASTLOGON.DATE Consideration See also &SYS.LASTLOGON.
System Variables &SYS.LASTLOGON.LOGITERM &SYS.LASTLOGON.LOGITERM The &SYS.LASTLOGON.LOGITERM system variable contains the logical name of the terminal last used by the user. &SYS.LASTLOGON.LOGITERM Consideration See also &SYS.LASTLOGON.PHYSTERM, which contains the physical name of the terminal last used by the user. Example The following example shows how you might use this system variable: SAY "&SYS.LASTLOGON.LOGITERM = " &SYS.LASTLOGON.LOGITERM &SYS.LASTLOGON.PHYSTERM The &SYS.LASTLOGON.
System Variables &SYS.LOCK.MSG &SYS.LOCK.MSG The &SYS.LOCK.MSG system variable contains the text of the existing lock message of the existing request. The text stored in &SYS.LOCK.MSG can be up to 250 characters; it is created by the TEXT operand of the LOCK verb. The current user ID, the name of the base NCL procedure, and the time are appended to the text, if any. &SYS.LOCK.MSG Considerations See also &SYS.FDBK and &SYS.RETCODE. &SYS.FDBK contains completion information for selected NCL verbs. &SYS.
System Variables &SYS.LOOPCTL &SYS.LOOPCTL The &SYS.LOOPCTL system variable contains the current setting of the automatic loop control counter. It is used to control the number of times a loop is performed within a DO group, and also the number of times GOSUB and GOTO statements are executed. The system default value for &SYS.LOOPCTL is 1000. This value decrements by one each time a loop is executed or each time a GOSUB or GOTO statement is executed.
System Variables &SYSMSG &SYSMSG The &SYSMSG variable contains an error message set by NCL panel services and/or NCL file processing. It is not exactly a system variable because its value is not common to all executing procedures within an NCL process. This variable is included in this section because its function is similar (in most respects) to system variables.
System Variables &SYSMSG Example In the following example, the procedure OPEN_PROC shows how you might use &SYSMSG: OPEN_PROC: PROCEDURE FILE OPEN ID=LLLL FORMAT=UNMAPPED SAY &SYS.FILE.RC = “ &SYS.FILE.RC SAY “&SYSMSG = “ &SYSMSG END OPEN_PROC In the previous example two system variables are displayed: &SYS.FILE.RC and &SYSMSG. Both were set as a result of the failure of the OPEN FILE verb. &SYS.FILE.
System Variables &SYS.NATIVE.INKEY &SYS.NATIVE.INKEY The &SYS.NATIVE.INKEY system variable contains the natural (untranslated) name of the function key that terminates user input in the last displayed panel. &SYS.NATIVE.INKEY is from two through four characters long: for example, F1 or SF16. If a synchronous panel has been defined with the #OPT panel control statement and a time interval (specified on the INWAIT operand) has elapsed, &SYS.INKEY is set to null. &SYS.NATIVE.
System Variables &SYS.NCL.BASEPROC and &SYS.NCL.CURRPROC &SYS.NCL.BASEPROC and &SYS.NCL.CURRPROC The &SYS.NCL.BASEPROC system variable contains the name of an NCL base procedure; &SYS.NCL.CURRPROC contains the name of the procedure currently executing. When an NCL procedure is invoked, the first procedure executed is called the base procedure. If the procedure is not nested, both system variables have the same contents (the name of the procedure currently executing).
System Variables &SYS.NCL.ENV &SYS.NCL.ENV The &SYS.NCL.ENV system variable contains the environment in which the NCL process is executing. &SYS.NCL.ENV Considerations Possible values for &SYS.NCL.ENV are: BLOG The NCL process is executing in the background logger (LOGP) environment. BMON The NCL process is executing in the background monitor (BMON) environment. BSYS The NCL process is executing in the background system (BSYS) environment.
System Variables &SYS.NCL.NEST &SYS.NCL.NEST The &SYS.NCL.NEST system variable contains the nesting level number of the current procedure or function. When an NCL procedure is invoked, the first procedure executed is called the base procedure. If the base procedure calls another procedure or function, the second procedure and any further procedures or functions that are called become nested. Any procedure or function may use &SYS.NCL.NEST to determine the nesting level number at which it is executing.
System Variables &SYS.NCL.RESTART &SYS.NCL.RESTART The &SYS.NCL.RESTART system variable contains the number of restarts for a persistent NCL process. &SYS.NCL.RESTART Considerations &SYS.NCL.RESTART is initially set to 0 (zero) when a persistent NCL process is started, and is incremented by 1 each time the NCL procedure restarts. If the NCL procedure is not started as persistent, the value of &SYS.NCL.RESTART is, and remains, null. See the START verb in Section 3, “Verbs.
System Variables &SYS.NCL.TYPE &SYS.NCL.TYPE The &SYS.NCL.TYPE system variable contains the type of the current procedure. NCL procedures may be one of several types. Most NCL procedures are standard types; that is, they use all the standard NCL core statements, verbs, built-in functions, and system variables. Some NCL procedures run as a special type of NCL process.
System Variables &SYS.NCL.VMAX &SYS.NCL.VERSION The &SYS.NCL.VERSION system variable contains the current version number of NCL. It can be used to assist in structuring NCL procedures running in environments using mixed releases of NonStop NET/MASTER MS software. The release number is returned in the format Vx.y, in which x.y is the current NCL version number. &SYS.NCL.VERSION Example The following example tests the &SYS.NCL.
System Variables &SYS.NCLID &SYS.NCLID The &SYS.NCLID system variable contains the unique identifier of the NCL process that is referring to it. Each NCL process in the system is identified by a unique identifying number. This is to allow different NCL processes to communicate with each other or to allow a terminal user to communicate with an NCL process. For example, the NCL WRITE verb uses &SYS.NCLID to send a message from one NCL process to another.
System Variables &SYS.NM.DID &SYS.NM.DID The &SYS.NM.DID system variable contains the value of the NonStop NET/MASTER MS domain identifier. The PARAM DID command, which can be used only in the configuration file, specifies a one-character through four-character domain identifier. If PARAM ID is not specified, the first four characters of the NonStop NET/MASTER Management Services (MS) system name (or ANON, for anonymous, if no system name is specified) is used.
System Variables &SYS.NM.ID &SYS.NM.ID The &SYS.NM.ID system variable contains the ID of this NonStop NET/MASTER MS system allocated to the local NonStop NET/MASTER MS system by the SYSPARMS ID command. If the system ID has not been set, the default value ANON (for anonymous) is returned. When multiple NonStop NET/MASTER MS systems are running in the same network on the same or different machines, each should have a unique ID. This is not required but it is good operational practice.
System Variables &SYS.NNM.RELDATE &SYS.NNM.PRODNUM The &SYS.NNM.PRODNUM system variable contains the Tandem product number of the NonStop NET/MASTER MS system. &SYS.NNM.PRODNUM Consideration See also &SYS.NNM.RELDATE and &SYS.NNM.VERSION, which provide other details about the NonStop NET/MASTER MS system. Example The following example displays the &SYS.NNM.PRODNUM system variable: APROC: PROCEDURE SAY "&SYS.NNM.PRODNUM = " &SYS.NNM.PRODNUM END APROC &SYS.NNM.RELDATE The &SYS.NNM.
System Variables &SYS.NNM.VERSION &SYS.NNM.VERSION The &SYS.NNM.VERSION system variable contains the version number of the current NonStop NET/MASTER MS system. &SYS.NNM.VERSION Consideration See also &SYS.NNM.PRODNUM and &SYS.NNM.RELDATE, which provide other details about the NonStop NET/MASTER MS system. Example The following example displays the &SYS.NNM.VERSION system variable: APROC: PROCEDURE SAY "&SYS.NNM.VERSION = " &SYS.NNM.VERSION END APROC &SYS.NODE.NAME The &SYS.NODE.
System Variables &SYS.NODE.NUM &SYS.NODE.NUM The &SYS.NODE.NUM system variable contains the system number of the local system. &SYS.NODE.NUM Considerations A value of 255 is returned for &SYS.NODE.NUM if the system is not configured for Expand. See also &SYS.NODE.NAME, which contains the system name of the local system. Example The following example displays the &SYS.NODE.NUM system variable: APROC: PROCEDURE SAY "&SYS.NODE.NUM = " &SYS.NODE.
System Variables &SYS.OCS.ID and &SYS.OCS.IDO &SYS.OCS.ID and &SYS.OCS.IDO The &SYS.OCS.ID and &SYS.OCS.IDO system variables contain the OCS ID name for the current window and the second window. These system variables enable an NCL procedure to test the ID of the current OCS window. &SYS.OCS.ID is set to the same ID used in the OCSID command. If no ID has been set, &SYS.OCS.ID returns a null value. &SYS.OCS.
System Variables &SYS.OS.GENERIC and &SYS.OS.SPECIFIC &SYS.OS.GENERIC and &SYS.OS.SPECIFIC The &SYS.OS.GENERIC and &SYS.OS.SPECIFIC system variables contain the generic and specific names, respectively, of the operating system under which NonStop NET/MASTER MS is operating. The value of both of these variables is GUARDIAN, which specifies the Tandem NonStop Kernel. &SYS.OS.GENERIC &SYS.OS.SPECIFIC Example The following example displays the &SYS.OS.GENERIC and &SYS.OS.
System Variables &SYS.PANEL.ERRORC &SYS.PANEL.ERRORC The &SYS.PANEL.ERRORC system variable contains the value specified with the command SYSPARMS SPERRORC. This is the value for the operand COLOR in specifying the display characteristics of error fields and error messages on a panel. The default value is RED. &SYS.PANEL.ERRORC Considerations A new value can be assigned to this variable only by using the command SYSPARMS SPERRORC. See the example that follows.
System Variables &SYS.PANEL.ERRORH &SYS.PANEL.ERRORH The &SYS.PANEL.ERRORH system variable contains the value specified with the command SYSPARMS SPERRORH. This is the value for the operand HLITE in specifying the display mode for error fields and error messages on a panel. The default value is REVERSE. &SYS.PANEL.ERRORH Considerations A new value can be assigned to this variable only by using the command SYSPARMS SPERRORH. See the example that follows.
System Variables &SYS.PANEL.FKEYC &SYS.PANEL.FKEYC The &SYS.PANEL.FKEYC system variable contains the value specified with the command SYSPARMS SPFKEYC. This is the value for the operand COLOR in specifying the display characteristics of left and right titles and function key descriptions on a panel. The default value is TURQUOISE. &SYS.PANEL.FKEYC Considerations A new value can be assigned to this variable only by using the command SYSPARMS SPFKEYC. See the example that follows.
System Variables &SYS.PANEL.FLD &SYS.PANEL.FLD The &SYS.PANEL.FLD system variable contains the name of the variable associated with the field in error. It is set to the null value if no error was detected by internal validation. &SYS.PANEL.FLD Considerations The setting of this variable by NCL can occur when a panel is displayed and there is subsequent incorrect data entry by the operator. &SYS.PANEL.FLD is set by panel services as a result of an internal validation error.
System Variables &SYS.PANEL.ID &SYS.PANEL.ID The &SYS.PANEL.ID system variable contains the name of the current panel as it appears on the panel verb; it is intended to label the panel display with an identifier. &SYS.PANEL.ID provides an alternative to the inclusion of the actual panel name within the body of the panel. This variable can be used only in a panel, otherwise an error occurs. &SYS.PANEL.ID Example The following example shows the use of the &SYS.PANEL.
System Variables &SYS.PANEL.INPHIC &SYS.PANEL.INPHIC The &SYS.PANEL.INPHIC system variable contains the value specified with the command SYSPARMS SPINPHIC. This is the value for the operand COLOR in specifying the display characteristics of mandatory input fields on a panel. The default value is WHITE. &SYS.PANEL.INPHIC Considerations A new value can be assigned to this variable only by using the command SYSPARMS SPINPHIC. See the example that follows.
System Variables &SYS.PANEL.INPLOC &SYS.PANEL.INPLOC The &SYS.PANEL.INPLOC system variable contains the value specified with the command SYSPARMS SPINPLOC. This is the value for the operand COLOR in specifying the display characteristics of optional input fields on a panel. The default value is TURQUOISE. &SYS.PANEL.INPLOC Considerations A new value can be assigned to this variable only by using the command SYSPARMS SPINPLOC. See the example that follows.
System Variables &SYS.PANEL.INPUTH &SYS.PANEL.INPUTH The &SYS.PANEL.INPUTH system variable contains the value specified with the command SYSPARMS SPINPUTH. This is the value for the operand HLITE in specifying the display mode of input fields on a panel. The default value is USCORE. &SYS.PANEL.INPUTH Considerations A new value can be assigned to this variable only by using the command SYSPARMS SPINPUTH. See the example that follows. An attempt to change this variable to an invalid value produces an error.
System Variables &SYS.PANEL.INPUTP &SYS.PANEL.INPUTP The &SYS.PANEL.INPUTP system variable contains the value specified with the command SYSPARMS SPINPUTP. This is the value for the PAD operand in a panel input field. &SYS.PANEL.INPUTP Considerations If the terminal supports the underlining of input fields, the value of this system variable is NULL; it can not be changed. If the terminal does not support the underlining of input fields, &SYS.PANEL.
System Variables &SYS.PANEL.LABELC &SYS.PANEL.LABELC The &SYS.PANEL.LABELC system variable contains the value specified with the command SYSPARMS SPLABELC. This is the value for the operand COLOR in specifying the display characteristics of field labels and comments on a panel. The default value is GREEN. &SYS.PANEL.LABELC Considerations A new value can be assigned to this variable only by using the command SYSPARMS SPLABELC. See the example that follows.
System Variables &SYS.PANEL.MODFLD &SYS.PANEL.MODFLD The &SYS.PANEL.MODFLD system variable contains the names of the fields that have been modified in a displayed panel. The changed fields as a result of being input fields on a panel are returned in the order they appear on the screen (that is, left to right and top to bottom). &SYS.PANEL.MODFLD contains all fields that have been modified, if the FLDCTL operand of the CONTROL verb has been specified.
System Variables &SYS.PANEL.MODFLD Example In the following example, the procedure MOD_PROC tests the &SYS.PANEL.MODFLD system variable and selects a new panel based on the contents: MOD_PROC: PROCEDURE PANEL NAME = NAMEADDR VALIDATE: /* jump to next panel */ IF &SYS.PANEL.
System Variables &SYS.PANEL.OUTHIC &SYS.PANEL.OUTHIC The &SYS.PANEL.OUTHIC system variable contains the value specified with the command SYSPARMS SPOUTHIC. This is the value for the operand COLOR in specifying the display characteristics of permanent output data fields on a panel. The default value is WHITE. &SYS.PANEL.OUTHIC Considerations A new value can be assigned to this variable only by using the command SYSPARMS SPOUTHIC. See the example that follows.
System Variables &SYS.PANEL.OUTLOC &SYS.PANEL.OUTLOC The &SYS.PANEL.OUTLOC system variable contains the value specified with the command SYSPARMS SPOUTLOC. This is the value for the operand COLOR in specifying the display characteristics of optional output data fields on a panel. The default value is TURQUOISE. &SYS.PANEL.OUTLOC Considerations A new value can be assigned to this variable only by using the command SYSPARMS SPOUTLOC. See the example that follows.
System Variables &SYS.PANEL.SKIP &SYS.PANEL.SKIP The &SYS.PANEL.SKIP system variable contains the next panel skip level in a panel set (hierarchical group of panels). This variable is set because a PSKIP attribute has been assigned to a panel input field. This variable can be assigned in an NCL procedure. This allows direct panel skip information to be entered in the form OPT1.OPT2.OPT3. and so on. Each time a reference is made to &SYS.PANEL.
System Variables &SYS.PANEL.SKIP Errors in the specified panel set value may cause termination of the skip process. Attempts to navigate beyond a valid panel structure or to pass a point at which mandatory input data is required also cause the skip process to terminate. Considerations When panel skipping is in progress, intermediate system menu panels, such as the primary menu, are automatically suppressed.
System Variables &SYS.PANEL.SUBTLC &SYS.PANEL.SUBTLC The &SYS.PANEL.SUBTLC system variable contains the value specified with the command SYSPARMS SPSUBTLC. This is the default value for the operand COLOR in specifying the display mode of subtitles and headings on a panel. The default value is YELLOW. &SYS.PANEL.SUBTLC Considerations A new value can be assigned to this variable only by using the command SYSPARMS SPSUBTLC. See the example that follows.
System Variables &SYS.PANEL.TITLEC &SYS.PANEL.TITLEC The &SYS.PANEL.TITLEC system variable contains the value specified with the command SYSPARMS SPTITLEC. This is the default value for the operand COLOR in specifying the display characteristics for centered titles in a panel. The default value is TURQUOISE. &SYS.PANEL.TITLEC Considerations A new value can be assigned to this variable only by using the command SYSPARMS SPTITLEC. See the example that follows.
System Variables &SYS.PANEL.TITLEP &SYS.PANEL.TITLEP The &SYS.PANEL.TITLEP system variable contains the value specified with the command SYSPARMS SPTITLEP. This is the default value for the PAD operand for centered titles in a panel. The default value is the hyphen character (-). &SYS.PANEL.TITLEP Considerations A new value can be assigned to this variable only by using the command SYSPARMS SPTITLEP. See the example that follows. An attempt to change this variable to an invalid value produces an error.
System Variables &SYS.PARMCNT &SYS.PARMCNT The &SYS.PARMCNT system variable contains a count of the number of variables entered when a function or a procedure is invoked. When a function is invoked, parameters (arguments) can be passed to it. Similarly, when a procedure is invoked implicitly, or by using the EXEC command, START command, or CALL core statement, parameters (arguments) can be passed to the procedure.
System Variables &SYS.PSEND.ERROR &SYS.PSEND.ERROR The &SYS.PSEND.ERROR system variable contains the current Guardian file system error resulting from the last PATHSEND operation. &SYS.PSEND.ERROR Considerations See also the other &SYS.PSEND system variables in this section. See also the PSEND SEND verb in Section 3, “Verbs.” For more information on Guardian file system errors, refer to the Guardian Procedure Errors and Messages Manual.
System Variables &SYS.PSEND.RC &SYS.PSEND.ID The &SYS.PSEND.ID system variable contains the ID of the current local PSEND identifier. &SYS.PSEND.ID Consideration See also the other &SYS.PSEND system variables in this section. Example The following example displays a warning message if the &SYS.PSEND.ID system variable is equal to IDD1, indicating that this ID is not the correct one for the current message: PSERROR3: PROCEDURE IF &SYS.PSEND.
System Variables &SYS.RETCODE &SYS.RETCODE The &SYS.RETCODE system variable contains the current system return code or contains a new user-assigned return code value. If &SYS.RETCODE has not been set, it contains a default value of 0 (zero). This system variable can be assigned a value in the range 0 (zero) through 99 by an NCL procedure. The FINDRC operand of the CONTROL verb allows a procedure to determine the success of a call to a lower-level procedure.
System Variables &SYS.SYS.ID &SYS.SIGNON The &SYS.SIGNON system variable indicates whether a second window is opened. The value of &SYS.SIGNON remains at 0 (zero) until the second window is open. It then changes to 1 and remains at 1 even if the second window is later closed. 0 (zero) and 1 are the only possible values for &SYS.SIGNON. &SYS.SIGNON Consideration The purpose in having an initial value of 0 (zero) is so that an NCL procedure may perform some initialization when only one window is open.
System Variables &SYS.TERM.COLS &SYS.TERM.COLS The &SYS.TERM.COLS system variable contains the number of columns available to the physical terminal, regardless of the current processing window size. If tested from a procedure running in a background environment, &SYS.TERM.COLS returns a value of 80. &SYS.TERM.COLS Example The following example shows how you might use this system variable: IF &SYS.TERM.COLS > 80 THEN SAY "BIG SCREEN" &SYS.TERM.DEVNAME The &SYS.TERM.
System Variables &SYS.TERM.EXTCO &SYS.TERM.EXTCO The &SYS.TERM.EXTCO system variable indicates if the terminal from which the NCL procedure is executing supports extended color. &SYS.TERM.EXTCO is initially set when you log on to a terminal. If the terminal supports extended color, &SYS.TERM.EXTCO is set to 1; otherwise, it is set to 0 (zero). Testing of device attributes from within an NCL procedure displaying full-screen panels is not normally required.
System Variables &SYS.TERM.EXTHI &SYS.TERM.EXTHI The &SYS.TERM.EXTHI system variable indicates whether the terminal from which the NCL procedure is executing supports extended highlighting. &SYS.TERM.EXTHI is initially set when you log on to a terminal. If the terminal supports extended highlighting, &SYS.TERM.EXTHI is set to 1; otherwise, it is set to 0 (zero). Testing of device attributes from within an NCL procedure displaying full-screen panels is not normally required.
System Variables &SYS.TERM.NAME &SYS.TERM.NAME The &SYS.TERM.NAME system variable contains the logical name of the terminal from which the NCL procedure is executing. NCL procedures may need to vary processing depending on the NCL environment in which the procedure is running. The value returned from &SYS.TERM.NAME contains, at most, eight characters. &SYS.TERM.NAME Consideration Certain system environments use virtual user IDs and terminal names.
System Variables &SYS.TERM.ROWS &SYS.TERM.ROWS The &SYS.TERM.ROWS system variable contains the number of rows available to the physical terminal, regardless of the current processing window size. &SYS.TERM.ROWS Considerations It is good practice to write procedures that accommodate the largest screen size but that automatically adjust for a smaller screen. However, formatting output to suit the terminal size currently being used offers performance advantages.
System Variables &SYS.TERM.TYPE &SYS.TERM.TYPE The &SYS.TERM.TYPE system variable contains the type of terminal from which the procedure is running. This variable is useful because the results from an NCL procedure may be dependent on the type of device that is being used or the NCL environment that the procedure is running in. &SYS.TERM.TYPE Considerations The &SYS.TERM.
System Variables &SYS.TIME &SYS.TIME The &SYS.TIME system variable contains the current time of day in the format hh:mm:ss in which hh is hours, mm is minutes, and ss is seconds. The value of &SYS.TIME is taken from the system time. The value returned from &SYS.TIME is always an eight-character value (for example, 8:00 a.m. is prefixed with a zero: 08:00:00). &SYS.TIME Example The following example shows how you might use this system variable: SAY "The time is "&SYS.TIME "." &SYS.USER.AUTH The &SYS.
System Variables &SYS.USER.ID &SYS.USER.ID The &SYS.USER.ID system variable contains the user ID of the user currently executing the procedure. The value returned is from one through eight characters. NCL procedures execute in the NCL processing region of a NonStop NET/MASTER MS user, represented by a user ID. The user ID may be a real user or an internal user ID that supports one of the system level processing regions. &SYS.USER.
System Variables &SYS.USER.LC &SYS.USER.LC The &SYS.USER.LC system variable contains the language code for this user. NonStop NET/MASTER MS supports the specification of a language code for a user. This code can be used to provide language-dependent processing from NCL. Such processing includes variation of spelling, of error messages, or of help panels for a particular user.
System Variables &SYS.USER.PWSTATE &SYS.USER.MODE The &SYS.USER.MODE system variable indicates whether the current user ID has been used. If the initial installation user ID is being used, the value of this variable is INSTALL. If this is the first time a user has signed on, the value of the variable is set to NEW. Otherwise, the value is null. &SYS.USER.MODE Example The following example shows how you might use this system variable: IF &SYS.USER.MODE = NEW SAY "Welcome to NNM" &SYS.USER.
System Variables &SYS.VARCNT &SYS.VARCNT The &SYS.VARCNT system variable contains the number of variables created or modified by the last NCL verb that used generic processing. A number of NCL verbs are capable of generating one or more variables necessary to hold data that results from the verb’s operation. An NCL procedure can use this system variable to determine how many variables have been created, as shown in the following example. &SYS.VARCNT Example The following example uses the &SYS.
System Variables &SYS.WINDOW.COLS &SYS.WINDOW.COLS The &SYS.WINDOW.COLS system variable contains the number of columns currently available to this processing window. NonStop NET/MASTER MS supports split screen operation, with a maximum of two operational windows. When using split screen operation, the number of display columns available to the procedure may be less than the physical width for the screen. &SYS.WINDOW.COLS indicates the number of display columns available for the window it is tested in.
System Variables &SYS.WINDOW.NUMBER &SYS.WINDOW.NUMBER The &SYS.WINDOW.NUMBER system variable contains the identifier of the current window. The current window (in whose NCL processing environment a process is executing) is assigned either a 1 or a 2 to differentiate the primary window from the second window. &SYS.WINDOW.NUMBER Consideration If referred to in a background environment, &SYS.WINDOW.NUMBER is 0 (zero). Example The following example shows how you might use this system variable: IF &SYS.
System Variables &SYS.WINDOW.REAL &SYS.WINDOW.REAL The &SYS.WINDOW.REAL system variable indicates whether the issuing procedure has access to a terminal window, and if it can issue a PANEL statement. For any NCL procedure executing in an NCL processing environment that is associated with a real terminal window (for example, a procedure that is not running in a system background environment or as a ROC session), &SYS.WINDOW.REAL returns a value of 1. Otherwise, NCL returns a value of 0 (zero). &SYS.WINDOW.
System Variables &SYS.WINDOW.ROWS &SYS.WINDOW.ROWS The &SYS.WINDOW.ROWS system variable contains the number of rows available in the current window and should be used when developing procedures that may be executed in OCS windows of different sizes. The system supports split screen operation with a maximum of two operational windows. &SYS.WINDOW.ROWS is useful when using split screen operation, and the number of display lines available to the procedure is less than the physical number for the full screen.
6 Panel Control Statements Using panel control statements, you can control panel displays by creating and modifying panel description files. (You can use the Tandem text editor, TEDIT, available in NonStop NET/MASTER MS Edit Services, to create panel description files.) Once displayed, panels allow you to enter data. Panel control statements are not part of the displayed screen.
Panel Control Statements Panel Control Statements This section describes the panel control statements available in NCL. The full description of each statement contains: A brief overview of what the statement does A diagram showing the syntax of the statement Descriptions of each operand in the statement Considerations affecting the usage of the statement A list of related statements, verbs, or other NCL components At least one example of the use of the statement.
Panel Control Statements Summary of Panel Field Attributes Summary of Panel Table 6-1 contains a list and description of the system variables that control field Field Attributes attributes in panels. This table also shows the SYSPARMS command that can be used to alter the default value of the associated system variable. For a description of each system variable, see the entry for the variable in Section 5, “System Variables.” Table 6-1.
Panel Control Statements Summary of Panel Control Statements Summary of Panel Control Statements Table 6-2 contains a list and description of the panel control statements that are documented in this section. For a detailed description of each statement, see the entry for that statement in this section. The entries are arranged in the same order as in this list. Table 6-2.
Panel Control Statements #ALIAS #ALIAS The #ALIAS panel control statement specifies alternative names for fields in a panel description file. The #ALIAS statement allows you to use short names in a panel description file and longer, more meaningful names in an NCL procedure. #ALIAS name { VARS=variable* [ RANGE=( start,end ) ] | VARS=input-vars-list } name specifies an alternative name, or alias.
Panel Control Statements #ALIAS Multiple #ALIAS statements can be specified using the same or different names. Where the same name appears on multiple #ALIAS statements, the variables in the current VARS list are added to the variables that are specified in the previous list or lists. Variables can be included in the ALIAS statement. Variable substitution takes place before processing the ALIAS statement, using variables available to the NCL process at the time it issues the PANEL verb.
Panel Control Statements #ALIAS An NCL procedure that uses this panel, and accepts input from it, is shown next: PSLP: PROCEDURE ON panel_error do say “&sys.retcode = “ &sys.
Panel Control Statements #ERR #ERR The #ERR panel control statement specifies what happens when internal panel validation finds an error. Internal validation checks panels and redisplays them if it finds any errors. The #ERR statement specifies particular display parameters when a panel is being redisplayed after an error condition. NCL applies any attributes defined in the #ERR statement to the field in error, then positions the cursor at that field before redisplaying the panel.
Panel Control Statements #ERR { COLOR | COLOUR }=color-option specifies the color of the field in error. The COLOR operand is ignored if the terminal does not support extended color. You can dynamically change the displayed color of the field in error if you assign a variable to color-option in the #ERR statement. DEFAULT places the terminal in its native display mode, which is usually white. HLITE specifies the highlighting you want for displaying the field in error.
Panel Control Statements #ERR Considerations If multiple #ERR statements are defined that contain contradictory options, the final #ERR statement containing the repeated option(s) is the one that is accepted. For example, the following two statements are in conflict: #ERR ALARM = NO, COLOR=RED, HLITE=BLINK #ERR ALARM=YES, HLITE=NONE Both statements are accepted. The color option from the first statement is not in conflict with any options in the second statement, so COLOR=RED remains effective.
Panel Control Statements #ERR See the &SYSMSG variable and the &SYS.PANEL.MODFLD system variable in Section 5, ”System Variables.” &SYSMSG is a variable that can contain user information. &SYS.PANEL.MODFLD is set to contain the names of any variables whose content has changed as a result of user input to a panel, including any variables that give input errors. The CONTROL verb option FLDCTL must be set if you want the &SYS.PANEL.MODFLD system variable to be updated, as described earlier.
Panel Control Statements #FLD #FLD The #FLD panel control statement specifies or modifies the attributes of a field character. The display area of a panel consists of two types of fields—protected and unprotected fields. You cannot change (enter data into) protected fields. An unprotected field is a field into which you can enter data. The #FLD panel statement allows you to specify these two types of fields and to define the differing properties of various fields of the same type.
Panel Control Statements #FLD C specifies the character that identifies the start of a field in the panel. This is called a field character. It must be a single nonalphanumeric character. To specify an alphanumeric character you must use the X'xx' option. You can use any special character except the ampersand (&), which is reserved for use with variables. The first #FLD statement to refer to a particular field character specifies a new character.
Panel Control Statements #FLD BLANKS specifies the required format of the input data. A field might contain imbedded blanks. For example, if NONE is specified and the data contains blanks, an error message is issued. Internal validation redisplays the erroneous panel with the &SYSMSG variable set to “INCOMPLETE FIELD.” ANY ensures that the entered data can contain blanks in any position. NONE ensures that the entered data contains no blanks at all.
Panel Control Statements #FLD EDIT=type specifies that (for input fields) you want NCL to perform additional internal editing. By default, NCL performs no special editing. Specification of this operand ensures that the entered data conforms to the specified type. If a field is mandatory, then REQ=YES must also be specified. Table 6-3 contains a list of the possible entries for the EDIT=type operand for #FLD. If the input data does not conform to the specified type, a validation error occurs; see #ERR.
Panel Control Statements #FLD BLINK displays the field with the flashing or “blink” attribute. NONE displays the field in the native display mode of the terminal. REVERSE displays the field with the reverse video attribute. USCORE displays the field with the underline attribute. INTENS specifies the required intensity for displaying a field. If you specify either the COLOR or HLIGHT options, panel services ignores the INTENS operand. LOW displays the field in low or standard intensity.
Panel Control Statements #FLD ASIS is the same as entering LEFT for output fields. For input fields, data is positioned exactly as defined in the variable; padding takes place to the right. CENTER for output fields, results in padding to both the left and the right. For input fields, CENTER is treated the same as LEFT. LEFT aligns the text with the left margin. Padding takes place to the right. This occurs for both input and output fields. RIGHT aligns the text with the right margin.
Panel Control Statements #FLD PSKIP specifies whether you want panel skip requests to be satisfied. This option is valid only for input fields. You can make a panel skip request by entering a field of the form =m.m (.m.m …) in which m.m is a menu selection. NCL makes a panel skip to the menu defined by m.m. If no menu is found to satisfy the menu selection, NCL raises an error. GMENU specifies that you want NCL to scan the input field for a panel skip request and, if valid, make the skip.
Panel Control Statements #FLD REQ specifies whether this is a mandatory (required) input field that must be entered by the user. If CONTROL PANELRC is not in effect and you choose the YES option, panel services rejects the panel unless you enter something in this field. NCL adds the message REQUIRED FIELD OMITTED to the local &SYSMSG variable. Processing of the error condition is then performed as defined by the #ERR panel control statement.
Panel Control Statements #FLD TYPE specifies whether the field is to be processed as an output field (OUTPUT), input field (INPUT), or pseudo-input field (NULL). NCL ignores any data input into a NULL field type. However, if a field specified as NULL is described as containing a text string, this string is displayed. INPUT creates an unprotected field that allows keyboard entry. Such fields can contain a single, simple, variable name (minus the ampersand) only.
Panel Control Statements #FLD VALIGN specifies the type of alignment of data you require for an individual variable in an output field. The length of the variable name itself dictates the manner in which alignment takes place. Do not confuse this with the option JUST, which applies to field alignment after all variable substitution has been completed, and which takes no account of the length of the variable name.
Panel Control Statements #FLD Considerations See also the ASSIGN and CONTROL verbs in Section 3, “Verbs.” The ASSIGN verb can assign a list or range of values to multiple variables. In particular, Format 2 of this verb can give you information about those variables that have acquired the MODFLD attribute by being changed as a result of a panel display. The CONTROL verb has some options, such as the PANELRC option, that can affect the way in which panels are displayed and processed.
Panel Control Statements #FLD The following example shows the use of the #FLD panel statement in defining a field (RKEY) as either input or output. #NOTE This is panel PNL3. #FLD $ TYPE=&INOUT It contains an example of the OUTVAR operand in #FLD. #NOTE % HIGH-INTENSITY (OUTPUT) #NOTE + LOW-INTENSITY (OUTPUT) #NOTE _ HIGH-INTENSITY (INPUT) #NOTE If &INOUT equals OUTVAR, the field &RKEY is an output only field. #NOTE If &INOUT equals INPUT, &RKEY is an input field that can #NOTE be modified by the user.
Panel Control Statements #INCLUDE #INCLUDE The #INCLUDE panel control statement specifies a panel name as a source of panel statements. The source from the included panel is merged with the including panel when the panel is invoked by an NCL procedure. #INCLUDE panelname panelname specifies the name of a source panel. Considerations This statement can occur anywhere in a panel. panelname cannot be substituted. An #INCLUDE statement that is the result of preparsing is treated as ordinary data.
Panel Control Statements #INCLUDE Example The following example shows how the #INCLUDE statement can be used in two different areas of a panel description file: #NOTE THIS PANEL IS CALLED "PSSSST" #ERR ALARM=YES #FLD ! TYPE=OUTPUT INTENS=HIGH #OPT PREPARSE=($,S) #INCLUDE PPSLP %PRESS ANY KEY TO CONTINUE: _INPUT + +&VBL1 +TEXT #INCLUDE RESTOFIT +$VBL1 106126 Tandem Computers Incorporated +TEXT 6–25
Panel Control Statements #NOTE #NOTE The #NOTE panel control statement provides a means of including documentation within a panel description file. You can specify as many #NOTE statements as required, in any order, provided all #NOTE statements precede the display part of a panel. The first statement in a panel description file that is not a panel control statement determines the start of the panel display area.
Panel Control Statements #OPT #OPT The #OPT panel control statement specifies the operational and processing characteristics of a panel. NCL scans the #OPT statement and performs any necessary variable substitution before parsing. This allows dynamic tailoring of the panel processing options available with this statement. You can specify as many #OPT statements as required, in any order, provided all #OPT statements precede the display part of a panel.
Panel Control Statements #OPT row,column specifies the precise coordinates for the initial positioning of the cursor. If CURSOR is omitted, the cursor takes the position of the first character of the first input field found on the panel. If there are no input fields, the cursor is positioned in the upper left-hand corner of the panel window. This is equivalent to row 1 column 1, that is, position 1,1.
Panel Control Statements #OPT ERRFLD=varname specifies a variable that holds the name of any input field in error. You must precede this operand with the ampersand (&) variable specifier. Use of this operand without including a #ERR statement within the panel description file results in a run-time error. In this case, NCL sets the &SYS.RETCODE system variable to 16. The ERRFLD operand provides a simple way of identifying the name of the field in error.
Panel Control Statements #OPT NO specifies that you want input field variables and the &SYS.PANEL.MODFLD system variable to remain unaffected if the INWAIT time expires. INWAIT=ss.t specifies, for panels described as synchronous (see the PANEL verb option TYPE=SYNC), how long you want panel services to wait for input from the terminal before returning control to the NCL procedure that issued the panel. ss.t is expressed in seconds and tenths of a second.
Panel Control Statements #OPT PREPARSE requests that panel services perform a preliminary substitution scan of each panel line before processing the line for field characters. PREPARSE specifies a character (c) to be used to determine where substitution is to take place. This character is processed in a similar manner to an ampersand (&) during standard variable substitution.
Panel Control Statements #OPT You can specify trailer lines on the screen by using the PREPARSE operand of the #OPT panel statement. However, this is less efficient than using the #TRAILER statement. See the #TRAILER panel control statement, later in this section. The #TRAILER statement was designed to perform the task of automatically including trailer lines on a screen. See also the &SYS.INKEY and &SYS.NATIVE.INKEY system variables in Section 5, “System Variables.
Panel Control Statements #OPT A procedure that displays the preceding panel is shown next: PSLP: /* PROCEDURE assign some variables */ &NUM = FIRST &VBL1 = “!THIS IS THE &NUM SENTENCE” &INPUT = /* now issue the verb to display the panel */ PANEL PPSLP END PSLP This procedure is not executable until the panel called PPSLP is placed in a panel library. The steps to do this are not shown here. Refer to the NonStop NET/MASTER NCL Programmer’s Guide for information on how to set up a panel library.
Panel Control Statements #TRAILER #TRAILER The #TRAILER panel control statement provides a means for positioning text at the bottom of the screen, regardless of the screen’s size. This statement is useful for positioning the function key prompts that are conventionally placed at the bottom of a screen. A #TRAILER statement precedes, and follows, the lines of text that you want to appear at the bottom of the screen.
Panel Control Statements #TRAILER If you want the trailer lines to be preparsed, you must precede the trailer lines with the PREPARSE operand. For further information on the #TRAILER panel control statement, refer to the NonStop NET/MASTER NCL Programmer’s Guide. It contains many examples of panel description files and displays. This guide also discusses the differences between asynchronous and synchronous panel types.
Panel Control Statements #TRAILER The panel displayed by the NCL procedure DISP1, follows. The comments in quotes are not part of the panel definition file: they are explanatory text only. The underscore (_) in the top line of the screen indicates the cursor position where you can enter data.
7 Message Profile Variables After execution of the EMSREAD, INTREAD, LOGREAD, or MSGREAD verb (referred to in this section as the xxxREAD verbs), an entire suite of variables is set to reflect the profile of the message that was read. These are known as the message profile variables and are implemented as a mapped data object (MDO). A message profile variable name starts with a prefix &$xxx., in which xxx represents the first three letters of the verb that sets the variable.
Message Profile Variables Message Profile Variable Groups Table 7-2 lists the message profile variables by group. Table 7-2. List of Message Profile Variables (Page 1 of 2) Group Message Profile Variables CNM information Display attributes of the message &$xxx.CNM &$xxx.MSGATTR &$xxx.MSGATTR.ALARM &$xxx.MSGATTR.CLASS &$xxx.MSGATTR.CLASS.AOMMSG &$xxx.MSGATTR.CLASS.EMSMSG &$xxx.MSGATTR.CLASS.FTSMSG &$xxx.MSGATTR.CLASS.MONMSG &$xxx.MSGATTR.CLASS.MSGALL &$xxx.MSGATTR.CLASS.PPOMSG &$xxx.MSGATTR.
Message Profile Variables Message Profile Variable Groups Table 7-2. List of Message Profile Variables (Page 2 of 2) Group Message Profile Variables Prefix information &$xxx.PREFIX &$xxx.PREFIX.LASTMSGID &$xxx.PREFIX.LASTMSGID.ID &$xxx.PREFIX.LASTMSGID.TYPE &$xxx.PREFIX.MSGIND &$xxx.PREFIX.MSGTEXT &$xxx.PREFIX.ORIGMSGID &$xxx.PREFIX.ORIGMSGID.ID &$xxx.PREFIX.ORIGMSGID.TYPE &$xxx.PPOCNTL &$xxx.PPOCNTL.CONTROL &$xxx.PPOCNTL.CONTROL.FLAGS &$xxx.PPOCNTL.CONTROL.MULTICORRELATOR &$xxx.PPOCNTL.CONTROL.
Message Profile Variables Communication Network Management Information CNM Information This MDO variable contains communications network management (CNM) information. &$xxx.CNM &$xxx.CNM contains CNM information. There are no subordinate details.
Message Profile Variables Display Attributes of a Message Display Attributes of a Message text display attributes contain information about the color, positioning, Message highlighting, and other display characteristics of the message text. &$xxx.MSGATTR &$xxx.MSGATTR.ALARM &$xxx.MSGATTR.CLASS &$xxx.MSGATTR.CLASS.AOMMSG &$xxx.MSGATTR.CLASS.EMSMSG &$xxx.MSGATTR.CLASS.FTSMSG &$xxx.MSGATTR.CLASS.MONMSG &$xxx.MSGATTR.CLASS.MSGALL &$xxx.MSGATTR.CLASS.PPOMSG &$xxx.MSGATTR.DISPLAY &$xxx.MSGATTR.DISPLAY.
Message Profile Variables Display Attributes of a Message &$xxx.MSGATTR contains the display attributes of the message text. This variable is present if the message is a standard text message. This variable is not present if the message is a delete operator message instruction; in this case, &$xxx.DOMID is present. &$xxx.MSGATTR.ALARM contains the alarm attribute of the message text. 1 (YES) indicates that the alarm is on. 0 (NO) indicates that the alarm is off. &$xxx.MSGATTR.
Message Profile Variables Display Attributes of a Message 1 (YES) indicates that the message originated from FTS. 0 (NO) indicates that the message did not originate from FTS. &$xxx.MSGATTR.CLASS.MONMSG contains a Boolean value that indicates whether the message is a monitor class message. 1 (YES) indicates that the message is a monitor class message. 0 (NO) indicates that the message is not a monitor class message. &$xxx.MSGATTR.CLASS.
Message Profile Variables Display Attributes of a Message &$xxx.MSGATTR.DISPLAY.BKGCOLOR contains the background color attribute of the message text. The possible values for this variable are BLUE, GREEN, NONE, PINK, RED, TURQUOISE, WHITE, or YELLOW. &$xxx.MSGATTR.DISPLAY.COLOR contains the color attribute of the message text. The possible values for this variable are BLUE, GREEN, NONE, PINK, RED, TURQUOISE, WHITE, or YELLOW. &$xxx.MSGATTR.DISPLAY.
Message Profile Variables Display Attributes of a Message &$xxx.MSGATTR.FLAGS.INTQ contains a Boolean value that indicates whether this message was created by using the INTQ command. &$xxx.MSGATTR.FLAGS.LAST contains a Boolean value that indicates whether this message is the last in a sequence. &$xxx.MSGATTR.FLAGS.LOG contains a Boolean value that indicates whether this message is logged. &$xxx.MSGATTR.FLAGS.
Message Profile Variables Display Attributes of a Message &$xxx.MSGATTR.FLD.BKGCOLOR contains the background color attribute of a section of the message text. The possible values for this variable are BLUE, GREEN, NONE, PINK, RED, TURQUOISE, WHITE, or YELLOW. &$xxx.MSGATTR.FLD.COLOR contains the color attribute of a section of the message text. The possible values for this variable are BLUE, GREEN, NONE, PINK, RED, TURQUOISE, WHITE, or YELLOW. &$xxx.MSGATTR.FLD.
Message Profile Variables Message Text DOMID Attributes Unique identifier of a non-roll-delete (NRD) message. &$xxx.DOMID &$xxx.DOMID.DOMAIN &$xxx.DOMID.NUMBER &$xxx.DOMID contains the unique identifier of a non-roll-delete (NRD) message. If this attribute is present and MSGATTR.FLAGS.NRD = 1, this is a full NRD message; otherwise, it is a DOM message. If this attribute is absent and MSGATTR.FLAGS.NRD = 1 this is an OPER NRD message; otherwise, it is a standard message. &$xxx.DOMID.
Message Profile Variables Prefix Information Prefix Information Prefix information, if present, contains information identifying messages that originated from a background environment or from a remote peer system using the ROUTE command. &$xxx.PREFIX &$xxx.PREFIX.LASTMSGID &$xxx.PREFIX.LASTMSGID.ID &$xxx.PREFIX.LASTMSGID.TYPE &$xxx.PREFIX.MSGIND &$xxx.PREFIX.MSGTEXT &$xxx.PREFIX.ORIGMSGID &$xxx.PREFIX.ORIGMSGID.ID &$xxx.PREFIX.ORIGMSGID.TYPE &$xxx.
Message Profile Variables Prefix Information &$xxx.PREFIX.ORIGMSGID indicates the type of message and the ID of the original node through which the message passed. &$xxx.PREFIX.ORIGMSGID.ID contains the message prefix value set by the LINK or ROUTE command. &$xxx.PREFIX.ORIGMSGID.TYPE contains a value that indicates the source of the message. Valid values are ROC, indicating an ROC message, or MAIOC, indicating an IBM multiple-access interface operator control (MAI-OC) message.
Message Profile Variables PPO Information PPO Information Primary program operator (PPO) information variables contain PPO information about the message. &$xxx.PPOCNTL &$xxx.PPOCNTL.CONTROL &$xxx.PPOCNTL.CONTROL.FLAGS &$xxx.PPOCNTL.CONTROL.MULTICORRELATOR &$xxx.PPOCNTL.CONTROL.MULTISEQUENCE &$xxx.PPOCNTL.CONTROL.RCVCMDPREFIX &$xxx.PPOCNTL.CONTROL.SOURCE &$xxx.PPOCNTL.CONTROL.SUPPRESSLEVEL &$xxx.PPOCNTL.VTAMNUM &$xxx.PPOCNTL contains information on a PPO message. &$xxx.PPOCNTL.
Message Profile Variables PPO Information Table 7-3. PPOCNTL.Control.Flags (Page 2 of 2) Byte Position 14 15 16 17 18 19-20 21 22 23-29 30 31 Flag Interpretation ALERT Reserved. DELIVER PPO DELIVER LOCAL DELIVER REMOTE Reserved. GENERIC LINK GENERIC DOMAIN Reserved. RESOURCE FOUND UNDELIVERABLE Generated by PPO ALERT. Reserved. Message eligible for delivery to PPO. Message eligible for local delivery. Message eligible for remote delivery. Reserved. Generated by PPOALERT LINK=*.
Message Profile Variables Resource Information Resource Information Resource information variables contain information about the resource that supplied the message (if any). &$xxx.RESOURCE &$xxx.RESOURCE.PRIMARY &$xxx.RESOURCE.SECONDARY &$xxx.RESOURCE contains the details of the resource that leads to the message. &$xxx.RESOURCE.PRIMARY contains the primary name of the resource. &$xxx.RESOURCE.SECONDARY contains the secondary name of the resource. This field is optional and can occur more than once.
Message Profile Variables Source Information Source Information Source information variables contain information about the source of the message. &$xxx.SOURCE &$xxx.SOURCE.BKGENV &$xxx.SOURCE.EVENTPROFILE &$xxx.SOURCE.LAST &$xxx.SOURCE.LAST.DOMAIN &$xxx.SOURCE.LAST.NETNAME &$xxx.SOURCE.LAST.SSCP &$xxx.SOURCE.NCLID &$xxx.SOURCE.ORIG &$xxx.SOURCE.ORIG.DOMAIN &$xxx.SOURCE.ORIG.NETNAME &$xxx.SOURCE.ORIG.SSCP &$xxx.SOURCE.REGION &$xxx.SOURCE.SERVERNAME &$xxx.SOURCE.TIME &$xxx.SOURCE.USER &$xxx.
Message Profile Variables Source Information &$xxx.SOURCE.LAST.DOMAIN contains the domain ID of the last NonStop NET/MASTER MS system or SOLVE management services system that handled this message. Unless the message originated in a remote system and was then routed to another system, the value of this variable will be the same as the originating system. &$xxx.SOURCE.LAST.NETNAME contains the network name of the last NonStop NET/MASTER MS or SOLVE management services system that handled this message.
Message Profile Variables Source Information &$xxx.SOURCE.ORIG.SSCP contains the SSCP name of the SOLVE management services system that originated this message. This field is not present for NonStop NET/MASTER MS systems. &$xxx.SOURCE.REGION contains the terminal name of the message originator. &$xxx.SOURCE.SERVERNAME this field is not used by NonStop NET/MASTER MS systems. &$xxx.SOURCE.TIME contains the time the message was generated. The time format is yyyy-mm-dd˚hh:mm:ss.ddd.
Message Profile Variables SPI Information SPI Information Contains SPI information messages. This variable can be repeated. &$xxx.SPI &$xxx.SPI.owner.token &$xxx.SPI{2}.TANDEM.ZEMS_TKN_PASSVAL &$xxx.SPI contains the elements from EMS. &$xxx.SPI.owner.token contains translated SPI tokens for one subsystem owner (for example, Tandem). The token can be repeated for different owners. &$xxx.SPI{2}.TANDEM.
8 Compiler Operation This section discusses how NCL source code is compiled. It includes the following topics: The compilation process Lexical elements of NCL Statement analysis Compiler directives For help in understanding syntax notation, see “Notation Conventions” at the beginning of this manual.
Compiler Operation Lexical Elements of NCL Lexical elements are made up of alphanumeric and some nonalphanumeric characters. Each type of lexical element has its own subset of legal (acceptable) characters. Compilation Errors Compilation errors are errors detected during the analysis of lexical elements. There are two types of compilation errors: a fatal error causes the compilation of an NCL procedure to stop immediately; other (non-fatal) errors do not stop compilation.
Compiler Operation Lexical Elements of NCL Rules for Delimiting Lexical Elements If the compiler finds an illegal character, it regards the lexical element as all characters up to, but not including, the illegal character. The compiler uses the illegal character to delimit the lexical element and treats the character that follows a delimiter as the first character of the next lexical element. It uses this character to work out the lexical element type (described later in this section).
Compiler Operation Lexical Elements of NCL Symbols A symbol is a lexical element that consists of one or more of the characters in Table 8-3. The compiler delimits the symbol by a blank, by a character that is illegal for the symbol type, or by the end of the line. A symbol can be an unquoted string, a keyword, or a number. Table 8-3. Symbol Characters Character Name of Character Restrictions A-Z a-z 0-9 .
Compiler Operation Lexical Elements of NCL Symbols are not variables. The value of a symbol is the symbol itself, whereas the value of a variable can change. Uppercase alphabetic characters in the symbol remain as uppercase characters. Lowercase characters are not converted to uppercase except when the language requires it: for example, when the letters represent a label. Symbols include numbers as a subset.
Compiler Operation Lexical Elements of NCL A quoted string always has a constant value, corresponding to the sequence of characters within the quotes. The maximum length of a quoted string is 2000 characters. A quoted string can include any character within the quotes, although to aid readability or portability, it is recommended that you do not use unprintable characters, such as control characters.
Compiler Operation Lexical Elements of NCL Some examples of hexadecimal strings are: What You Type Resultant String Contents '313233343536'x '4a 4b 4c 4d'X '4A4B4C4D'x 123456 JKLM JKLM In the following example, “313233343536” is a hexadecimal string because the plus sign (+) is a lexical element delimiter, delimiting the lexical element “313233343536”X from the symbol 123: "313233343536"X+123 This is the same as 123456+123.
Compiler Operation Lexical Elements of NCL Single quotes are used in the previous example to show that NCL will accept either, provided that the same type of quote character is used on either side of the quoted string. Special Characters A character is considered as a special character when it acts as a delimiter in a statement. Such a special character becomes simply another character when used within a quoted string. Table 8-4 lists special characters. Table 8-4.
Compiler Operation Lexical Elements of NCL Some examples of using parentheses are shown next: Example Use of Parentheses &z = &a * (&b + &c) &z=(&a*(&d**2)*&b)+&c &z=(&a||&b)(&c,xyz) Alters the order of evaluation in an expression. Delimits terms in an expression to clarify the code. Delimits an expression that resolves to the name of a local or external function. Delimits parameters in a procedure call. Delimits parameters in a function call. Delimits items in a list. Delimits a keyword in a statement.
Compiler Operation Statement Analysis Labels A label that begins a statement is made up of two lexical elements: a symbol or a quoted string (excluding a hexadecimal or binary string), followed by a colon (:). Here are some examples of valid labels: this_is_a_label: "this_is_a_label": 123456: "123456": LABEL_1: label_17: ABC1$: POSITION_1: LABEL1:LABEL2:LABEL3: The following table shows some examples of invalid labels: Invalid Label Reason label(1): A symbol cannot contain parentheses.
Compiler Operation Statement Analysis The compiler ignores the null statement (a semicolon by itself). You can use the NOP statement as an explicit do-nothing statement. Certain statements allow or assume a semicolon before and/or after certain keywords. For example, the IF core statement assumes a semicolon before and after its keywords THEN and ELSE. This means that these statements can cross lines at certain points without needing a comma to indicate statement continuation.
Compiler Operation Compiler Directives Compiler Directives A compiler directive is an NCL statement used to control the compiler during the compilation of an NCL procedure. Compiler directives begin with two percent signs (%%). A compiler directive must be the only statement on an NCL source line, and it cannot continue to another line. Here is the general syntax of a compiler directive: %%directive Table 8-5 summarizes the compiler directives.
Compiler Operation Compiler Directives text can contain any characters, including illegal characters, since the compiler does not analyze them. During compilation, NCL reports a fatal compilation error if symbol has already been used in a define directive, and compilation stops immediately.
Compiler Operation Compiler Directives Compilation does not stop, but NCL reports a run-time error during execution when it attempts to execute the statement containing the unrecognized verb or unknown system variable. Execution stops (unless the error is trapped by an error handler). If you are performing a test compilation, NCL reports a warning if it detects an unrecognized verb or unknown system variable. See the NODEFER option for the location where this warning is displayed.
9 Variables This section describes variables. It includes the following topics: An overview of variables The syntax rules for naming variables Variable name-substitution rules Variables by function Assigning values to variables by using the assignment statement For help in understanding syntax notation, see “Notation Conventions” at the beginning of this manual. Note An Overview of Variables This section does not discuss mapped data object (MDO) variables in detail.
Variables Variable Name Syntax The compiler delimits a variable by using a blank, a character that does not fall within this set, or a mismatched closing parenthesis. For an opening parenthesis to be present as part of a variable name, it must be preceded by an ampersand (&). The following example shows a variable that is delimited by a mismatched parenthesis: &a = (&b + &c) * &d The closing parenthesis after &c is not part of the variable name; it terminates the parenthesized expression.
Variables Variable Name Syntax Alphabetic characters in a simple variable name are case-insensitive. The following simple variable names are synonymous: &simple_variable &SIMPLE_VARIABLE &SiMpLe_VaRiAbLe Simple variables restrict the characters they allow in certain positions. If the first character after the ampersand is a digit, the remainder of the variable name must be digits.
Variables Variable Name Syntax If you refer to a simple variable that has not been assigned a value, NCL returns a null value denoted by a pair of empty quotation marks (“”). Complex Variables A complex variable is a variable that contains more than one ampersand. Complex variables provide the ability to indirectly access data. The term “complex” is used to describe variables whose names are not known directly. The names must be obtained by looking up other variables.
Variables Variable Name Syntax A suffix must start with a nonnumeric character and serves as a delimiter for a variable name that is numeric. Restrictions (Rules) for Using Complex Variables The restrictions that complex variables place on the characters they allow in certain positions are expressed in the following general rules: The first simple variable name cannot be numeric; that is, it cannot start with a digit. It does not have a suffix.
Variables Variable Name Syntax Some examples of invalid complex variables are: Stem Variables Invalid Complex Variable Reason &123&456a &1ab&c &a46&99&B The first simple-name segment is numeric. The first simple-name segment begins with a digit. The segment 99 is numeric. A stem variable is a simple or complex variable that is terminated by a period (.). The general form of a stem variable is the following: &stem. stem is either a simple or complex variable.
Variables Variable Name Syntax Compound Variables A compound variable is a variable that begins with a stem variable and contains segments or substems between periods (.). The general form of a compound variable is the following: &stem.substem[.[ substem ] ] … substem is one of: [ prefix ][ curly-spec ] [ prefix ]&variable stem is either a simple or complex variable.
Variables Variable Name Syntax The following are examples of compound variables (assume, in these examples, that &I = 1 and &J = 2): Example Comment &A.1.5 &A.&I.&J A simple compound variable reference; no substitution is required. A simple compound variable reference; after substitution, the name is &A.1.2. A simple compound variable reference; after substitution, the name is &A.1.5. A complex compound variable reference. &A.&I.5 &&X.&ABC&3.
Variables Variable Name Syntax In a complex variable name, a nested variable reference can be followed by a suffix unless the nested variable reference is the first part of the complex name. This rule is identical to the one for numeric names in a complex variable.
Variables Variable Name Substitution Some examples of nested variables are: Example Comment &(A) &(&A) &X.&(name).&number &GLBL.&(SYS.USER.ID).XYZ This is the same as &A. This is similar to &&A. A nested compound variable reference. A nested system variable. Variable Name This subsection discusses how a variable name is constructed when parts of it are Substitution unknown. It begins by distinguishing between variable name substitution and the process of determining the value of a variable.
Variables Variable Name Substitution Simple Variable Substitution Complex Variable Substitution There is no substitution required to reference a simple variable name. Complex variable name substitution proceeds from right to left, as shown in the following steps: 1. The final segment is analyzed from right to left: a. If this segment has a trailing specification in braces ({ }), it is processed according to the rules in “Substitution With Braces,” described later in this section. b.
Variables Variable Name Substitution 2) The content of the substitution buffer is validated as a valid simple variable name and is converted to uppercase. b. If this segment is empty, the content of the substitution buffer is validated as a valid simple variable name and converted to uppercase. Note The substitution buffer holds the variable name being constructed during substitution processing. Note also that NCL uppercases all user-specified variable names during compilation.
Variables Variable Name Substitution Stem Variable Substitution If a stem variable is referred to through a simple variable name, no substitution is required. If a stem variable is referred to through a complex variable name, the period (.) is placed into the substitution buffer and the rest of the variable is processed according to the substitution rules described in “Complex Variable Substitution.
Variables Variable Name Substitution This means that the resulting value of any substem, after substitution processing, can be any arbitrary data. Note The substitution buffer holds the variable name being constructed during substitution processing. Note also that NCL changes all user-specified variable names to uppercase during compilation. The following table illustrates the mechanics of compound variable substitution on the example variable &X.&Y.&A&&B&1C&2D.Z.
Variables Variable Name Substitution The name length of any substem generated at any step cannot exceed 250 characters. The final length of the compound variable name after all processing cannot exceed 250 characters (excluding the initial variable designator). After substitution, the entire compound variable name is looked up in the following way: Nested Variable Substitution 1. If an exact match is found, the value is returned. 2. If an exact name is not found, only the stem is looked up.
Variables Variables Classified By Function Variables Classified by This subsection discusses variables from the perspective of the function they perform. Function It includes the following topics: System variables Global variables User variables Parameters System Variables System variables provide access to NonStop NET/MASTER MS system-related information. All system variables are individually listed and defined in Section 5, “System Variables.” A system variable begins with the reserved SYS. stem.
Variables Variables Classified By Function The following example assigns a value to the &SYS.RETCODE system variable: &SYS.RETCODE = 55 Global Variables A global variable begins with GLBL. Global variables are stored in global memory and are visible throughout NonStop NET/MASTER MS. They can be accessed by any NCL process and used for communication between NCL processes. Any type of variable can be a global variable because any type of variable can begin with GLBL.
Variables Assigning Values to Variables Parameters are positional. If passed, &1 is the first parameter created to hold the first parameter passed to an NCL procedure when it is called, &2 is second, &3 is third, and so on. This means that parameters must be passed to an NCL procedure in the order in which the procedure expects to receive them. A parameter count is kept in the system variable &SYS.PARMCNT.
10 Expressions and Operators This section discusses expressions and operators. It includes the following topics: An overview of expressions and operators The precedence of operators Using parentheses in expressions Arithmetic operators and expressions Relational operators and expressions Boolean operators and expressions Concatenation operators and expressions For help in understanding syntax notation, see “Notation Conventions” at the beginning of this manual.
Expressions and Operators An Overview of Expressions The following table lists examples of terms: Using Expressions in Statements Term Type of Term Department "SYDNEY" &ABC &X&Z &TEST. &total.
Expressions and Operators An Overview of Expressions The keywords of some verbs restrict how expressions can be used. For example, if you want to include an expression in a VARS list or a FIELDS list (used with the VARTABLE verb), you must enclose the expression in parentheses.
Expressions and Operators An Overview of Expressions During expression evaluation, all arguments and intermediate results can be thought of as being stored as character strings. Operators that require numeric operands convert the operands to numbers. This is discussed later in this section in “Automatic Type Conversion.” Expressions are evaluated according to the order of precedence of operators. The precedence of operators is listed in “Precedence of Operators,” later in this section.
Expressions and Operators An Overview of Expressions Type Conversion and Relational Operators Simple relational operators attempt to convert operands to numbers. They perform a numeric comparison (or, if one of the operands is not a number, a character comparison) and return a Boolean result (either 1 or 0). The result can be used as either a string or a number. Strict relational operators compare operands as strings and return a Boolean result (either 1 or 0).
Expressions and Operators Precedence of Operators Precedence of NCL evaluates expressions from left to right. It evaluates operators in expressions Operators according to their position and precedence. Operators that have the same precedence are evaluated from left to right. Operators with a higher precedence are evaluated before operators with a lower precedence. You can use parentheses to alter the standard order of operation.
Expressions and Operators Precedence of Operators Table 10-1.
Expressions and Operators Arithmetic Operators and Expressions Arithmetic Operators This subsection describes arithmetic operators and arithmetic expressions. and Expressions Arithmetic Operators Arithmetic operators specify an arithmetic operation on one or more terms in an expression. Table 10-2 lists arithmetic operators in order of precedence. Operators with the same level of precedence are grouped together. Table 10-2.
Expressions and Operators Arithmetic Operators and Expressions Unary Minus Operator (-) The unary minus operator (-) inverts the value of the numeric term to which it is adjacent; that is, a positive value is changed to a negative value, and a negative value is changed to a positive value. The term must represent a valid number. The unary minus operator forces a term to be numerically interpreted. The general syntax for using the unary minus operator is: -term term specifies a term in an expression.
Expressions and Operators Arithmetic Operators and Expressions Multiplication Operator (*) The multiplication operator (*) multiplies the left term of an expression by the right term. The terms must represent valid numbers. The general syntax for using the multiplication operator is: term * term term specifies a term in an expression. Terms are defined at the beginning of this section under “The Composition of Expressions.
Expressions and Operators Arithmetic Operators and Expressions Integer Division Operator (//) The integer division operator (//) divides the left term of an expression by the right term. The terms must represent valid numbers. The result is truncated to an integer. The general syntax for using the integer division operator is: term // term term specifies a term in an expression. Terms are defined at the beginning of this section under “The Composition of Expressions.
Expressions and Operators Arithmetic Operators and Expressions Addition Operator (+) The addition operator (+) adds the left term of an expression to the right term. Both terms must represent valid numbers. The general syntax for using the addition operator is: term + term term specifies a term in an expression. Terms are defined at the beginning of this section under “The Composition of Expressions.
Expressions and Operators Arithmetic Operators and Expressions NCL supports numbers to 15 decimal digits of precision. NCL supports a range of 1e-50 through 1e+50. This is within the range supported by the operating system of 8.63616855509445e-78 (the absolute value of the smallest representable number) through 1.15792089237161e77 (the absolute value of the largest representable number). Some examples of arithmetic expressions are: Expression Operation Result 1 + 2 Addition 3 497021 - 7832 0.08 + 76.
Expressions and Operators Relational Operators and Expressions Overflow and Underflow An overflow error occurs if the size of a number is too large to be represented: that is, outside ±1.15792089237161e77. An underflow error occurs if the size of a number is too close to 0 (zero) to be represented: that is, inside ±8.63616855509445e-78. You can use the ON statement with either the general ERROR handler or the specific ARITH_ERROR handler to trap overflow and underflow errors.
Expressions and Operators Relational Operators and Expressions Strict Relational Operators Strict relational operators compare the two terms as they are. No stripping or padding is done, and the terms are always compared as character strings. If the two terms are equal up to the shorter length, the longer term is regarded as greater than the shorter term, and the appropriate truth value returned.
Expressions and Operators Boolean Operators and Expressions Some examples of relational expressions are: What You Type Comment IF &a = &b THEN … SELECT; WHEN &a = 1 THEN … Expression in an IF statement Expression in a WHEN clause in the SELECT statement You can compare expressions with relational operators in an IF, DO WHILE, or DO UNTIL statement. Boolean Operators and Expressions Boolean Operators This subsection describes Boolean operators and Boolean expressions.
Expressions and Operators Concatenation Operator and Expressions In the case of OR, if a term equates to a true state, the OR operation stops and does not evaluate further terms; the result is true. If all terms equate to a false state, the OR operation returns a result of false. All terms connected by XOR are evaluated. The XOR operation returns a true value if only one of the terms is true.
Expressions and Operators Concatenation Operator and Expressions Some examples are listed in the following table: What You Type Result of Concatenation Processing a b a b c a || b a || b 1234 567 1234 || 567 1234 || 567 12344+1 || 567 12344+1 567 a b a b c ab ab 1234 567 1234567 1234567 12345567 12345 567 Note the preceding final two examples. The plus sign (+) in each case means that the compiler treats the two terms 12344 and 1 as numbers, the result of addition being 12345.
Expressions and Operators Concatenation Operator and Expressions Blanks adjacent to the inside of a parenthesis are not regarded as a blank operator and are deleted, as the following examples illustrate. However, blanks adjacent to the outside of a parenthesis are significant, and can form a blank operator if they are not adjacent to some other blank-removing lexical element.
Expressions and Operators Concatenation Operator and Expressions It is important to remember that when the lexical element next to the current lexical element is a reserved word, neither the blank nor abuttal operators apply, and that the individual characters of the operators act as lexical element delimiters.
11 Verb Syntax and Variable Access Methods This section covers general verb syntax and how to use verbs to access variables.
Verb Syntax and Variable Access Methods The Components of a Verb The following examples illustrate the variation in syntax—in particular, the inclusion or omission of the equal sign between a keyword and a qualifier: ASSIGN VARS=&A* GENERIC CMDLINE Hi _there DELAY 5 FILE CLOSE ID ALL FILE DEL FILE GET OPT=KLT MDO=&MSG.
Verb Syntax and Variable Access Methods The Components of a Verb Optional Equal Sign (=) The equal sign (=) is optional.
Verb Syntax and Variable Access Methods The Components of a Verb Here are some examples in which the qualifier can be a variable or an expression: Mutually Exclusive Operands What You Type Comment INTREAD TYPE=&TYPE INTCONT INTENS=&INTENS WRITE NRD=&NRD DATA=Hi The value of &TYPE must be REQ, RESP, or ANY. The value of &INTENS must be HIGH or LOW. The value of &NRD must be YES, NO, or OPER. You can specify two mutually exclusive operands in a verb using expressions.
Verb Syntax and Variable Access Methods Keywords With a Qualifier Relative Order of Operands Operands That Must Be First Some operands must precede other operands in some verbs. Here are some examples: What You Type Meaning ASSIGN OPT=MAPNAME ARGS FROM MDO=&Z. VARTABLE RESET ID=MYTABLE WRITE TERM=YES DATA=Hi there OPT must precede FROM. RESET must precede ID. DATA must be last. Some verbs require that certain operands are first. They must immediately follow the verb name.
Verb Syntax and Variable Access Methods Keywords With a Qualifier NCL terminates the text or number at the next reserved word or at the end of the statement. In contrast to the rest of the statement, the text or the number does not have to be the last part of the verb. Two common keywords in verbs that introduce text are DATA and TEXT. Here are some examples: What You Type Comment LOCK PNAME=MYFILE TEXT='PNAME=MYFILE' PAUSE DATA=HELLO Qualifier of TEXT is text. Qualifier of DATA is text.
Verb Syntax and Variable Access Methods Keywords With a Qualifier The following examples illustrate choices from a selection list: What You Type Comment FILE OPEN ID ABC FORMAT=MAPPED FILE OPEN ID ABC FORMAT=DELIMITED MAPPED qualifier from the selection list. DELIMITED qualifier from the selection list. UNMAPPED qualifier from the selection list. &ABC must contain MAPPED, DELIMITED, or UNMAPPED. REQ qualifier from the selection list. RESP qualifier from the selection list.
Verb Syntax and Variable Access Methods Keywords With a Qualifier Variable Specification Many verbs can contain variable specifications. If the qualifier to a keyword can be a variable, it can be referred to by any type of variable name: simple, complex, stem, compound, or nested. The single exception to this is a variable specification after the MDO keyword in which the variable must be a stem or compound variable.
Verb Syntax and Variable Access Methods Keywords With a Qualifier Two types of lists that contain only two items are: Range lists. This type of list is used by many verbs as part of a ranged variable specification in a VARS list. It is introduced with the RANGE keyword. It has a start value (the beginning of the range) and an end value (the end of the range). Range lists are discussed later in this section in “Variable Lists Beginning With VARS.” Option lists. This type of list is used by the PARSE verb.
Verb Syntax and Variable Access Methods Variable Lists Beginning With VARS Variable Lists This subsection discusses variable lists beginning with the VARS keyword, hereafter Beginning With VARS called VARS lists. Many verbs use VARS lists. They are used with verbs that insert information into or extract information from variables. VARS lists allow you to specify how you want variables to be generated by the verb and how you want data to be stored in the variables in the list.
Verb Syntax and Variable Access Methods Variable Lists Beginning With VARS Some examples of verbs that use VARS lists are: ASSIGN, DROP, EMSREAD, FILE ADD, FILE GET, FILE PUT, FILE PUTGET, INTREAD, LOGREAD, MSGREAD, PARSE, PAUSE, SECCALL, and VARTABLE. The following discussions have many examples of VARS lists. Specifying a Range of Variables You can specify a range of variables in a VARS list.
Verb Syntax and Variable Access Methods Variable Lists Beginning With VARS How a Variable Name is Constructed The variable specification in ranged-variable-specification can be of any variable type: simple, complex, stem, compound, or nested. If the variable specification contains more than a single ampersand, NCL uses variable substitution to determine the final form of the name before adding numeric suffixes.
Verb Syntax and Variable Access Methods Variable Lists Beginning With VARS You use the CONTROL RNGLIM and CONTROL NORNGLIM verbs to set the maximum number of variables that can be in a range. The range is the difference between the end value and the start value plus one. CONTROL RNGLIM sets the maximum number of variables that can be generated in a range by any simple range specification to 64.
Verb Syntax and Variable Access Methods Variable Lists Beginning With VARS Only Second Range Specified The following ranged-variable-specification specifies only the second range: &[ variable ] * and RANGE ( start2, end2 ) In this case, NCL generates or targets variable names that satisfy the second range. Here are some examples: What You Type Comment DROP VARS &* RANGE=(5,6) DROP VARS=&A* RANGE=(10,15) Deletes &5 and &6. Deletes &A10 through &A15.
Verb Syntax and Variable Access Methods Variable Lists Beginning With VARS There can be spaces between the variable specification and the opening parenthesis. You cannot follow the variable specification with an asterisk (*) when you follow it by (length). The value of length can be a constant or an expression. Constants must be integers in the range 1 through 32000. Expressions must resolve to integers in this range. Here are some examples. (These examples assume PARSE=YES.
Verb Syntax and Variable Access Methods Variable Lists Beginning With VARS Skipping Characters Note Specifying Variables Using an Expression In the previous discussion on skipping words, the default for the PARSE option for the NCL verbs EMSREAD, INTREAD, LOGREAD, and MSGREAD is YES. Character skipping can be performed if you use the PARSE=NO option in the preceding verbs.
Verb Syntax and Variable Access Methods Variable Lists Beginning With VARS Here is an example of a function that generates a list of names that can be used as part of a VARS list. … MSGREAD VARS=(GET_NAMES()) … GET_NAMES: FUNCTION /* This function generates a list of symbols that are put /* in the VARS list.
Verb Syntax and Variable Access Methods Specifying a Range of Variables Using ARGS Some examples of verbs that permit generic variable specifications are: ASSIGN and DROP. Here are some examples: ASSIGN VARS &* GENERIC ASSIGN VARS=&A * GENERIC FROM VARS=&B* DROP VARS &TOTAL.* GENERIC DROP VARS &GLBL* GENERIC Note the difference between a generic variable specification and a ranged variable specification. The syntax of the variable specification is the same in both cases.
Verb Syntax and Variable Access Methods Multiple Variable Assignment Using ASSIGN Multiple Variable This subsection discusses how to use the ASSIGN verb. The main purpose of ASSIGN Assignment Using is to allow you to manipulate multiple variables in a single operation. ASSIGN There are four forms of the ASSIGN verb, distinguished by the qualifier that follows the OPT keyword. This subsection discusses the default form of ASSIGN, in which OPT=VALUE.
Verb Syntax and Variable Access Methods Multiple Variable Assignment Using ASSIGN ASSIGN ARGS DATA="Constant value" The results are: &1 = “Constant value” … &64 = “Constant value” If you omit both the DATA and FROM keywords, no source data is provided on the DATA keyword, or no source data exists; the target variables are then assigned a null value.
Verb Syntax and Variable Access Methods Multiple Variable Assignment Using ASSIGN You can assign values that depend on the values of variable start and end values. Here is an example in which the values of the source, target start, and end values are variables. In this example, &A20 through &A99 are assigned null values, and CONTROL NORNGLIM is in effect to accommodate the number of variables in the range.
Verb Syntax and Variable Access Methods Multiple Variable Assignment Using ASSIGN Assigning Values Using Prefixes and Suffixes There are four keywords that rely on matching and not matching variable prefixes and suffixes to update a set of target variables.
Verb Syntax and Variable Access Methods Multiple Variable Assignment Using ASSIGN Using GENERIC The GENERIC keyword deletes all target variables that begin with the specified prefix. It creates a new set of target variables from the source variables. It assigns the new set of target variables the values of the source variables. This effectively updates target variables that previously matched source variables.
Verb Syntax and Variable Access Methods Multiple Variable Assignment Using ASSIGN Using MERGE The MERGE keyword does not affect target variables, whether they match source variables or not. It creates a variable if there are no target variables with a suffix that matches that of a source variable. This is the opposite operation to that performed by the BYNAME keyword.
Verb Syntax and Variable Access Methods Using PARSE and SEGMENT Deleting Variables You can use the DROP verb to delete multiple variables. The target variables that Using DROP DROP deletes are specified by the VARS, ARGS, RANGE, and GENERIC keywords discussed earlier in this section. You can use DROP to delete any variables with panel attributes set, as well as MDO variables. DROP does not simply assign a null value to variables.
Verb Syntax and Variable Access Methods Using PARSE and SEGMENT The PARSE keyword is also used by the PARSE verb for the same reason: to specify whether to delimit a message by words or by bytes. The PARSE verb is discussed later in this section in “Using the PARSE Verb.” Using the SEGMENT Keyword The SEGMENT keyword is used by verbs that read messages such as EMSREAD, INTREAD, LOGREAD, and MSGREAD.
Verb Syntax and Variable Access Methods Using PARSE and SEGMENT Using SEGMENT to parse a string of data is an alternative to providing explicit length variable specifications as part of a VARS list.
Verb Syntax and Variable Access Methods Using PARSE and SEGMENT PARSE VARS=&A* PARSE=NO SEGMENT=1 DATA="Some - text." The results are: &A1 = S &A2 = o &A3 = m &A4 = e &A5 = space &A6 = &A7 = space &A8 = t &A9 = e &A10 = x &A11 = t &A12 = . Specifying the Text to Delimit You use the PARSE verb with the DATA keyword to specify the text to delimit. This keyword must be the last because the text is treated as the rest of the statement.
Verb Syntax and Variable Access Methods Using PARSE and SEGMENT PARSE DELIM=":,-" ARGS DATA="AAA:BBB,$DDD*EEE-FFF;" The results are: &1 = AAA &2 = BBB &3 = $DDD*EEE &4 = FFF; Keeping a Remainder You can use the PARSE verb with the REMSTR keyword to specify a variable to hold any text unassigned to a variable after parsing.
Verb Syntax and Variable Access Methods Using PARSE and SEGMENT OPT=NONULLS specifies the action to take if two consecutive delimiters are found within a string. When two consecutive delimiters occur in the string, there is an implied null section; that is, there is a section of zero length between the delimiters. If you omit OPT=NONULLS, a null variable is created. If you specify NONULLS, then the zero length section is ignored, and no null variable is created.
Glossary This glossary defines NonStop NET/MASTER and Tandem system terms and abbreviations used in this manual. %INCLUDE rule. An RMS message action rule that allows a message handler to use rules from more than one ruleset. %START rule. An RMS message action rule that instructs a message handler to perform user-defined initialization actions on startup. => prompt. Any prompt that ends with =>: for example, Command ===>, M=>, and Select Option ===>. absolute time.
Glossary attribute byte. The data that defines the display attributes of a field on a screen. The attribute byte is displayed as a blank on the screen. It is represented by a field character in a panel description file. authority level. A number assigned to users, NonStop NET/MASTER MS commands, and NonStop NET/MASTER MS operands that signifies the authority to execute a command or operand. Authority levels range from 0 (lowest) through 255 (highest). autohold.
Glossary BIU. See basic information unit. BK process. See background services process. blank concatenation operation. An operation that replaces multiple blanks between two terms in an expression by a single blank. block. A logical group of statements. Blocks are bounded by core statements such as PROCEDURE and END, FUNCTION and END, DO and END, and SELECT and END. BLOG. See Background Logger. BMON. See Background Monitor. Boolean.
Glossary COBOL85. The Tandem compiler and run-time support for the American National Standard Programming Language COBOL, X.3.23-1985. The code for most Pathway server processes is written using COBOL85. Command Entry facility. The NonStop NET/MASTER MS facility used as an alternative to OCS for entering commands. See also Operator Control Services. Command prompt. Command ===>. You enter commands at a Command prompt. Command Server Process.
Glossary communications network management (CNM). An IBM architecture that describes the structure of messages traveling to and from SNA devices. compilation. The process of creating object code from a source file of NCL statements. compilation error. An error in an NCL procedure detected during compilation (before execution). There are three types of compilation errors: from least to most severe these are warnings, errors, and fatal errors. See also error, fatal error, run-time error, and warning.
Glossary correlation key. An RMS key that restricts the use of a rule feature to messages with the same key. One example of a key is a text string containing variables. CPU weight. The relative availability of a CPU for the creation of dynamic processes. cultural indicator. An indicator that identifies the culture of command help information. culture.
Glossary DDL data dictionary. A database consisting of prenamed and predefined files created by the DDL compiler or Pathmaker. deadly embrace. A situation in which a resource required by one NCL process is indefinitely locked by another NCL process. debug. To locate and correct errors in an NCL process. decompilation. The process of creating NCL statements from object code. Decompilation occurs during the debugging of an NCL process, when using the DEBUG commands. dedicated terminal.
Glossary delimited UDB. A user database in which each field in a record is separated from the next field by hexadecimal ‘FF’ (called a field separator). dependent processing environment. A processing environment controlled and owned by an NCL process. The output from this environment goes to the NCL process. dependent queue. A queue owned by the NCL process that is controlling the associated dependent processing environment: either a request queue or a response queue. dependent request queue.
Glossary DO loop. A group of NCL statements enclosed by matching DO and END core statements that can be executed more than once. DOM ID. See delete operator message (DOM) ID. domain. A logical division within a network. domain ID. A character string of one through four characters used to identify a domain. A domain ID is the first part of a DOM ID. DSM. See Distributed Systems Management. DSNM. See Distributed Systems Network Management. dynamic preparsing.
Glossary EMS event distributor. An EMS process that distributes event messages from event logs to requesting management applications, to a collector on another node, or to printers, devices, or files. EMS message. A message generated internally by EMSPROC and identified by the letter E when displayed on an OCS window. EMS message prefix. The identifier that can precede a message from the EMS subsystem when it is displayed on an OCS window.
Glossary error. A condition that causes the execution of a NonStop NET/MASTER MS command, the compilation of an NCL procedure, or the execution of an NCL process to fail (a run-time error). In NCL, a condition caused during compilation that would cause run-time errors if the NCL procedure were executed. A message that begins with ERROR is displayed. Compilation continues but no object is produced. See also compilation error, fatal error, run-time error, and warning. error attribute.
Glossary explicit execution. A method of executing an NCL procedure by using an explicit EXEC or START command, or the START verb. export. To transfer command help information from the command help database to a command help edit file. See also import. expression. In an NCL procedure, one or more terms connected by operators. extended basic mode. The NonStop NET/MASTER MS operating mode in which at least one static or dynamic NC process is present and a mix of other application processes is present.
Glossary freeze. The act of inactivating RMS rules for a subject. When you freeze a subject, messages containing that subject cannot trigger any rules. full NRD message. A NRD message, held in the NRD message central queue, that must be deleted using its DOM ID. full-screen mode. A presentation mode in which a window consists entirely of a panel. function. A sequence of statements, called by name from an expression, that performs a task and returns a result to be used in further expression evaluation.
Glossary group user ID. A user ID definition record, used as the default template for groups of individual users. Guardian user ID (GUID). The two-part Tandem ID, consisting of a group ID and a user ID, that defines a user to the Guardian environment. GUID. See Guardian user ID. header. The first part of a map or an element. It contains information about the whole map or element. Help Maintenance.
Glossary indentation value. The number of columns used to indent the overrun lines of messages that are longer than the current width of an OCS window. INIT. The NCL procedure that is executed by the NonStop NET/MASTER MS control process (NCP) during system initialization. initial value. The value in a field when the field is first displayed. INMC. See Inter-NET/MASTER Connection. inner block. A block of statements enclosed by a block of statements. input field. A field in a panel that can accept input.
Glossary internal validation rules. Options specified in the #FLD panel control statement that determine how input is validated by Panel Services before it is passed to an NCL process. interpreter. The NonStop NET/MASTER MS entity that interprets an object and executes its opcodes. IS process. See inter-system services process. ISR. See Inter-System Routing. iterative. Repetitive. Normally refers to a DO loop. key.
Glossary link definition. An INMC record, retained in global memory, that defines the characteristics, and registers the hierarchical relationship of its three components: a link definition record, a session definition record, and a unit definition record. link definition record. A record, created by the LINK DEFINE command, that names and establishes the characteristics of an INMC link. LINKMON process.
Glossary manager. A process to which command messages for associated subjects are routed. In event messages, the managers make subjects of the same name unique. The ZEMS-TKN-MANAGER token contains the manager. map. A set of definitions used by Mapping Services that together describe the entire structure of some item of data. map definition record. A record in the NonStop NET/MASTER MS map file that describes the structure of a map. map file.
Glossary message ID. An ID that uniquely identifies a message. It is typically the first word of a message. message number. A number that uniquely identifies a message. It has two parts: the characters NNM and a unique number that can be used to refer to the message. message profile variable. A mapped data object variable that Mapping Services can understand using the map $MSG. message queue. A queue that holds roll-delete messages destined for an OCS window. message recognition element.
Glossary monitor-class message. A message that has the monitor-class attribute. Monitor-class messages are sent to monitor-class users. A monitor-class message is identified by the letter E, L, or M when it is displayed in an OCS window. monitor-class user. A user who is entitled to receive monitor-class messages. MS process. See multi-user services process. MSGPROC. A system-level NCL procedure that intercepts and processes messages destined for an OCS window. multi-user services (MS) process.
Glossary nested variable. A variable that begins with an ampersand and an opening parenthesis, and terminates with a closing parenthesis (&, (, and ), respectively). NET/MASTER. See SOLVE management services. Network Control Language (NCL). A structured, high-level, compiled language supplied with NonStop NET/MASTER MS and integrated with other NonStop NET/MASTER MS services. It is used to develop NCL procedures. Network Management Vector Transport (NMVT).
Glossary NRD message with the OPER attribute. A NRD message that is not held in the NRD message central queue, and must be deleted using NRD cursor deletion. When deleted, the message immediately disappears from the NRD message display area. null. No value. In NCL, assigning a variable a null value does not delete the variable name from memory. number. In NCL, a number is a symbol that begins with a digit (0 through 9) or a period and is in a context that permits it to be a number (rather than a string).
Glossary operating mode. The mode in which NonStop NET/MASTER MS is running, defined by the mix and presence or absence of application processes. See also advanced mode, basic mode, and extended basic mode. Operator Control Services (OCS). The NonStop NET/MASTER MS service that provides the central point of operational control of the local Tandem system, the local NonStop NET/MASTER MS system, and remote systems. operator. In NCL, a lexical element used for working on terms in expressions.
Glossary panel queue. A central queue, maintained by NonStop NET/MASTER MS, that holds panels currently in use. The maximum size of the queue is set by the SYSPARMS MAXPANEL command. panel skipping. The ability to chain menu-selection requests together without having to display intermediate selection panels. Panel skipping is used in conjunction with direct function selection. parameter. A value passed from one procedure or function (the caller) to another procedure or function (the callee).
Glossary Pathway system. The TCPs, servers, terminals, programs, and any subsystems associated with Pathway that run together under the control of one PATHMON process. pend-unload list. A list, maintained by NonStop NET/MASTER MS, that holds in memory copies of NCL procedures that have been unloaded from the active list while still being executed. Peripheral Utility Program (PUP).
Glossary primary program operator (PPO). In IBM terminology, an operator who is authorized to receive unsolicited messages. primary trigger. One of the RMS message recognition elements. You cannot change a primary trigger. private loading. Loading an NCL procedure or function for use by an NCL process. procedure. In NCL, a sequence of NCL statements that performs a task but does not have to return a result when it terminates. procedure library. A subvolume in which NCL source files or object files reside.
Glossary purge ID. An ID used to purge a timer command or NRD message. purge message. A message sent when a timer command is purged from the timer queue. qualification name list. A mapped data object variable specification that uniquely identifies an enclosed element. qualifier. The part of a NonStop NET/MASTER MS command that modifies the action taken by the command. Most qualifiers are in the form: keyword=value. quoted string.
Glossary remote command. A NonStop NET/MASTER MS command sent to a remote system. remote system. Any NonStop NET/MASTER MS or SOLVE management services system other than the local system. remote user. A NonStop NET/MASTER MS user on a remote system. repeated element. An element that can occur more than once. An integer index identifies the specific instance of a repeated element. reply message. A message from a server process to a requester process. REQMS. See Request Maintenance Statistics.
Glossary RH. See request/response header. RMS. See Rule Management Services. RMS message variable. An RMS variable that contains information on a message that arrives at a message handler. RMS timer. An RMS time-based rule that the RMS timer driver has loaded. An RMS timer performs tasks at specific times under the control of a user as specified by the rule. ROC. See Remote Operator Control. roll-delete message. A message that “rolls off” the message display area of an OCS window.
Glossary run-time error. An error detected by NCL during the execution of an NCL process that can be trapped using an error handler. running trace. A trace that has started. Each running trace has a unique trace ID: for example, 00001. SCF. See Subsystem Control Facility. scope. In NCL, the concept that activity takes place within boundaries. Scope affects users, core statements, verbs, labels, and variables. SCREEN COBOL. A procedural language used to define and control terminal displays. screen.
Glossary share list. The list of elements after a SHARE, NOSHARE, SHRVARS, or NOSHRVARS keyword. shared loading. Loading an NCL process so that it can be used by more than one NCL process in the current Guardian process. The NCL process is kept on either the active or retain list. sharing. In NCL, an NCL process that can be executed by more than one user at the same time. shutdown.
Glossary splitting. The opening of a new window or adjusting of the current window. In NCL, splitting refers to the separation of a message into separate words. spooler. An interface to print devices on your system. spooler location. The logical destination of a print file. SSCP. See System Services Control Point. standard map. A map supplied with NonStop NET/MASTER MS to access data structures that are an integral part of NonStop NET/MASTER MS. Standard maps include $MSG, $NCL, $SEC, and $SPI. startup.
Glossary subject. An RMS device, process, or other named entity with which a given message is concerned. Subsystem Control Facility (SCF). The Tandem interactive interface that allows operators and network managers to configure and control data communications subsystems. Subsystem Programmatic Interface (SPI). A common, message-based Tandem interface used to build and decode messages that are used for communication between requesters and servers. subsystem.
Glossary system panel library. A generic term that refers to both the distribution and customized panel libraries. system parameter. A parameter set by the SYSPARMS command. system procedure library. A generic term that refers to both the distribution and customized procedure libraries. system variable. A variable that begins with the reserved stem “SYS.”. System variables provide access to system-related information. system-defined error handler.
Glossary test mode. A mode that forces NonStop NET/MASTER MS to load an NCL procedure from disk and compile it before executing it, rather than attempting to find a compiled version. text. A string of characters that does not modify the action taken by a NonStop NET/MASTER MS command. text or a number. An NCL expression following a verb keyword that NCL regards as text or a number. The expression terminates at the next keyword or at the end of the statement. TH. See transmission header. thaw.
Glossary Transaction Application Language (TAL). The Tandem language, which is used to write systems software and routines, that supports transaction-oriented applications. transmission header (TH). In SNA, routing and control information, optionally followed by a basic information unit (BIU) or a BIU segment. trigger life. A time interval within which an RMS message action rule is regarded by a message group rule as having been triggered.
Glossary unquoted string. Within an NCL statement, a sequence of characters that do not begin and end with quotes, do not result in a number, and do not have a predefined meaning when used in a particular context. unrecognized command. A string of characters that NonStop NET/MASTER MS assumes to be a NonStop NET/MASTER MS command but that it is unable to process and execute. unrecognized statement.
Glossary user procedure library. A procedure library containing the NCL procedures belonging to a particular user or group of users. user variable. A variable created by an NCL procedure. Parameters are user variables. user-defined error handler. An error handler defined by a user. user-defined map. A map created by a user to access data structures defined by the user. user-defined token. A SPI token defined by a user. user-written function. A function written by a user. Utility Access NCL (UANCL).
Glossary virtual user. A NonStop NET/MASTER MS user that does not have a terminal associated with it. A virtual user acts the same way as a real user and has the same attributes as a real user operating in OCS. wake-up timer. A NonStop NET/MASTER RMS timer under the control of BMON that triggers the next RMS timer to act. warning. A condition, encountered performing a NonStop NET/MASTER MS command or operation, that is significant but which does not cause the command or operation to fail.
Glossary (This page left intentionally blank) Glossary–40 106126 Tandem Computers Incorporated
Index A A2E built-in function 4-4 ABBREV built-in function 4-6 ABS built-in function 4-7 Absolute numeric values, converting to 4-7 Addition operator 10-12 ADJUST operand 3-187, 3-209, 3-220 AGE operand 3-191, 3-202 ALARM operand 3-54, 3-107, 3-127, 3-224, 6-8, 6-27 ALL operand 3-50, 3-53, 3-58, 3-73, 3-152, 3-225 Alphabetic characters, case conversion 8-5 ALTKEY operand 3-75, 3-79, 3-100 AND operator, truth table 10-16 ARGS operand 3-4, 11-10, 11-18 Arithmetic operator 10-8 ASSIGN verb 3-6, 11-19 BYNAME op
Index B B2C built-in function 4-8 Binary strings 8-7 BITAND built-in function 4-9 BITOR built-in function 4-9 BITXOR built-in function 4-9 BKGCOLOR operand 3-54, 3-108, 3-128, 3-226, 6-8, 6-13 BKGCOLOUR operand 3-54, 3-108, 3-128, 3-226, 6-8, 6-13 Blanks compilation of 8-5 inserting into a string 4-46 lexical element analysis 8-2 removing from a string 4-75 BLANKS operand 6-13 Boolean expressions, evaluating and analyzing 4-12 Boolean operator 10-16 BOOLEXPR built-in function 4-12 BOTH operand 3-32, 3-36 B
Index Character strings adding quotes 4-67 centering text within a string 4-29 checking the type 4-89 comparing two character strings 4-30 converting binary digits to characters 4-8 characters to decimal numbers 4-27 characters to hexadecimal digits 4-28 decimal number to an ASCII character string 4-32 decimal number to hexadecimal 4-33 hexadecimal to a decimal number 4-112 hexadecimal to ASCII 4-111 to lowercase 4-52 to uppercase 4-92 copying portions of 4-31 deleting characters in a string 4-40 extraneou
Index Character strings (continued) overlaying one string with another 4-64 returning ASCII characters in a specified range 4-113 reversing the order of characters 4-71 stripping leading and trailing occurrences of a specified character 4-77 testing for a specified data type 4-34 if null 4-63 using a mask 4-53 translating according to defined tables 4-86 ASCII to EBCDIC 4-4 characters to binary digits 4-26 EBCDIC to ASCII 4-42 type checking 4-89 verification that substrings exist in a reference string 4-10
Index Comments 8-9 quoted strings 8-6 used for online documentation 1-6 Communication between NCL processes 1-4 using panels 1-5 with operating system software 3-95 with Pathway Server classes 1-5 with terminals 1-4 with users 1-4 COMPARE built-in function 4-30 Comparing two character strings 4-30 Compilation comments 8-9 illegal characters 8-2 labels 8-10 Compilation errors 8-11 Compiler directives 8-12 comments 8-9 quoted strings 8-6 %%DEFINE 8-12 %%INCLUDE 8-13 %%OPTIONS 8-13 %%UNDEFINE 8-14 Completion
Index Conditional statements 2-30, 2-60 null processing 2-36 Context, lexical elements 8-1 CONTROL verb 3-40, 11-13 See also each CONTROL verb operand by name COPIES built-in function 4-31 Core statements See also each core statement by name description of 2-1 list of 2-2 COUNTER operand 3-187, 3-209, 3-220 CREATE operand 3-25 Current procedure type 5-62 Current window identifier of current window 5-108 number of columns available 5-107 number of rows available 5-110 Cursor column position of last panel in
Index DATA operand (continued) in PAUSE verb 3-149 in PSEND SEND verb 3-156 in VARTABLE ALLOC verb 3-192 in WRITE verb 3-230 Databases See also individual FILE verbs accessing data in 1-3 DATATYPE built-in function 4-34 Date converting one format to a different format 4-38 current date in selected formats 5-15 current day of the week 5-14 providing different formats 4-36 DATE built-in function 4-36 DATECONV built-in function 4-38 Day of the week 5-14 DEFAULT operand 6-28 Default search path, NCL procedures
Index Devices check for a valid existing Guardian name 4-94 check for a valid Guardian name 4-93 type of terminal used by NCL procedure 5-101 validating for Guardian names 4-93 validating for Guardian names in the system 4-94 Division operator 10-10 DO core statement 2-10 DOM operand 3-134 DOM-ID message identifier 5-17 Message profile variables 7-11 DOMAIN operand 3-50, 3-54, 3-58, 3-65 DROP verb 3-48, 11-25 DSNM commands, executing from NCL 1-6 E E2A built-in function 4-42 EBCDIC to ASCII translation tab
Index END core statement 2-16 END operand 2-12, 2-21, 2-46, 3-80, 6-34 ENDMSG operand, of CONTROL verb 3-41 ENV operand 3-178 Environments name of NCL process 5-59 terminals used by NCL 5-101 Equal to operator simple 10-14 strict 10-15 ERRFLD operand 6-29 ERROR attributes deleting 3-48 setting of 3-16, 3-19 Error codes in NCL 2-40 Error conditions, generating 2-64 Errors See also NCL errors in panels 6-8 names of NCL handlers 2-39 NCL codes 5-18 NCL routines to handle and intercept 2-37 NCL, types of 5-18
Index Expressions (continued) use 10-2 use of parentheses 10-6, 10-13 EXTPARSE operand 2-43 F Field attributes controlling 6-3 Field attributes in panels 6-3 FIELDS operand 3-188, 3-196, 3-203, 3-210, 3-214, 3-221 FILE ADD verb 3-69 FILE CLOSE verb 3-73 FILE DEL verb 3-75 FILE GET verb 3-78 File names check for a valid existing Guardian name 4-96, 4-97 check for a valid Guardian name 4-95 FILE OPEN verb 3-87 File pairs See individual FILE verbs FILE PUT verb 3-90 FILE PUTGET verb 3-95 FILE return codes, ta
Index FLUSH core statement 2-18 FMTINPUT operand 6-29 FOLD operand 2-44 FOREVER operand 2-11 FORMAT operand 3-87, 3-100, 3-153, 3-160 Full file keys, obtaining the value of 5-40 FUNCTION core statement 2-19 Function keys 3-42/43, 5-46, 5-57 Functions built-in 4-1 user-written 2-19 FWD operand 3-80 G GENERIC operand 3-8, 3-10, 3-21, 3-48, 11-10, 11-22 Generic processing, variable creation or modification count 5-106 Generic record retrieval 3-78 GENLEN operand 3-75, 3-79, 3-101 GET operand 3-67 Global varia
Index I ID operand in FILE ADD verb 3-71 in FILE CLOSE verb 3-73 in FILE DEL verb 3-76 in FILE GET verb 3-79 in FILE OPEN verb 3-88 in FILE PUT verb 3-92 in FILE PUTGET verb 3-97 in FILE SET verb 3-100 in PSEND CLOSE verb 3-152 in PSEND OPEN verb 3-153 in PSEND SEND verb 3-156 in PSEND SET verb 3-160 in VARTABLE ADD verb 3-186 in VARTABLE ALLOC verb 3-190 in VARTABLE DELETE verb 3-195 in VARTABLE FREE verb 3-199 in VARTABLE GET verb 3-201 in VARTABLE PUT verb 3-208 in VARTABLE QUERY verb 3-213 in VARTABLE
Index Integrating operating system processes with NonStop NET/MASTER MS NCL processes 1-4, 1-5 INTENS operand 3-55, 3-108, 3-128, 3-226, 6-9, 6-16 Inter-NET/MASTER Connection 1-2 Inter-System Routing 1-3 See also &SYS.NM.
Index Keywords See individual operands by name example of 8-4 symbols 8-4 with qualifier as a list 11-8 with qualifier as a variable 11-8 with qualifier from a list 11-6 with textual or numeric qualifier 11-5 with “rest of the statement” qualifier 11-7 KGE operand 3-81 KGEALL operand 3-76 KGT operand 3-81 KLE operand 3-82 KLT operand 3-82 L LABEL operand 2-64 Labels 8-10 Language code 5-104 LASTPOS built-in function 4-48 Leading characters in a string up to a specified character 4-73 LEAVE core statement 2
Index LIMIT operand 2-24, 2-27 in VARTABLE ALLOC verb 3-193 LINE operand 3-35 LINK operand 3-51, 3-58, 3-65 LOADFAIL_ERROR 2-7 Local file identifiers 5-39 LOCAL operand 3-51, 3-54, 3-58 LOCK verb 3-115 Lock, text of message 5-53 LOG operand 3-227 LOGCONT verb 3-120 LOGDEL verb 3-122 Logical operations on character strings 4-9 Logon date user last logged on 5-51 last used logical terminal name 5-52 last used physical terminal name 5-52 time user last logged on 5-51 LOGPROC procedure definition 3-120 purpose
Index MDO operand in ASSIGN verb 3-7, 3-9, 3-14 in EMSALERT verb 3-51 in EMSSEND verb 3-65 in FILE ADD verb 3-70 in FILE GET verb 3-84 in FILE PUT verb 3-91 in FILE PUTGET verb 3-96, 3-97 in INTREAD verb 3-112 in LOGREAD verb 3-124 in MSGREAD verb 3-134 in PSEND SEND verb 3-157, 3-158 in SECCALL ADD verb 3-163 in SECCALL CHANGE verb 3-165 in SECCALL GET verb 3-172 in SECCALL QUERY verb 3-174 in SECCALL UPDATE verb 3-175 in START verb 3-178 in WRITE verb 3-226 MDO variable containing arbitrary user MDO info
Index MDOs (continued) using the FILE GET verb 3-84 using the FILE PUT verb 3-91 using the FILE PUTGET verb 3-96 using the INTREAD verb 3-110, 3-113 using the LOGREAD verb 3-124 using the MSGREAD verb 3-134 using the PSEND SEND verb 3-157, 3-158 using the PSEND SET verb 3-160 using the SECCALL ADD verb 3-163 using the SECCALL CHANGE verb 3-165 using the SECCALL GET verb 3-172 using the SECCALL QUERY verb 3-174 using the SECCALL UPDATE verb 3-175 using the START verb 3-178 using the WRITE verb 3-226 MERGE o
Index MIN built-in function 4-56 MNAME operand 3-115 MODE operand 3-25 MODFLD attributes deleting 3-48 list of field names 5-82 setting of 3-16, 3-19 Modified field names, list of 5-82 MON operand 3-227 MSGCODE operand 3-228 MSGCONT verb 3-127 MSGDEL verb 3-131 MSGNO operand 3-67 MSGPROC procedure definition 3-127 purpose 1-6 MSGREAD verb 3-132, 7-1 enclosed MDOs 3-132 Multiplication operator 10-10 MVNUM operand 3-38 N NAME operand 3-139 NAMTONOD built-in function 4-57 NCL and OCS 1-1 communication with op
Index NCL errors (continued) procedure name that contains the error 5-26 resuming a procedure 5-27 retrying the error 5-28 single value causing an error 5-33 source file that contained the error 5-21 source library containing the procedure that issued the error 5-23 statement name that caused the error 5-30 statement number that caused the error 5-29 TEDIT line number containing the error 5-24 two values causing an error 5-35 variable name that caused the error 5-31 when a combination of values causes an e
Index NEWPWD operand 3-163, 3-165 NEXTFILE built-in function 4-58 NEXTSVOL built-in function 4-60 NOCMD operand, of CONTROL verb 3-40 NOCMDSEP operand, of CONTROL verb 3-41 Node name of local system 5-68 number of local system 5-69 NODE operand 3-120 NODTONAM built-in function 4-61 NOENDMSG operand, of CONTROL verb 3-41 NOFINDRC operand, of CONTROL verb 3-41 NOFLDCTL operand, of CONTROL verb 3-41 NOFOLD operand 2-44 NOINTLOG operand, of CONTROL verb 3-41 NOMSG operand 3-162 NonStop NET/MASTER MS commands c
Index NRD See also Message profile variables deletion 3-137 NRD operand 3-56, 3-108, 3-128, 3-228 NRDDEL verb 3-137 Null character strings, testing for 4-63 NULL0 built-in function 4-63 NUMBER operand 3-184 Numbers addition 10-12 changing the sign of 10-9 division 10-10 example of 8-4 getting a remainder 10-11 integer division 10-11 minus sign (-) 8-5 multiplication 10-10 overflow 10-14 plus sign (+) 8-5 precision 10-13 quoted strings 8-7 raising to a power 10-9 range 10-13 subtraction 10-12 symbols 8-4 sy
Index O OCS and NCL 1-1 displaying messages 2-59 identifier of current window 5-108 name of alternate window 5-70 name of current window 5-70 number of columns available in current window 5-107 number of rows available in current window 5-110 second window active indicator 5-95 window in use by NCL 5-108 writing messages to the window 2-59 OCS verb 3-138 OLDEST operand 3-217 ON blocks, definition of 2-37 ON core statement 2-37 Online documentation, using NCL 1-6 Operands See individual operands by name wit
Index Operators (continued) * 10-10 ** 10-9 + 10-12 - 10-12 / 10-10 // 10-11 < 10-14 << 10-15 <<= 10-15 <= 10-14 = 10-14 == 10-15 > 10-14 >= 10-14 >> 10-15 >>= 10-15 \= 10-14 \== 10-15 || 10-17 OPT operand in ASSIGN verb 3-6, 3-13, 3-16, 3-19 in FILE DEL verb 3-76 in FILE GET 3-79 in PARSE verb 3-145, 11-29 in SECCALL GET verb 3-172 in VARTABLE GET verb 3-204 OR operator, truth table 10-16 OTHERWISE operand 2-62 Output-vars-list 3-5 OUTVAR attributes, setting of 3-16 OVERLAY built-in function 4-64 OVERLAY
Index Panel statements copying from panel definition files 6-24 Panel comments 6-26 Panel control statements See also each panel control statement by name list of 6-4 Panel description files 6-1 Panel error messages controlling the display of 3-42 Panel field types 6-12 Panel fields changing color attributes for comments 5-81 changing color attributes for errors 5-72 changing color attributes for headings 5-88 changing color attributes for input fields 5-77, 5-78 changing color attributes for output fields
Index Panels (continued) function keys name of last input 5-46, 5-57 name of current panel 5-76 name of field in error 5-75 name of input or outvar field at last data entry 5-11 names of modified fields 5-82 offset to cursor position from the start of a field defined by &SYS.CURS.
Index PMENU operand 3-162 PNAME operand 3-115 POS built-in function 4-66 POSITION operand 6-34 PPO information variables 7-1, 7-14 message information 7-1, 7-14 messages, originating from 7-7 PPO control flags, list 7-14 PPO messages 7-14 PREFIX operand 3-38 Preloading panels 3-140 PREPARSE operand 6-30 PROC operand 3-177 PROCEDURE core statement 2-43 Procedure name, current 5-58 Procedure names, base 5-58 PROCEDURES, default search path 3-41 Process environment name 5-59 Process names check for a valid ex
Index Q QEXIT verb 3-162 Qualifier types 11-5 types of lists 11-8 types of qualifier with single value 11-5 VARS list 11-10 Queues, dependent request 3-110 Queues, dependent response 3-110 QUOTE built-in function 4-67 Quoted strings 8-5 Quotes 8-5 adding leading and trailing quotes 4-67 R RANDOM built-in function 4-69 Random numbers generating 4-69 Random numbers, generating 4-69 RANGE operand 3-4, 6-5, 6-18, 11-10, 11-11 RANGE operand, efficiency considerations when using 11-12, 11-13, 11-18 READ operand
Index Replacing NonStop NET/MASTER MS Commands 1-6 REQ operand 6-19 Request queue 3-110 RESETERR operand 3-16 RESETMOD operand 3-16 RESETOUT operand 3-17 Resource information for messages 7-16 RESP operand 3-32 Response queue 3-110 RESTART operand 3-177, 3-180 Restarting an NCL process 3-180 RESUME core statement 2-49 RETRY core statement 2-51 Retrying NCL errors 2-51 RETSUB core statement 2-53 Return codes asynchronous panels 3-142 files 5-42 synchronous panels 3-142 system 5-94 RETURN core statement 2-55
Index SCOPE operand in VARTABLE ADD verb 3-186 in VARTABLE ALLOC verb 3-190 in VARTABLE DELETE verb 3-195 in VARTABLE FREE verb 3-199 in VARTABLE GET verb 3-201 in VARTABLE PUT verb 3-208 in VARTABLE QUERY verb 3-213 in VARTABLE RESET verb 3-216 in VARTABLE UPDATE verb 3-219 Searching a help database 3-67 SECCALL ADD verb 3-163 SECCALL CHANGE verb 3-165 SECCALL CHECK verb 3-167 SECCALL DELETE verb 3-168 SECCALL EXIT verb 3-169 SECCALL GET verb 3-172 SECCALL QUERY verb 3-174 SECCALL UPDATE verb 3-175 SEG op
Index Simple variable names case sensitivity of alphabetic characters 9-3 character set 9-2 default values 9-4 name substitution 9-11 restrictions 9-3 syntax 9-2 use of {} 9-3 SKIP operand 6-19 Skipping characters 11-16 fields on a panel 6-18, 6-19 panels 5-86, 6-18 words 11-15 SOLVE management services 1-2, 1-3, 7-6, 7-7, 7-18, 7-19 Source information for messages 7-17 Source MDO 3-9 SPACE built-in function 4-75 Spaces inserting 4-46 lexical element analysis 8-2 removing 4-75 Special characters 8-8 Specif
Index STRIP built-in function 4-77 Stripping specified characters from a string 4-77 SU operand 3-38 SUB operand 6-19 SUBSTR built-in function 4-79 Substrings extracting, starting from a specified character 4-79 extracting, starting from a specified word 4-81 finding the position within a character string 4-66 Subtraction operator 10-12 Subvolumes, finding the next in alphabetic sequence 4-60 SUBWORD built-in function 4-81 SWGUID verb 3-184 SYMBOL built-in function 4-82 Symbols 8-4 Synchronous panels 3-141
Index System variables (continued) updating 9-16 validating the name 4-115 &SYS.GUID.GROUP 5-45 &SYS.GUID.
Index Translation See also Character strings ASCII to EBCDIC 4-4 binary digits to characters 4-8 character format to binary digits 4-26 character format to decimal numbers 4-27 character format to hexadecimal digits 4-28 decimal to ASCII 4-32 decimal to hexadecimal 4-33 EBCDIC to ASCII 4-42 hexadecimal to a decimal number 4-112 hexadecimal to ASCII 4-111 using input and output tables 4-86 TRUNC built-in function 4-88 Type of value 10-4 arithmetic 10-4 Boolean 10-5 concatenation 10-5 converting string to nu
Index Unquoted strings example of 8-4 symbols 8-4 UNTIL operand 2-12 UPD operand 3-83 UPDATE operand 3-84 Updating records in a file 3-90 UPPER built-in function 4-92 User databases See also individual FILE verbs accessing data in 1-3 finding a record 5-40 User ID 5-103 User ID Management Services 1-2 User MDOs 7-20 USER operand 3-36, 3-120 User variables 9-17 User-modifiable system variables 5-2 USERCORR operand 3-193 USERID operand in SECCALL CHANGE verb 3-165 in SECCALL CHECK verb 3-167 in SECCALL DELET
Index VALPROC1 built-in function 4-99 VALPROC2 built-in function 4-100 Variable name substitution 9-10 capacity of substitution buffer 9-12, 9-15 complex variable names 9-11 compound variable names 9-13 nested variable names 9-15 simple variable names 9-11 stem variable names 9-13 use of braces {} 9-15 Variable sharing, controlling 3-43 Variable substitution, in a string 4-101 Variable* 3-5 Variables 9-1 assigning values 2-3, 9-18 character set 9-1 complex 9-4 compound 9-7 controlling field attributes 5-1
Index Variables (continued) user 9-17 validating the name 4-82 VARS list 11-10 accessing global variables 11-17 both ranges specified 11-14 default start and end values 11-12 first range specified 11-13 length-variable-specification 11-14 maximum number of variables 11-13 no range specified 11-13 ranged-variable-specification 11-11 second range specified 11-14 skip option 11-15 specifying a range 11-11 start and end values in a range 11-12 using an expression 11-16 valid length specification 11-15 valid sk
Index Vartables (continued) size of table name 3-190 synchronizing updates to 3-190 visibility 3-190 VECTOR operand 3-30 Verbs 3-1 See also each verb by name completion information 5-37 components 11-1 list of 3-1 operands 11-1, 11-2, 11-5 mutually exclusive 11-4 order 11-5 qualifier 11-3, 11-5 reserved words 11-2 = sign in syntax 11-3 VERIFY built-in function 4-103 Version number of NonStop NET/MASTER MS 5-68 Version number, current NCL release 5-63 Version release date of NonStop NET/MASTER MS 5-67 Volum
Index X X2C built-in function 4-111 X2D built-in function 4-112 XOR operator, truth table 10-16 XRANGE built-in function 4-113 Z Zero, testing for 4-74 ZFEATURE built-in function 4-114 ZNCLKWD built-in function 4-115 Special characters #ALIAS panel control statement 6-5 #ERR panel control statement 6-8 #FLD panel control statement 6-12 #INCLUDE panel control statement 6-24 #NOTE panel control statement 6-26 #OPT panel control statement 6-27 #TRAILER panel control statement 6-34 %%DEFINE compiler directive
Index &$xxx.MAPNAME 7-20 &$xxx.message text 7-11 &$xxx.MSGATTR 7-6 &$xxx.MSGATTR.ALARM 7-6 &$xxx.MSGATTR.CLASS 7-6 &$xxx.MSGATTR.CLASS.AOMMSG 7-6 &$xxx.MSGATTR.CLASS.EMSMSG 7-6 &$xxx.MSGATTR.CLASS.FTSMSG 7-6 &$xxx.MSGATTR.CLASS.MONMSG 7-7 &$xxx.MSGATTR.CLASS.MSGALL 7-7 &$xxx.MSGATTR.CLASS.PPOMSG 7-7 &$xxx.MSGATTR.DISPLAY 7-7 &$xxx.MSGATTR.DISPLAY.BKGCOLOR 7-8 &$xxx.MSGATTR.DISPLAY.COLOR 7-8 &$xxx.MSGATTR.DISPLAY.HLITE 7-8 &$xxx.MSGATTR.DISPLAY.INTENS 7-8 &$xxx.MSGATTR.FLAGS 7-8 &$xxx.MSGATTR.FLAGS.
Index &$xxx.PPOCNTL 7-14 &$xxx.PPOCNTL.CONTROL 7-14 &$xxx.PPOCNTL.CONTROL.FLAGS 7-14 &$xxx.PPOCNTL.CONTROL.MULTICORRELATOR 7-15 &$xxx.PPOCNTL.CONTROL.MULTISEQUENCE 7-15 &$xxx.PPOCNTL.CONTROL.RCVCMDPREFIX 7-15 &$xxx.PPOCNTL.CONTROL.SOURCE 7-15 &$xxx.PPOCNTL.CONTROL.SUPPRESSLEVEL 7-15 &$xxx.PPOCNTL.VTAMNUM 7-15 &$xxx.PREFIX 7-12 &$xxx.PREFIX.LASTMSGID 7-12 &$xxx.PREFIX.LASTMSGID.ID 7-12 &$xxx.PREFIX.LASTMSGID.TYPE 7-12 &$xxx.PREFIX.MSGIND 7-12 &$xxx.PREFIX.MSGTEXT 7-12 &$xxx.PREFIX.ORIGMSGID 7-13 &$xxx.
Index &SYS.CURS.FLD system variable 5-11 &SYS.CURS.POS system variable 5-12 &SYS.CURS.ROW system variable 5-13 &SYS.DATE.DAY system variable 5-14 &SYS.DATE.n system variable 5-15 &SYS.DOM.ID system variable 5-17 &SYS.ERROR.CODE system variable 5-18 &SYS.ERROR.COLUMN system variable 5-19 &SYS.ERROR.COND system variable 5-20 &SYS.ERROR.FILE system variable 5-21 &SYS.ERROR.KEYWORD system variable 5-22 &SYS.ERROR.LIB system variable 5-23 &SYS.ERROR.LINE system variable 5-24 &SYS.ERROR.
Index &SYS.LOCK.MSG system variable 5-53 &SYS.LOOPCTL system variable 5-54, 9-16 assignment statement 2-3 CNMREAD verb 3-33 DO core statement 2-13 EMSREAD verb 3-62 GOSUB core statement 2-26 GOTO core statement 2-29 INTREAD verb 3-113 LOGREAD verb 3-125 MSGREAD verb 3-135 &SYS.NATIVE.INKEY system variable 5-57 &SYS.NCL.BASEPROC system variable 5-58 &SYS.NCL.CURRPROC system variable 5-58 &SYS.NCL.ENV system variable 5-59 &SYS.NCL.NEST system variable 5-60 &SYS.NCL.RESTART system variable 5-61 &SYS.NCL.
Index &SYS.PANEL.MODFLD system variable 5-82 &SYS.PANEL.OUTHIC system variable 5-84 &SYS.PANEL.OUTLOC system variable 5-85 &SYS.PANEL.SKIP system variable 5-86, 9-16 assignment statement 2-3 &SYS.PANEL.SUBTLC system variable 5-88 &SYS.PANEL.TITLEC system variable 5-89 &SYS.PANEL.TITLEP system variable 5-90 &SYS.PARMCNT system variable 5-91, 9-18 &SYS.PSEND.ERROR system variable 5-92 &SYS.PSEND.ID system variable 5-93 &SYS.PSEND.PSERROR system variable 5-92 &SYS.PSEND.RC system variable 5-93 &SYS.
Index &SYSMSG (continued) FILE OPEN verb 3-87 FILE PUT verb 3-90 FILE PUTGET verb 3-95 FILE SET verb 3-100 PANEL verb 3-141 #ERR panel control statement 6-10 () (parentheses) examples of 8-8 special characters 8-8 + unary operator 8-5, 10-8 , (comma) examples of 8-8 special character 8-8 - unary operator 8-5, 10-9 ; (semicolon), special character 8-8 : (colon), special character 8-8 Index–44 106126 Tandem Computers Incorporated