HP 3000 Manuals

References [ MPE/iX Commands Reference Manual Volume I ] MPE/iX 5.0 Documentation


MPE/iX Commands Reference Manual Volume I

References 

The following references apply to the numbers that appear in parentheses
in table B-1.

1.   Special rules apply when you use the comparison operators with
     strings.  The strings are compared, character by character, until an
     inequality is found.  This becomes the inequality of the strings.
     For example:  'ba' > 'abcd' and 'abcc' < 'abdc'.  If string1 is
     longer than string2, and if string1 and string2 are equal up to the
     length of the string2, then string1 > string2 evaluates as TRUE.

2.   The BOUND(varname) function returns the value TRUE if varname has
     been defined (assigned a value) and FALSE if it has not been
     defined.  The BOUND function is defined as follows:

        *   BOUND (name of a defined variable) = TRUE

        *   BOUND (name of an undefined variable) = FALSE

        *   BOUND (numeric value of expression) = TRUE

        *   BOUND (string value of expressions) = TRUE

        *   BOUND (Boolean value of expression) = TRUE

     For example:

          setvar a 6
          calc bound(a)           TRUE
          deletevar a
          calc bound(A)           FALSE
          calc bound(1+2)         TRUE
          calc bound('a'+'b')     TRUE
          calc bound(5<4)         TRUE

     In BOUND (expression), if expression is not a valid expression, an
     error message is displayed.

3.   The circular shift operators, CSL and CSR, shift the specified
     number of bits in a 32-bit word in the specified direction.  When 1
     or 0 is shifted off one end, it comes back onto the other end.  The
     logical shift operators, LSL and LSR, perform the same shifting as
     the circular shift operators, but when 1 or 0 is shifted off one
     end, a 0 comes back at the other end.

4.   The modulo operation functions as it is defined by Donald E. Knuth,
     The Art of Computer Programming, Addison-Wesley Publishing Co.,
     Reading, MA; Second ed., 1973; Volume I, p.  38.

5.   The TYPEOF(expression) returns one of the following integer values:

        *   0 if expression is invalid.

        *   1 if expression evaluates to an integer.

        *   2 if expression evaluates to a string.

        *   3 if expression evaluates to a Boolean value.

6.   The FINFO function returns a string, Boolean, or an integer value.
     The result depends upon the option specified.

     The first parameter, filename, is a string, the name of the file for
     which you want the information.  This must be a fully or partly
     qualified file name, or a string expression that yields such a file
     name.

     This parameter can also be a string that specifies a file equation
     by backreference, for example, FINFO("*XIN", 1), which references
     the equation FILE XIN=....

     The second parameter, option, may be an integer (or integer
     expression) corresponding to the FLABELINFO intrinsic item numbers.
     Options 0 and 1 and the negative options are exceptions.  The
     negative options provide the same information as their positive
     counterparts, except the format of the data is different.

     The option parameter may also be a string mnenomic which corresponds
     to an integer value.  The string value is often easier to remember
     than the integer.  Table B-2, which follows, summarizes all of the
     FINFO options.

     Users with system manager (SM) capabilities may use options 4 and 33
     on any file within the system.  Users with account manager (AM)
     capabilities may use those options only on files within their
     account.

7.   The DWNS() and UPS() functions operate only on ASCII characters in
     the ranges "a" through "z" and "A" through "Z".

8.   The ORD() and CHR() functions operate only on ASCII characters in
     the range 0 through 255.

9.   0^0 (zero to the zero power) yields 1. 

10.  The INPUT() function is different from other evaluator functions in
     that the execution of the command in which the function appears
     stops while input is taken from the user.  The syntax is as follows:

          INPUT([prompt][,wait])

     INPUT reads from $STDIN. If a prompt is specified, it is written to
     $STDLIST before reading.  If a wait is specified, the read is a
     timed read.  The duration of the timed read is the lesser of wait
     seconds or the value of the HPTIMEOUT variable in minutes.  The
     result of the read is returned as the string value of the function.
     If the user gave no input, but just pressed Return, the empty string
     is returned.  If the timeout specified in the function itself (as
     opposed to the HPTIMEOUT timeout) expires, the empty string is
     returned.  If the HPTIMEOUT timeout expires, the session is
     terminated.


NOTE This function should be used carefully since it interrupts execution of a command. It is not executed if it is skipped as a result of evaluation of a previous clause of a Boolean expression. This is the right side of an AND where the left is FALSE or the right side of an OR where the left is TRUE. For example: IF "!filename" = " " AND SETVAR (filename,input & ('Enter filename:'))<>" " THEN comment If filename is not empty, the left comment side of the AND is FALSE and so comment the right side is not executed. This comment means no INPUT() will be performed.
11. For LTRIM and RTRIM if trimstr is not given, then a space is used as the default. 12. POS (findstr,sourcestr[,N]). If N is specified, the Nth occurrence of findstr is searched for in sourcestr. If N is negative, the ABS(N)th occurrence of findstr is searched for in sourcestr from the right. A value of zero for N results in a zero being returned. This is the same value which is returned if the requested occurrence of findstr is not found in sourcestr. For example: POS('.','FILE.GRP.ACCT') WILL RETURN 5 POS('.','FILE.GRP.ACCT',-1) WILL RETURN 9 13. The SETVAR() function is different from other evaluator functions in that it is the first function that modifies its environment. The syntax is as follows: SETVAR (varname, expression) The expression is evaluated. If it evaluates with no errors, the value is returned and the variable with the name given as the first parameter is set to that value. Normal rules on setting variables apply: if it does not exist, it is created; if it does exist, its type is set to the type of the result of expression. Please refer to the SETVAR command in chapter 2 for additional information. ___________________________________________________________________ NOTE The SETVAR() function is not executed in a partial evaluation skip state. See the INPUT() function above for an example. ___________________________________________________________________ Table B-2. FINFO Specifications ------------------------------------------------------------------------------------------------- | | | | | | Number | Alias | Data | Item Description | | | | Type | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 0 | EXIST | Boolean | Existence of file | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 1 | FILENAME ONLY | String | File name | | | FNAME | | | | | FULL FILENAME | | | | | FULLFNAME | | | | | FULLY QUALIFIED FILENAME | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 2 | GROUP | String | Group name | | | GROUPNAME | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 3 | ACCOUNT | String | Account name | | | ACCT | | | | | ACCOUNTNAME | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 4 | CREATOR | String | File creator name | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 5 | FMTSECURITY | String | Security matrix for access | | | FORMATTED SECURITY MATRIX | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | -5 | SECURITY MATRIX | Integer | Security matrix for access | | | INTSECURITY | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 6 | CREATED | String | File creation date | | | CREATION DATE | | | | | FMTCREATED | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | -6 | CREATION DATE INTEGER | Integer | File creation date | | | INTCREATED | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 7 | ACCESSED | String | Last access date | | | FMTACCESSED | | | | | LAST ACCESS DATE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | -7 | LAST ACCESS DATE INTEGER | Integer | Last access date | | | INTACCESSED | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 8 | MODIFIED | String | Last modification date | | | LAST MOD DATE | | | | | FMTMODDATE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | -8 | LAST MOD DATE INTEGER | Integer | Last modification date | | | INTMODDATE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 9 | FILE CODE | String | File code of disk file | | | MNEMONIC | | | | | FMTFCODE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | -9 | FCODE | Integer | File code of disk file | | | INTFCODE | | | | | FILE CODE | | | | | | | | ------------------------------------------------------------------------------------------------- Table B-2. FINFO Specifications (cont.) ------------------------------------------------------------------------------------------------- | | | | | | Number | Alias | Data | Item Description | | | | Type | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 10 | USER LABELS WRITTEN | Integer | Number of user labels written | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 11 | USER LABELS AVAIL | Integer | Number of user labels available | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 12 | FILE LIMIT | Integer | Total number of logical records | | | LIMIT | | possible in the file | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 13 | FORMATTED FOPTIONS | String | File options | | | FMTFOPT | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | -13 | FOPTIONS | Integer | File options | | | INTFOPT | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 14 | RECORD SIZE | Integer | Record size | | | RECSIZE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 15 | BLOCK SIZE | Integer | Block size | | | BLKSIZE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 16 | MAX EXTENTS | Integer | Maximum number of extents | | | MAXEXT | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 17 | LAST EXTENT SIZE | Integer | Last extent size | | | LASTEXTSIZE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 18 | EXTENT SIZE | Integer | Extent size | | | EXTSIZE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 19 | END OF FILE | Integer | Number of logical records in file | | | EOF | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 20 | ALLOC TIME | String | File allocation time | | | FMTALLOCTIME | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | -20 | ALLOC TIME INTEGER | Integer | File allocation time | | | INTALLOCTIME | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 21 | ALLOC DATE | String | File allocation date | | | FMTALLOCDATE | | | | | ALLOCATED | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | -21 | ALLOC DATE INTEGER | Integer | File allocation date | | | INTALLOCDATE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 22 | NUM OPEN CLOSE RECS | Integer | Number of open/close records | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 23 | DEVICE NAME | String | Device name (8 bytes | | | DEV NAME | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 24 | FMTMODTIME | String | Last modification time | | | LAST MOD TIME | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | -24 | INTMODTIME | Integer | Last modification time | | | LAST MOD TIME | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 25 | FIRST USER LABEL | String | First user label (user label 0) | | | | | | ------------------------------------------------------------------------------------------------- Table B-2. FINFO Specifications (cont.) ------------------------------------------------------------------------------------------------- | | | | | | Number | Alias | Data | Item Description | | | | Type | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 27 | UNIQUE FILE ID | String | Unique file identifier (UFID) | | | UFID | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 28 | BYTE FILE SIZE | Integer | Total number of bytes allowed in file | | | BYTEFILESIZE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 29 | BYTE DATA OFFSET | Integer | Start of file offset | | | DATASTART | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 30 | BYTE RECORD SIZE | Integer | Record size (indicates bytes) | | | BYTERECSIZE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 31 | BYTE BLOCK SIZE | Integer | Block size (indicates bytes) | | | BYTEBLKSIZE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 32 | BYTE EXTENT SIZE | Integer | Extent size (indicates bytes) | | | BYTEEXTSIZE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 33 | LOCKWORD | String | File lockword | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 34 | VOLUME RESTRICTION | String | Volume restriction | | | VOLRESTR | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 35 | VOLUME SET NAME | String | Volume set names | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 36 | LOG SET ID | String | Transaction management log set id | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 37 | LDEV | Integer | Logical device number | | | LOGICAL DEVICE NUMBER | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 38 | POSIX FULL FILE NAME | String | Terminated HFS-syntax system absolute | | | POSIXFULLFNAME | | pathname | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 39 | NUM HARD LINKS | Integer | The current number of hard links to | | | NUMHARDLINKS | | the file | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 40 | ACCESS TIME | String | Time of last file access (clock | | | FMTACCESSTIME | | format) | | | LAST ACCESS TIME | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | -40 | LAST ACCESS TIME INTEGER | Integer | Time of last file access (clock | | | INTACCESSTIME | | format) | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 41 | STATUS CHANGE TIME | String | Time of last file status change (clock | | | FMTSTATUSCHANGETIME | | format) | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | -41 | INTSTATUSCHANGETIME | Integer | Change Time Integer | | | CHANGE TIME INTEGER | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 42 | STATUS CHANGE DATE | String | Date of the last file status change | | | FMTSTATUSCHANGEDATE | | (calendar format) | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | -42 | CHANGE DATE INTEGER | Integer | Date of the last file status change | | | INTSTATUSCHANGEDATE | | (calendar format) | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 43 | FILE OWNER NAME | String | File owner | | | OWNER | | | | | | | | ------------------------------------------------------------------------------------------------- Table B-2. FINFO Specifications (cont.) ------------------------------------------------------------------------------------------------- | | | | | | Number | Alias | Data | Item Description | | | | Type | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 44 | FILE OWNER ID | Integer | File owner identifier | | | UID | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 45 | FILE GROUP NAME | String | File group | | | FILEGROUP | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 46 | FILE GROUP ID | Integer | File group identifier | | | GID | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 47 | FILE TYPE | String | File type | | | FILETYPE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | -47 | FILE TYPE INTEGER | Integer | File type | | | INTFILETYPE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 48 | RECORD TYPE | Integer | Record type | | | RECTYPE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 49 | BYTE FILE SIZE | Integer | Current file size (in bytes) | | | BYTEFILESIZE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 50 | KSAM VERSION | Integer | KSAM XL file version | | | KSAMVERS | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 51 | KSAM LABEL | String | KSAM XL parameters | | | KSAMPARAM | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 52 | DEVICE TYPE | String | MPE/iX device type | | | DEVTYPE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | -52 | DEVICE TYPE INTEGER | Integer | MPE/iX device type | | | INTDEVTYPE | | | | | | | | ------------------------------------------------------------------------------------------------- | | | | | | 53 | RELEASED | Boolean | Secured/Released | | | | | | -------------------------------------------------------------------------------------------------


MPE/iX 5.0 Documentation