INDEX
*  SPIRES Actions
1  Processing Rules: Complete Listing By Number
1.2  Actions Used Only As SEARCHPROC Rules (A6 -- A16)
1.2.0.0.6  * A6
1.2.0.0.7  * A7
1.2.0.0.8  * A8
1.2.0.1.1  * A11
1.2.0.1.2  * A12
1.2.0.1.3  * A13
1.2.0.1.4  * A14
1.2.0.1.5  * A15
1.2.0.1.6  * A16
1.3  Actions Used as INPROC, OUTPROC, SEARCHPROC or PASSPROC Rules (A21 -- A66)
1.3.0.2.1  * A21
1.3.0.2.2  * A22
1.3.0.2.3  * A23
1.3.0.2.4  * A24
1.3.0.2.5  * A25
1.3.0.2.6  * A26
1.3.0.2.7  * A27
1.3.0.2.8  * A28
1.3.0.2.9  * A29
1.3.0.3.0  * A30
1.3.0.3.1  * A31
1.3.0.3.2  * A32
1.3.0.3.3  * A33
1.3.0.3.4  * A34
1.3.0.3.5  * A35
1.3.0.3.6  * A36
1.3.0.3.7  * A37
1.4.0.3.8  * A38
1.4.0.3.9  * A39
1.4.0.4.0  * A40
1.4.0.4.1  * A41
1.4.0.4.2  * A42
1.4.0.4.3  * A43
1.4.0.4.4  * A44
1.4.0.4.5  * A45
1.4.0.4.6  * A46
1.4.0.4.7  * A47
1.4.0.4.8  * A48
1.4.0.4.9  * A49
1.4.0.5.0  * A50
1.4.0.5.1  * A51
1.4.0.5.2  * A52
1.4.0.5.3  * A53
1.4.0.5.4  * A54
1.4.0.5.5  * A55
1.4.0.5.6  * A56
1.4.0.5.7  * A57
1.4.0.5.8  * A58
1.4.0.5.9  * A59
1.4.0.6.0  * A60
1.4.0.6.1  * A61
1.4.0.6.2  * A62
1.4.0.6.3  * A63
1.4.0.6.4  * A64
1.4.0.6.5  * A65
1.4.0.6.6  * A66
1.4.0.6.7  * A67
1.4.0.6.8  * A68
1.5  Actions Used Only as OUTPROC Rules (A71 -- A85)
1.5.0.7.1  * A71
1.5.0.7.2  * A72
1.5.0.7.3  * A73
1.5.0.7.4  * A74
1.5.0.7.5  * A75
1.5.0.7.6  * A76
1.5.0.7.7  * A77
1.5.0.7.8  * A78
1.5.0.7.9  * A79
1.5.0.8.0  * A80
1.5.0.8.1  * A81
1.5.0.8.2  * A82
1.5.0.8.4  * A84
1.5.0.8.5  * A85
1.6  Actions Used Only as INCLOSE Rules (A122 -- A148)
1.6.1.2.2  * A122
1.6.1.2.3  * A123
1.6.1.2.4  * A124
1.6.1.2.5  * A125
1.6.1.2.6  * A126
1.6.1.2.7  * A127
1.6.1.2.8  * A128
1.6.1.3.1  * A131
1.6.1.3.2  * A132
1.6.1.3.3  * A133
1.6.1.3.4  * A134
1.6.1.3.8  * A138
1.6.1.3.9  * A139
1.6.1.4.0  * A140
1.6.1.4.6  * A146
1.6.1.4.7  * A147
1.6.1.4.8  * A148
1.7  Actions Used Only as PASSPROC Rules (A161 -- A171)
1.7.1.6.1  * A161
1.7.1.6.2  * A162
1.7.1.6.3  * A163
1.7.1.6.4  * A164
1.7.1.6.5  * A165
1.7.1.6.6  * A166
1.7.1.6.7  * A167
1.7.1.6.8  * A168
1.7.1.6.9  * A169
1.7.1.7.0  * A170
1.7.1.7.1  * A171
2  Quick Reference to Processing Rule Functions by Number
2.1  Actions Used Only As SEARCHPROC Rules (A6 -- A16)
2.2  Actions Used as INPROC, OUTPROC or SEARCHPROC Rules (A21 -- A37)
2.3  Actions Used as INPROC, OUTPROC, SEARCHPROC, PASSPROC Rules (A38-A62)
2.4  Actions Used Only as OUTPROC Rules (A71 -- A85)
2.5  Actions Used Only as INCLOSE Rules (A122 -- A148)
2.6  Actions Used Only as PASSPROC Rules (A161 -- A171)
3  Quick Reference to Processing Rules by Function-Keyword
3.1  Binary Conversion
3.2  Character Test
3.3  Comparison and Generation of Elements
3.4  Date Generation and Conversion
3.5  Default Value Generation
3.6  Dollar-and-Cents Conversion
3.7  Floating-Point Conversion
3.8  General
3.8a  Hexadecimal Conversion
3.9  Insertion of String
3.10  Length Test
3.11  Multiple Occurrence Conversion
3.11a  Packed Decimal Conversion
3.12  Personal Name Algorithm
3.13  Range Test
3.14  String Replacement, Inclusion, Exclusion, Code Translation
3.15  Time Generation and Conversion

*  SPIRES Actions

******************************************************************
*                                                                *
*                Information Technology Services                 *
*                      Stanford University                       *
*                     Stanford, Ca.   94305                      *
*                                                                *
*       (c)Copyright 1986 by the Board of Trustees of the        *
*               Leland Stanford Junior University                *
*                      All rights reserved                       *
*            Printed in the United States of America             *
*                                                                *
******************************************************************

        SPIRES (TM) is a trademark of Stanford University.

1  Processing Rules: Complete Listing By Number

1.2  Actions Used Only As SEARCHPROC Rules (A6 -- A16)

1.2.0.0.6  * A6

A6 :<NUM>

A6 :P1

The implicit ANDs between search values are replaced with the following depending on the value of P1:

Note that action 45 should be called to break up the search values, but it should precede the A6:

This rule applies only to simple index terms and does not apply to qualifier or sub-index or compound index terms.

1.2.0.0.7  * A7

A7

A7

A7 reparses the search value, which should have been modified to begin with a different SEARCHTERM mnemonic in a previous rule. The input value may be any legal search expression or a combination of search expressions linked by logical operators (AND, AND NOT, OR). The A7 rule then sends the value to be reprocessed.

This rule can thus be used to "disguise" searches that would require multiple indexes, sub-indexes or qualifiers so that they seem to be simple index searches to the user. For example, suppose the AT "index", as it appears to the user, represents an author-title search handled by A7. The user might issue a command such as

but the SEARCHPROC for AT includes rules, such as A36, A48 or A62, that convert "SHAKESPEARE/HAMLET" to "AUTHOR SHAKEPEARE AND TITLE HAMLET". When the A7 at the end of the SEARCHPROC is executed, the new value is reprocessed, as if the original command had been:

Note too that the value handled by the A7 is treated as if it were in parentheses, e.g.,

is treated by SPIRES (after the "AT" SEARCHPROC, including the A7, is executed) as

rather than as:

which would probably retrieve only "Jungle Book" by Kipling, because the final "AND TITLE JUNGLE BOOK" would be applied to the entire preceding search, not just to "AUTHOR KIPLING".

A7 must be the final rule in the SEARCHPROC string. A45 ($BREAK) may not be used in the same SEARCHPROC string. No relational operator other than "=" (or blank) may appear in the search expression referring to an "index" processed by A7. The search value may not be null when the A7 is executed.

The "reprocessed" SEARCHPROC may not include searchterms that also use A7. The "reprocessed" SEARCHPROC may use any of the relational operators, however; this is true regardless of the setting of secure-switch 11. [See B.9.3.2.]

Since the A7-handled searchterm is not associated with an actual index, the linkage section that defines it should include the $NOPASS proc, e.g.,

Since neither passing to nor searching of the named index record-type actually occurs, any index record-type for the subfile can be named there.

1.2.0.0.8  * A8

A8 :<NUM>, <STRING>, <STRING>

A8 : P1, P2, P3

This action requests indirect search processing, discussed in detail earlier in this manual. [See C.12a.] The P3 parameter names a searchterm for the index in another subfile that will be used as the indirect index; the P2 parameter names that subfile. SPIRES will go to that subfile, search the indirect index with the current search value, retrieve the keys of the goal records that search finds, and use those keys to search the current index. The keys in the current index must thus match the keys in the goal records of the named subfile.

If P1 = 1, the search value is applied directly to the indirect index; the value is not processed through the indirect index's SEARCHPROC string. If P1 = 0 (more common), the search value is processed through the indirect index's SEARCHPROCs.

A8 must be the last SEARCHPROC in the rule string; it may not appear in a rule string with A38 or A45. It may be used only in simple indexes; it may not appear as a SEARCHPROC for qualifiers, compound indexes or sub-indexes. [Some of these restrictions do not apply to the indirect index as it exists as an index in the subfile named by P2. See the section on "Indirect Search" for more information.]

The error flag is set if any of the following conditions occur:

 - A8 is not the last action in the SEARCHPROC string;
 - A8 is used after A45 or A38;
 - A8 is coded in a SEARCHPROC string for anything but a simple index;
 - A8 is used after other SEARCHPROC rules involving truncated search, such as A14;
 - the named subfile or searchterm cannot be found;
 - the value processed by A8 is null.

If the subfile name in P2 contains more than one word, or any unusual characters, it should be placed in single quotes, i.e., apostrophes, as in 'SYS PROTO'. Also, if more than one subfile has the subfile name, you can qualify the subfile name with the file name, prefixed by an ampersand, as in '&GG.SPI.FORMATS SYS PROTO'.

1.2.0.1.1  * A11

A11 :<NUM>,<SINGLE CHARACTER>

A11 :P1 ,P2

If any character following the (P1+1)th character is the character P2, then the characters preceding it constitute the start of each search key, and the characters which follow it (if any) consititute a string of characters which must match somewhere within the remainder of the search keys. Note: Typically, search keys are entire phrases, not single words.

This rule applies only to simple index terms and does not apply to qualifier or sub-index or compound index terms.

If an inequality operator (except ~=) or a range operator such as BEFORE is used in a search request and the SEARCHPROC uses A11, the portion of the search value after and including character P2 is discarded for the search.

1.2.0.1.2  * A12

A12 :<NUM>

A12 :P1

This action supplies an operator for compound index or qualifier requests if none has been supplied in the search request. Thus, 'Mnemonic Value' becomes 'Mnemonic Operator Value' with operator specified by P1 from the following list:

  Operator  P1   Operator  P1   Operator  P1   Operator  P1   Operator  P1
     =       1      <=      4    Before    7    String   10    Prefix   13
    ~=       2       >      5    After     8    Mask     11    Word     14
    >=       3       <      6    With      9    Having   12    Suffix   15

If this action is not included in the SEARCHPROC of an access or qualifier or P1 does not have a value taken from the above list, then 'Mnemonic Value' assumes 'Mnemonic = value' in the search request.

Note: This is the only action that can be specified in the SEARCHPROC of a compound index, and it applies to all elements in the index.

1.2.0.1.3  * A13

A13 ,<CHARACTER STRING>

A13 ,P2

If there are record keys whose first N characters match the N characters of the search value and whose N+1st character is one of the P2 characters, then the pointer groups in these records are ored onto the result stack

This rule applies only to simple index terms and does not apply to qualifier or sub-index or compound index terms.

1.2.0.1.4  * A14

A14 :<NUM> ,<SINGLE CHARACTER>

A14 :P1 ,P2

If the final (nth) character of the search value is character P2, then the pointer groups of records with keys whose first N-1 characters match those of the search value are "or"ed onto the result stack. The P1 parameter may be used to set a minimum length for this character string. The error flag will be set if N-1 is less than or equal to P1.

Note: SEARCHPROC=A31/ A44,#0000#,#00#/ A14,#00#; will cause automatic truncated searching. July 27, l952 will be retrieved by: FIND DATE 1952 or by FIND DATE JULY 1952.

This rule applies only to simple index terms and does not apply to qualifier or sub-index or compound index terms.

1.2.0.1.5  * A15

A15

A15

If no record is found with a key that matches the search value and if the record with the alphabetically next smaller key has a match between its key and the initial characters of the search value, then that record is retrieved.

This rule applies only to simple index terms and does not apply to qualifier or sub-index or compound index terms.

1.2.0.1.6  * A16

A16

A16

If no record is found with a key that matches the search value, the alphabetically next higher record is retrieved.

This rule applies only to simple index terms and does not apply to qualifier or sub-index or compound index terms.

1.3  Actions Used as INPROC, OUTPROC, SEARCHPROC or PASSPROC Rules (A21 --  A66)

1.3.0.2.1  * A21

A21 :<NUM>

A21 :P1

The alphanumeric integer constant is converted to fixed binary. If P1 is 4, the four-byte result replaces the nonconverted value. If P1 is 2, the two-byte result replaces the nonconverted value. If P1 is 1, the one-byte result replaces the nonconverted value. If P1 is 0, the nonconverted value is retained.

Leading or trailing blanks are allowed, and a leading sign (+ or -) may be surrounded by blanks. The error condition is set on if the value contains anything other than a sign and digits, or if the value is too big for the designated space. For P1=1, the error condition is set on if the value is smaller than -256 or larger than 255; if a value from -1 through -256 is entered, it is translated according to the table below without signalling an error condition. For P1=2, the error condition is set on if the value is smaller than -65536 or larger than 65535; however, if a value from 32768 through 65535 or a value from -32769 through -65536 is entered, it is translated according to the table below without signalling an error condition. For P1=4, the error condition is set on if the value is smaller than -2,147,483,647 or larger than 2,147,483,647. The fact that values outside certain ranges are translated without warning for P1=1 or 2 makes these P1 values unacceptable if the range is later to be validated by A24; a P1 of 4 should be used on A24.

If values outside the "stored" ranges are input, and they are inside the "entry" ranges noted above for P1, then they will be converted to values inside the "stored" range. If values outside the "entry" ranges are input, an error is signalled.

The default value is the nonconverted number if P1 is 0 or zero if P1 is 1, 2, or 4. If 8 is added to any of the above P1 values, then a null input value is allowed.

1.3.0.2.2  * A22

A22 :<NUM> ,<NUM>

A22 :P1 , P2

The value is tested to see that it is not longer than P2 characters. The error condition is set on if the value contains too many characters. The default recovery action depends on the P1 parameter as follows:

1.3.0.2.3  * A23

A23 :<NUM> ,<NUM>

A23 :P1 ,P2

The value is tested to see that it is not shorter than P2 characters. The error condition is set on if the value contains too few characters. If P1 is 0, then the default recovery is to retain the original value. If P1 is 1, then the default recovery is to add enough blanks to the right end of the value to make it P2 characters long.

1.3.0.2.4  * A24

A24 :<NUM> ,<NUM> ,<NUM>

A24 :P1 ,P2 ,P3

If the incoming value is binary, then the following applies:

The binary value is tested to see that it is not numerically greater than P2 or numerically less than P3. The error condition is set on if either of the limits is exceeded. The value is replaced with the value of the violated limit. If the converted value is 2 or 4 bytes long and the sign bit is set, then the value is taken as negative in the tests. Likewise, if the sign bit of P2 or P3 is set, those values are taken to be negative. The value must be binary; this action usually follows an A21 (convert string to binary). The P1 parameter has no effect when the action is used for binary values (but see the discussion below).

Here are the boundary limits for P2 and P3: -2139999999 <= P <= 2139999999.

If the incoming value is a packed decimal, the action provides several types of range tests, depending on the value of P1. (See also A67, which provides a simple range-testing capability for packed values.) EXPLAIN PACKED DECIMALS for more information about some of the concepts used below.

For all the packed range tests described below, P2 represents the maximum limit and P3 represents the minimum limit. Both P2 and P3 must be integers. (Note: if P3 > P2, then P2 is raised automatically to equal P3.) In all cases, the error flag is set if the specified range is exceeded. Unlike the case for integers described above, the input packed value is never modified by this action.

For P1=0, the range specifies "decimal places" allowed in the input value. For example, AS24:0,2,0 means the input packed value may have from 0 to 2 decimal places; otherwise, a serious error occurs.

For P1=1, the range specifies the range of the exponent allowed. The maximum allowed range for the exponent of a packed value is -128 to 127.

For P1=2, the range specifies the allowed magnitude of the value.

For P1=3, the range specifies the allowed precision of the value.

For P1=4, the range specifies the allowed sign of the value (i.e., whether the value can be positive or negative). In this case, P2 and P3 must be integer values from -2 to 2, as follows:

For example, AW24:4,0,-2 would allow values from -@@ up to and including 0; positive packed values would set the error flag. The action AS24:4,1,-1 would allow all numeric values except positive or negative infinity.

1.3.0.2.5  * A25

A25 :<NUM>

A25 :P1

The alphanumeric real constant is converted to floating point.

If P1=2, the double precision result replaces the value.
If P1=1, the single precision result replaces the value.
If P1=0, the nonconverted value is retained.

The error condition is set on if the value contains unrecognizable characters or is outside the allowed range; the value returned when the error flag is set is "0" (zero). The default value is the nonconverted number if P1 is 0 or zero if P1 is 1 or 2.

The range of allowed values for a single precision result is:

  -7.237E75 <--  -5.4E-79   0   5.4E-79  --> 7.237E75

allowing as many as seven places of accuracy.

1.3.0.2.6  * A26

A26 ,<REAL NUM> ,<REAL NUM>

A26 ,P2 ,P3

The result of a previous floating point conversion that returned a converted value is tested to see that it is not numerically greater than P2 or less than P3. The error condition is set on if either of the limits is exceeded. The value is replaced with the value of the violated limit.

1.3.0.2.7  * A27

A27 :<NUM>

A27 :P1

The last digit of the input value is set aside, and the remainder of the input value is processed by action 21. The result of action 21 is then processed by either a MOD-11 rule (P1<8) or by a student services rule (P1>=8 but <16) or by the "modified student services rule" (P1 >=16) to obtain a single digit. If the set aside digit matches the calculated digit, the input value is considered valid, otherwise an error condition is flagged. The value stored is the result from the action 21 processing and uses the P1 parameter the same as action 21. Add 8 to the P1 parameter to use the student services rule. Add 16 to the P1 parameter to use the modified student services rule.

The check digit computation for P1<8 is performed as follows: Each digit in the original number (the number to be augmented by a check digit) is multiplied by 2+n, where "n" is the number of digits between the digit being multiplied and the decimal point. The results are then summed. For example, if the original number is "175", then:

The sum, "35" in this example, is then subtracted from the next larger multiple of 11, than this result is the check digit appended to the value. If the result of the subtraction is 10, then the check digit is 0. Continuing the above example:

The check digit on "175" is "9", yielding "1759".

The check digit computation for P1>=8 but <16 (the "student services" rule) is done as follows: After leading zeroes are discarded, the number consists of n digits: the leftmost non-zero digit is called "D(1)", the next "D(2)" and so forth, to the last digit "D(n)", which is the check digit. First compute the following total:

Then divide the total by 10, and the remainder is the check digit "n". For example, if the number 1575 is entered:

The value of d(4) should be the check digit. The computation confirms that:

Dividing 45 by 10 returns a remainder of 5, which was the check digit given.

The modified student services rule is the same as the student services rule described above, except that leading zeroes are taken into account, rather than discarded. If this version is used, be sure that both input and output values are padded to the proper length with zeroes. For input, that might mean coding the rule "A36:2,0,n" to specify that the value be overlayed from the right on a field of "n" zeroes. (That can be done on output by adding 1 to the P1 parameter on A77.)

1.3.0.2.8  * A28

A28 :<NUM>

A28 :P1

The alphanumeric time value is converted to a 2 byte binary value. The standard forms of time specification are based on a 24 hour clock. If P1=0, then time may be specified as seconds, as minutes and seconds, or as hours, minutes and seconds:

If P1~=0, then time may be specified as hours, as hours and minutes, or as hours, minutes and seconds:

Only digits and colons are processed, all other characters are ignored. The alphanumeric time value may not be null. The resultant binary value is suitable for output using action 73.

Note: Values higher than 36:24:30 wrap around to 00:00:00. Any "odd" numbered seconds will be rounded down to the nearest "even" number of seconds; for example: 13:24:25 becomes 13:24:24.

1.3.0.2.9  * A29

A29 :<NUM> ,<NUM>

A29 :P1 ,P2

The alphanumeric hex string is converted into bit string form. If P2 is zero then the value which is stored will be half the length of the original value (rounded up to an even number). If the length of the original value is odd, the error flag is set if P1=0, otherwise an odd length value is not an error.

If P2 is not zero then it specifies a limiting length for the stored number. The error flag is set if the original value is greater than 2 * P2 characters in length. In this case only P2 characters are stored disregarding the leftmost characters. If the original value is less than or equal to 2 * P2 characters in length, the value is padded on the left with zeroes and P1 is tested. If P1=0 then the value stored will be half the length of the original (rounded up to an even number). Otherwise P2 characters are stored.

The hex string is tested for erroneous characters or blanks.

1.3.0.3.0  * A30

A30: <NUM>

A30: P1

This processing rule provides several different ways to handle the case (upper or lower or mixed) of the value. If P1=0, all lowercase letters in the value are replaced by uppercase letters. If P1=1, all uppercase letters in the value are converted to lowercase.

If P1 is 2 or 3, then only the first letter of each word in the value is converted to uppercase (P1=2) or lowercase (P1=3). If P1 is 4 or 5, only the first character of the entire value is converted to uppercase (P1=4) or lowercase (P1=5). ("Word" here means any string whose component characters are lexically greater than HEX 7F and which is delimited by characters lexically less than HEX 80; this would include alphabetic or numeric words, separated by blanks, commas, or most other punctuation. Refer to an EBCDIC chart for details.)

If P1=10, the entire value is converted to lowercase and then the first character of each word is converted to uppercase. If P1=11, the entire value is converted to uppercase and then the first character of each word is converted to lowercase.

If P1=12, the entire value is converted to lowercase and then the first character of the entire value is converted to uppercase. If P1=13, the entire value is converted to uppercase and then the first character of each word is converted to lowercase.

1.3.0.3.1  * A31

A31 :<NUM>

A31 :P1

The alphanumeric date is converted to a 4 byte hexadecimal value of the form CCYYMMDD if P1 is 0. If P1 is 1 the value is unaffected. If CC is not supplied, 19 is assumed. The error condition is set on if the value is not one of a standard set of date formats, or if the converted date would be ambiguous.

          12 March 76                              = 03/12/1976
          03/76                                    = 03/--/1976
          The 12th day of March in '76             = 03/12/1976

This rule does check the validity of dates, and only valid dates are allowed within a given month. For instance, "September 31" would cause an error. Also, "Feb. 29, 1980" would be acceptable, but "Feb. 29, 1979" would cause an error. The only exception (allowed date that shouldn't be) is "Feb. 29" in any century year not evenly divisible by 400 (these are not leap years), which does not cause an error.

1.3.0.3.2  * A32

A32 :<NUM> ,<RECORD NUMBER> ,<ELEMENT>

A32 :P1 ,P2 ,P3

The value input to A32 is used as the key of a record in order to access record-type P2; the input value must match the internal form of the record key (although the types need not match). If P1 is 3 then the value is replaced by the first occurrence of element P3 (in its internal form) of the record retrieved. Similarly, if P1 is 0, then the value is replaced by the first occurrence of element P3 in its external form.

If P3 is given a value of -1 and if P2 indicates a REMOVED record-type, then the value is replaced by the locator to the record retrieved. If no record is retrieved, the error flag is set on and the value is unaffected.

If P1 is 2 then the value is unaffected and the error flag is set on if no record is retrieved. If P1 is 1 then the value is unaffected and the error flag is set on if a record is retrieved.

The element P3 is restricted to be the first occurrence of the element within the record or structure. P3 is defined as either just an element number (record level) or as a structure number followed by an @ symbol and then the element number within that structure. P3 may be any element in the record, including virtual elements.

If 4 is added to any P1 value above, then the original value is assumed to be a locator to index record-type P2. This is especially useful as an OUTPROC action on the locator elements of an index.

If 8 is added to any P1 value above, then the deferred queue will not be examined for records of the accessed record-type. This will save one I/O per transaction.

An alternate form of this rule is allowed in file definitions:

which allows you to specify the name of the record-type and an element within that record-type. This form is not allowed in format definitions. If a record name is used, then an element name (not an element number) must be used; vice versa, if a record number is used, then an element number must be used. Warning: If this form is used in SEARCHPROCs or PASSPROCs, the named record-type must be lower sequentially than the name of the index record-type. For example, the PASSPROC for an element in REC01 being passed to REC03 can have A32,REC02,ELEM-A since REC02 precedes REC03 sequentially; A32,REC04,ELEM-A would not compile properly, however. In such cases, use the record number rather than the record name in the SEARCHPROC or PASSPROC.

The value is used as a key of a record in order to access record type P2. The value is replaced by the value of singularly occurring element P3 of the record retrieved. (This is the same as a P1 of 3 above; no other uses of this action as a PASSPROC are allowed.) If P1=0, then the retrieved value is forced to uppercase; if P1=1, then the value is not forced to uppercase. If no record or no value in the record is retrieved, then no further pass processing for the value takes place; no error flag is set on. Either of the above forms, using record and element names or numbers, is permitted.

Note: The first record-type defined is record number 1. The first element defined is element number 0. In a slot record-type, the slot number is element 0. "Indirect Record-Access," contains details and examples of the use of this action. [See C.5.]

Efficiency considerations: In a file definition, A32 causes the base block of the record-type being accessed to be locked in core. In a format, the action causes the base block of the accessed record-type to be locked in core, as is the retrieved record, so that subsequent access to the same record in that record-type will cause no additional I/O.

1.3.0.3.3  * A33

A33 ,<PARM> (...,<PARM>)

A33,P+

This rule is used on TYPE=STR data elements. The rule allows a single value to be input for an entire occurrence of the structure. (It does not preclude values being input for the elements in the structure individually.) The input value is broken down into individual components according to the parameters. Each component represents a single occurrence of an element of the structure, each element in sequence. Each component is processed by the INPROC rules (if any) associated with the corresponding element within the structure.

The rule may also be used as an OUTPROC (see below) to put the elements of the structure back together into a single value.

The parameters indicate how the original input value is to be broken into components:

1)  L<number>       Component is next <number> characters.
2)  X<delimiter>    Component is all characters up to but not
                    including the first occurrence of <delimiter>.
                    The next component would begin with the
                    <delimiter> character.
3)  J<delimiter>    Component is all characters up to but not
                    including the first occurrence of <delimiter>.
                    The next component would begin with the first
                    character following the <delimiter>.
4)  I<delimiter>     Component is all characters up to and including
                    the first occurrence of <delimiter>.
                    The next component would begin with the first
                    character following the <delimiter>.
    Delimiters are specified as:

    1) N               Any numeric character, 0 thru 9.
    2) A               Any alphabetic character, a thru Z.
    3) S               Any non-alphanumeric, special characters.
    4) '<single char>' A specific character other than apostrophe.
    5) ''''            An apostrophe character.

    (Note: In EBCDIC, special characters are 00 thru 7F, alphabetic
     are 80 thru EF, and numeric are F0 thru FF.)

  Example: Assume:  ELEM = X;      INPROC = A33,L5,XA,J'/',I'+';
                    TYPE = STR;   OUTPROC = A33,L5,XA,J'/',I'+';
                STRUCTURE = X;
                  FIXED;
                    KEY = X1;  LEN = 5;
                    ELEM = X2;  LEN = 4;  INPROC = A21:4;
                                          OUTPROC = A71,15;
                  REQUIRED;
                    ELEM = X3;  OCC = 1;
                    ELEM = X4;  OCC = 1;

           With the following input:     X = APPLE-234sample/input;

           The components are:  X1 = APPLE;
                                X2 = -234;     (converted to binary)
                                X3 = sample;
                                X4 = input;

           With the following input:
               X = BREAD17my test case/your output;
           The components are:  X1 = BREAD;
                                X2 = 17;    (converted to binary)
                                X3 = my test case;
                                X4 = your output;

When this rule is used as an OUTPROC for a TYPE=STR data element, the individual element values within the structure are processed by their OUTPROC rules (if any) and then combined together to form a single value for the TYPE=STR element according to the parameters. Normally the INPROC and OUTPROC rules (A33) are the same. (In the standard SPIRES format, a structure that has A33 coded for an OUTPROC but not for an INPROC will ignore the A33 OUTPROC -- for the A33 to be recognized on output, it must also be coded for input. Note, however, that a custom format may use A33 in an OUTPROC even though the structure's INPROC does not have an A33.)

J<delimiter> specifications cause <delimiter> to be appended to the individual value. The character appended for <delimiter> specifications of N, A, or S are: N='9', A='X', S=' '. L<number> specifications cause blank padding if the value is shorter than <number> characters.

Note: A33 may not be used with A45 or A37 in the same INPROC. If an INPROC on an individual element within a structure input via A33 contains an A45 or A37, then only the first occurrence of that element will be retained in the record. If A33 is used with A61 (Save and Restore Value), then no A61 can follow the A33 in the rule string, and no save area value may exist when A33 is encountered.

1.3.0.3.4  * A34

A34 ,<NUM>

A34 ,P2

The last digit in the alphanumeric value is used for check digit testing. All but the last digit are converted into a fixed binary value and the result is divided by P2. If the remainder of the division does not match the check digit, then the error flag is set on. The alphanumeric value is not replaced.

The limit of the value (without the check digit) is 2,147,483,647.

1.3.0.3.5  * A35

A35 :<NUM> ,<SINGLE CHARACTER>

A35 :P1 ,P2

This action may be coded only for the key element of a non slot record type. It must be the first action coded in either an INPROC or OUTPROC string. For an INPROC string, the P1 parameter specifies the length of a value which is added to the key by the system to generate a unique key value. This augmented portion is a one, two or three byte binary value that is concatenated to the fully converted key (but only after all other INPROC Actions are complete). Thus if P1 = 1 a one-byte value is used with a range of 0 through 254. If P1 = 0 a two-byte value of 0 through 32766 will be added. If P1 = 3 a three-byte value from 0 to 16,777,214 will be added. The P2 field gives a character which is scanned for in the input value. If the character appears then it is assumed that the characters to the right of the P2 character are to be converted and saved as the known augmented portion of the record key for record search purposes. (If the P2 character ends the input value, the value will be augmented as if the character were not present.) If the P2 character is not found then if the request is an ADD, SPIRES will augment the key with a binary value one greater than the highest augmented portion currently existing for that key. For example, if P2=# and the input value is: RECKEY = KEYV then if no other KEYV key exists, KEYV#0 is assigned to RECKEY. If a value of KEYV#50 exists, then RECKEY will be KEYV#51 following the ADD. To access a specific record, the fully qualified key must be given (eg. DISPLAY KEYV#17).

For an OUTPROC string, P1 and P2 must have the same values as does the corresponding INPROC Action. The fully converted key value will be augmnted upon output by the P2 character followed by the converted binary value whose internal length is determined by the P1 value.

Note: This action can be used to conserve slot record-types in a file by allowing a record that would be slot to be non-slot. A file may have only four slot record-types, none of which may be COMBINED with other record-types. A35 can also be used to reduce the use of the expensive SEQUENCE command when producing reports. If reports are most often produced using one element as the sort-key, then it may be advantageous to make that element the record-key; SPIRES will DISPLAY records in key-sequence when record subsetting was done entirely with Global FOR.

1.3.0.3.6  * A36

A36 :<NUM> ,<CHARACTER STRING> ,<NUM>

A36 :P1, P2 ,P3

If P1 is 0 then: The P2 string is appended to the data value if P3 is 0, otherwise the P2 string is inserted into the data value to the left of the P3-RD character of the data value, counting from the left end of the string. No insertion is attempted if the original data value is shorter than P3 characters.

If P1 is 3 then: The P2 string is inserted before the data value if P3 is 0, otherwise the P2 string is inserted to the right of the P3-rd character of the data value, counting from the right end of the string. No insertion is attempted if the original data value is shorter than P3 characters.

If P1 is 1 or 2 then: The P2 string is replicated as many times as necessary to create a string which is P3 characters long. Then the original data value is overlayed onto this string either at the front if P1=1 or at the rear if P1=2. The error flag is turned on if the length of the original value is greater than or equal to P3, and the original value is unmodified.

In all cases, the error flag is turned on if the final value exceeds MAXVAL characters, in which case the original value is unaffected.

1.3.0.3.7  * A37

A37 ,<NUM>

A37 ,P2

If the value has more than P2 characters in it, the first P2 characters are treated as an occurrence of the element and the remainder are treated as a second occurrence. This action may not be used with A45.

1.4.0.3.8  * A38

A38 :<NUM>

A38 :P1

For INPROC, the value is forced to upper case and then blanks are squeezed in the same manner as for A40. A blank is then prefixed to the value, and all blank bytes are then replaced by a byte containing the length of the non-blank portion which follows (maximum of 255). For OUTPROC, all length bytes are replaced by blank bytes and the leading blank is eliminated. This action is most frequently used with the "remaining" element of a personal name in an index record. (See PASSPROC).

This action processes a name for the key of an index record (or structure) and the key of an associated structure element. The name being processed is split into two parts, depending on commas. The key of the index record (or structure) is defined by the "surname" part and the key of the associated structure element is defined by the "remaining" part. The two parts are determined as follows:

   1)  Value without commas:

The last non-blank portion of the value is the "surname" part, and all other non-blank portions of the value constitute the "remaining" part.

   2)  Value with one or more commas:

The last non-blank portion of the value preceding the first comma defines the "surname" part, and all the non-blank portions following that comma until the next comma or end-of-value (whichever comes first) followed by the remaining non-blank portions of the value preceeding the "surname" part constitute the "remaining" part.

For PASSPROC, P1=0 operates as just described, but if P1=1 then PASSPROC will build an additional "surname" and "remaining" part if the value contains one or more commas, and more than one non-blank portion precedes the first comma. In such a case, the first non-blank portion of the value defines another "surname" and all the non-blanks portions following the first comma up to the second comma or end-of-value (whichever comes first), defines the associated "remaining" part.

PASSPROC Examples:

      NAME                        SURNAME     REMAINING
      Smith, John                 Smith       John
      Sir Walter Raleigh          Raleigh     Sir Walter
      Jesus Christ, Lord          Christ      Lord Jesus
          (additional for A38:1)  Jesus       Lord
      Kirk Patrick, John Thomas   Patrick     John Thomas Kirk
          (additional for A38:1)  Kirk        John Thomas
      Mao Tse Tung,               Tung        Mao Tse
          (additional for A38:1)  Mao
      William Bryan,,Lawyer       Brian       William
          (additional for A38:1)  William

PASSPROC Sample Definition:

      INDEX-NAME = Rec-name;  or  SUB-INDEX = Structure;
        SEARCHTERMS = Search-mnemonics;
          PASSPROC = ---- / A38;
        SUB-INDEX = Structure;
          SEARCHTERMS = Dummy-mnemonic;
            PASSPROC = A165;
      Note:  A165 must be used as shown when A38 is used.

As a SEARCHPROC, A38 is used to convert a name supplied in a search command into a valid form for index searching. The flexibility in forms of a name that the searcher may supply depends on the P1 parameter. In most applications, the default (P1 = 0) is selected, since it gives the searcher the most possibilities. In such cases, the first name or names may be omitted or abbreviated to single letters (see the example below). However, first names must be in the precise order in which they appear in the retrieved record (see examples 6 and 11 below). If P1 is 1, then no abbreviating of the first name(s) is allowed. Also, if more than one first name appears in the search value, then they must be in the order in which they appear in the index with no first names in between missing (see example 5 below). If P1 is 2, then either the complete first name in order or no first name will retrieve the values.

Suppose the user is trying to find records for Carl Philipp Emanuel Bach. The chart below indicates for the various P1 parameters whether a given search value would retrieve such a record.

1.4.0.3.9  * A39

A39 :<NUM> ,<NUM>

A39 :P1, P2

The value is converted to packed decimal form. The input value can be character or binary (1-4 bytes). For example, "10", "12.345", "-428E_5" and "-1776E56" are possible character values.

Leading and trailing blanks are stripped from the value. What remains can be:

All parts are optional, though there must be digits somewhere in the value. Otherwise, the error flag is set. (There is one exception to these rules: the values @@ and -@@, which indicate positive and negative infinity, can be entered as well.)

The input value is first adjusted so that it begins with an integer followed by an exponent. For example, "12.345" is adjusted to "12345E_3", and "1.2E4" is adjusted to "12E3". The value stored consists of one byte containing the exponent (ranging from -128 to 127), a byte to contain a sign character and the final digit of the integer, and then a byte for each two digits in the remainder of the value:

where "d" represents a digit, "s" represents the sign character, and "exp" represents the exponent. Thus, the minimum length for a stored value is two bytes. The storage length is controlled by the P1 and P2 parameters.

Basically, P2 states a length in bytes for the stored value. For example, if P2 is 2, then the stored value will be two bytes long. P2 must not exceed 256. If the converted value will not fit into P2 bytes, the error flag is set. If the converted value would fit in less than P2 bytes, then zeroes are prefixed to the value to make it P2 bytes long (unless 4 is added to P1; see below).

If P2 gives a "length" of 0, then the converted value will be stored in the minimum number of bytes possible, meaning that the storage length will vary depending on the precision of the number. The length will never exceed 256 bytes, however.

You can specify that the stored value should be no more than P2 bytes long but should be stored in the minimum number of bytes possible (like a combination of P2=0 and P2~=0) by coding the P2 maximum length and adding 4 to the P1 parameter.

Also for P1: Begin with P1=0 and add to it according to the options desired as described below. (You may add nothing or choose several different options, increasing the value of P1 as directed for each.)

By default, when P1 is 0, any form described above is allowed for input. If 1 is added to the P1 value, then decimal point and exponent input are not allowed. For example, "123" would be allowed, but not "1.23" or "123E5". The error flag is set if an illegal value is entered.

By default, trailing zeroes after a decimal point are left on the input value (e.g., 3.5000). If 2 is added to the P1 value, then trailing zeroes for values having negative exponents are removed after the value is adjusted for storage; the exponent is raised accordingly. For example, the input value 3.5000 is first adjusted to 35000E_4. Then, if 2 has been added to P1, the value to be stored would be changed to 35E_1. Each zero stripped raises the exponent by 1; as long as the final exponent created is less than or equal to zero, trailing zeroes are removed. The value 350.00 would be stored as 350E0.

Packed decimal values are usually processed by either A80 or A85 on output. Several other valuable processing capabilities for packed decimal values are provided by A55.

1.4.0.4.0  * A40

A40

A40

Groups of more than one blank in the value are replaced by a single blank. All leading and trailing blanks are stripped. The result replaces the value. (Since A40 removes trailing blanks, coding "A40/A51" is unnecessary.)

1.4.0.4.1  * A41

A41 :<NUM>

A41 :P1

The input value is assumed to be one of the forms specified below. The title portion preceded by comma or double comma is optional.

The input value is converted to one of the forms above as specified by the following table:

  Input value of form:    1   2   3   4   5   6
  Final form for P1=0:    1   1   1   4   4   6
  Final form for P1=1:    2   2   2   5   5   6

When P1=2, values input with a comma are left as input, but values input without a comma are processed as for P1=1.

Example:  When P1=0,
          A) John Von Schroeder,,Dr.
             would not be converted.
          B) Schroeder, John Von,Dr.
             would be converted to:  John Von Schroeder,,Dr.
          C) Schroeder, John
             would be converted to:  John Schroeder

          When P1=1,
          A) John Von Schroeder,,Dr.
             would be converted to:  Schroeder, John Von,Dr.
          B) Von Schroeder, John,Dr.
             would be converted to:  Schroeder, John Von,Dr.
          C) John Schroeder
             would be converted to:  Schroeder, John

          When P1=2,
          A) Von Schroeder, John
             would not be converted.
          B) John Von Schroeder
             would be converted to:  Schroeder, John Von

Note: If an element processed by A41 as an INPROC is to be used to sequence results in last name alphabetical order, then the last name must be stored first, as with A41:1 or A41:2.

1.4.0.4.2  * A42

A42 :<NUM>

A42 :P1

The value is tested to see if it obeys the conventions for dollar and cents or decimal quantities. The error flag is set on if the value is not in the proper form which must be one of the following: ($)D, ($)D., ($)D.CC, or ($).CC, where D is a string of digits, CC is one or two digits (depending on P1), and ($) is an optional dollar sign. Leading and trailing blanks are stripped, and there may be a leading "+" or "-" sign either before or after the dollar sign.

With P1 values of 0 to 7, A42 is designed for dollar-cents values. If P1=0 or 4, the input value will be unaffected. If P1=1 or 5, the input value is replaced by a single precision (4 byte) floating point equivalent, whose value may be output with A81:0 or A81:1. If P1=2 or 6, the input value is replaced by a (4 byte) binary equivalent, whose value may be output by A81:2 or A81:3. The binary value is always an integer in "cents". (The range of values for a binary value is -21474836.47 to 21474836.47.) For P1 values of 4 or more, the CC field on input may be one or two digits. If P1 is less than 4, then CC, if it occurs, must be two digits; if it is not, then an error condition will result. Thus, for P1 of 4 or more, $3.5 is equivalent to $3.50.

With P1 values of 8 to 15, A42 is used to store decimal values. The stored value may have from 0 to 7 places of decimal accuracy, depending on the value of P1; the value "P1-8" is the number of places of accuracy. The input value is assumed to have that number of decimal places; if it does not, zeroes (and a decimal point, if necessary) are appended. For example, if P1 is 11, then the value is given three decimal places of accuracy. The input value "1.234" would be unaffected; "1.23" would have a zero appended: "1.230"; the value "1" would be changed to "1.000". The decimal point is then removed from the value, which is then converted to a four-byte integer for storage. The stored value may be reconverted by the edit processing rule A85. Thus the above values would be stored as 1234, 1230 and 1000 respectively.

For P1 of 8 to 15, the error flag is set if the input value contains more than "P1-8" decimal places or if the value after the decimal point is removed is less than -2,147,483,647 or greater than 2,147,483,647.

1.4.0.4.3  * A43

A43 ,<CHARACTER STRING> ,<CHARACTER STRING>

A43 ,P2 ,P3

The value is converted into a different character set. Each character of the original value is looked up in the P2 string. If the character is found in the P2 string then it is replaced by the corresponding character from the P3 string. The translated result replaces the value. If the P3 value is a single character then each occurrence of any of the P2 characters is replaced by the single character in P3. If P3 is not a single character then strings P2 and P3 must be the same length.

1.4.0.4.4  * A44

A44 :<NUM>, <CHARACTER STRING> ,<CHARACTER STRING>

A44 :P1, P2 ,P3

The value is scanned for the P2 string. When an occurrence of this string is found, it is replaced by the P3 string, if P1=0. If P1=1, then the P2 string and the 1 character following it are replaced by P3. If P1=2, then the P2 string and the 2 characters following it are replaced by P3. P1 values of 0 to 7 may be used in this manner to indicate the number of characters after the P2 string that are to be deleted or changed. There must be at least P1 characters following string P2 for processing to occur. P3 may be null. The error flag is set on if the P2 string is not found or if insufficient characters follow the P2 string for processing or if the converted value exceeds MAXVAL characters in length. In all cases of errors, the original value is retained.

For P1 values of 8 to 15, processing is as for P1 of 0 to 7 respectively, but the length of the value being processed must be:

or the value is not processed. This allows processing only if all of a value matches the P2 string.

1.4.0.4.5  * A45

A45 : <NUM> ,<SINGLE CHARACTER>

A45 : P1 ,P2

The value is really a string of values separated by delimiters. The delimiter may be a space or character P2 surrounded by optional spaces. The string is broken up into its separate parts, and each part is treated as an occurrence of the element; the delimiter, and leading and trailing blanks are discarded.

If P1 is non-zero, individual values may contain the delimiter character if the individual value is surrounded by apostrophes (') or quotation marks ("). In particular, if P1 is 1, then the value will not be broken up at delimiters that are between apostrophes. If P1 is 2, the value will not be broken up at delimiters that are between quotation marks. If P1 is 3 (1+2), then the value will not be broken at delimiters that are between pairs of apostrophes or quotation marks. Note that the apostrophes or quotation marks will be considered part of the individual value. For example,

If P1 were 0, the same value would be split into separate values at every single comma, regardless of the quotation marks and apostrophes.

Note: The P2 parameter of A45 must be a single character. If the delimiter is several characters, use A44 to change this delimiter string to a single character that would not occur in the value (such as an unprintable hex character) and then use A45 to break on that character. For example: INPROC=A44,'//',#01#/A45,#01#;

Note: All actions following the A45 in a processing rule string are repeated for each occurrence of the element that is generated by the A45. All actions up to and including the A45 are executed only once, operating on the entire original value.

Note: the SEARCHPROC for a sub-index should not contain an A45. The SEARCHPROC for the simple index containing a sub-index may have an A45 coded in it; however, value breakup from the A45 and sub-index use should not occur in the same search command. For example, if the breakup character is a blank, either of these commands will work properly:

But this command would fail:

This rule cannot come between a pair of A61s in a rule string. See the details under "A61".

You should not use more than one A45 per rule string.

1.4.0.4.6  * A46

A46 :<NUM> (,...., VALUE)

A46 :P1 ,p+

The alphanumeric value is matched against the string of codes that make up the multiple occurrences of P+. There may not be more than 255 occurrences. A null value can be used as an occurrence of P+. If P1 is 2 then the value is replaced by a short integer containing the relative position of the code that matches the value. If P1 is 1, then the value is replaced by a byte containing the relative position of the code that matches the value. The short integer or byte value is suitable for output using OUTPROC action A75 having a duplicate string of codes. If P1 is > 2, the value is unaffected if a match is found. For all of these P1 conditions the error flag is turned on if the value does not match a code in the list. For P1=2 or 1, the highest code number+1 is returned as a default value. For P1=0 the value is abandoned when a match is found and the error flag is set on. P1=0 is used for exclusion lists.

This action allows exclusion on output, but only with P1 = 0. Elements containing values matching the supplied list of values in this action are excluded from output. Note that a null valued element is always excluded.

The alphanumeric value is matched against the string of values that make up the multiple occurrences of P+. There may not be more than 255 occurrences. If P1=1 and a match is not made, or P1 ~=1 and a match is made, then the value is not passed. For P1=1, P+ is an inclusion list and only values contained in P+ are passed. For P1 ~= 1 (P1=0), P+ is an exclusion list and only values which are not included in P+ are passed. A null value ('') can be included in P+.

1.4.0.4.7  * A47

A47 :<NUM> ,<NUM>

A47 :P1 ,P2

This action allows for inclusion or exclusion of values depending on their character length. If the value length is zero or P2=0 then this rule does nothing, otherwise:

1.4.0.4.8  * A48

A48 :P1 ,VALUE, VALUE (,....., VALUE)

A48 :P1 ,P+

The multiple occurrences of P+ are really pairs of character strings which are to be used in the same way as the single pair of strings in action 44. The value is scanned for each of the first strings of the pair in turn. If a match is made then that string is replaced by the other string of the pair. The second string of a pair may be null. Like action 44, a P1 parameter of 0 to 7 specifies the number of characters after the matched string that are to be changed. Unlike action 44 a restriction is made on string length. No string can be longer than 16 characters. The error flag is set on if no match is made with the first string of any pair, or if the converted value exceeds MAXVAL characters in length. The original value is retained in the event of an error.

For P1 values of 8 to 15, processing is as for P1 of 0 to 7 respectively, but the length of the value being processed must be:

or the value is not processed. This allows processing only if all of a value matches the P+ string.

Note: A48,'F','FEMALE','M','MALE' will convert 'F' to 'FEMALEALE' because of the 'M' conversion. but A48:8,'F','FEMALE','M','MALE' will not have the same problem, since the third string, 'M', will be found in the value being translated, but it will not have the required length of 1 character, the length of the string 'M'.

1.4.0.4.9  * A49

A49 :<NUM> ,<CHARACTER STRING>

A49 :P1 ,P2

If P1=0 the value is checked to verify that it contains only characters like the P2 characters. If P1=1 the value is checked to verify that it contains only characters unlike the P2 characters. If the verify fails, the error flag is turned on. The value is never modified. Only non-null values are tested -- null values thus do not cause errors. You might want to use A23 (a minimum length test) to be sure the value is not null, if desired.

1.4.0.5.0  * A50

A50 :<NUM> ,<NUM>

A50 :P1 ,P2

For input or search, a value consisting of a set of numbers separated by commas is transformed into a mask of up to P2 bytes where each number in the original value represents a bit position to be set in the final mask. If P1=0, all zero bytes on the right end are truncated. If P1~=0, the mask will be P2 bytes long. For output, the mask is converted back into a set of numbers separated by commas.

1.4.0.5.1  * A51

A51

A51

All blanks starting from the right end of the value are stripped off.

1.4.0.5.2  * A52

A52 :<NUM>

A52 :P1

The value is set to null.

The value is set to null. Also, the following uses of P1 are available:

The value is tested to see if it is of null length. If the value is null, then it is not passed, otherwise, the non-null value is passed. This permits exclusion of null values. The action must follow any action 45 coded in the rule string.

1.4.0.5.3  * A53

A53 :<NUM>

A53 :P1

The first portion of the data value is compared to the current user account. The error flag is turned on if there is no match.

To make data entry of such values easier, you may type an asterisk or period to indicate your own account. For instance, the value "*" or "." indicates the currently logged-on account. For values in which the account is followed by a name, such as a file definition FILE element, the period or asterisk may also be used, though it also represents the account separator (a period) following the account; that is, "GQ.JNK.FILEDEF" and "*FILEDEF" and ".FILEDEF" are all equivalent if GQ.JNK is the logged-on account. Note that the period or asterisk is converted to the user's account before the value is stored.

The system account may be represented by a dollar sign "$" in place of the asterisk if desired. SPIRES will convert it to the appropriate system account.

Unless secure-switch 4 is set, the logged-on user's account must match the account in the element value; otherwise, the error flag will be set. If secure-switch 4 is set, no account comparison is done (though account conversion might be: see P1 >= 8 below).

How SPIRES handles an error for this OUTPROC depends on the value of P1:

If 8 is added to the value of P1, the account will be changed to an asterisk on output if it matches the logged-on user's account. (An exception occurs when the account is the system account, in which case a dollar sign "$" appears instead of an asterisk.) If the stored value has a period following the account, it will be deleted on output. For example, f the logged-on user is GG.UUU, the stored value GG.UUU would be converted to "*"; the value GG.UUU.FILE.NAME would be converted to "*FILE.NAME".

1.4.0.5.4  * A54

A54 :<NUM> ,<NUM>

A54 :P1 ,P2

The input value consists of a set of numeric fields separated from each other by periods, i.e. N.N ...N. Each numeric field must satisfy 0 <= N <= 255 if P1 is 0 to 7; if P1 is 8 to 15, then each field must satisfy 0 <= N <= 32,767. The numeric fields are converted to byte fields if P1 is 0 to 7; and halfword fields if P1 is 8 to 15. The P2 parameter specifies the maximum number of fields.

If P1=1, then the converted value is always P2 bytes long. Trailing zero fields are appended if less than P2 fields are input.

If P1=0, then trailing zero fields are removed from the converted value; a null result is allowed. The error flag is turned on if the input does not consist of numeric fields separated by periods, or more the P2 numeric fields are input, or a numeric field exceeds 255.

P1=2 is the same as P1=0, except a null result is not possible.

Example:

P1 of 8, 9 and 10 operate as P1 of 0, 1 and 2, respectively, except: numeric fields may not exceed 32,767, and for P1=9, the converted value will be (P2 times 2) bytes long.

The value is converted into a set of numeric fields separated from each other by periods. Each byte of the original value is converted into a numeric field for P1 from 0 to 7. Each halfword of the original value is converted into a numeric field for P1 from 8 to 15.

If P1=0 or 8, then each field will consist of one or more digits.
If P1=1 or 9, then each field will consist of two or more digits
   with leading zero digit as needed.
If P1=2 or 10, then each field will consist of three digits with
   leading zero digits as needed.
If P1=3 or 11, then each field will consist of four digits with
   leading zero digits as needed.

The number of fields is dependent upon the size of the original value and the P1 range (0 to 7; 8 to 15). The error flag is turned on if the original value exceeds P2 fields.

1.4.0.5.5  * A55

A55 :<NUM> ,<NUM>

A55 :P1 ,P2

This action processes string values when P1 = 0 or 1, and packed decimal values when P1 > 1.

For strings, this action circular shifts a value left (P1=0) or right (P1=1) by P2 characters. If P2 exceeds the value size, then no shift occurs and the error flag turned on.

  Example: INPUT         ACTION       OUTPUT
           ABXXX         A55,2         XXXAB
           AXXXB         A55,1         XXXBA
           AXXXB         A55,4         BAXXX
           AXXXB         A55:1,1       BAXXX
           AXXXB         A55,9         AXXXB  (ERROR)

When P1 > 1, this proc alters and adjusts packed decimal values. The input must be a packed decimal value; otherwise the error flag is set. The error flag also gets set if the result of any operation is "infinity" (@@). The allowed P1 options are:

When P1 = 2, the packed value will be adjusted to have P2 decimal places, which may mean appending zeroes to the value or discarding the last digits (with appropriate rounding). The action is then equivalent to the function $DECIMAL. For example, if P1 = 2 and P2 = 2,

P1 = 3 is similar to P1 = 2, except that the value is adjusted to have -P2 decimal places (which is the same as specifying the desired exponent for the final value). For example, the same results shown above would happen if P1 = 3 and P2 = -2; "123.46" in packed decimal is "12346E_2". On the other hand, if P1 = 3 and P2 = 2:

When P1 = 4, the action is equivalent to the function $PRECISION. The input packed value is adjusted to have P2 digits of precision, where "precision" is equal to the number of digits in the value counting from the left-most non-zero digit to the right-most digit (whether zero or not). This may mean adding or subtracting precision from the value by adding zeroes to the end or removing digits from the end (and rounding appropriately). For example, if P1 = 4 and P2 = 3,

When P1 = 5, the action is equivalent to the function $WINDOW. Its effect is similar to P1 = 4 above, in that the packed decimal value may be adjusted to have P2 digits of precision. However, precision is never added, only subtracted. Hence, trailing zeroes will not be added if the value has less than P2 digits of precision; digits will be removed (with rounding) if there are more than P2 digits. For example, if P1 = 5 and P2 = 3,

When P1 = 6 or 7, the decimal place of the value is shifted P2 places to the right (P1 = 6) or the left (P1 = 7). This is equivalent to multiplying the value by P2 powers-of-10 (for P1=6) or dividing by P2 powers-of-10 (P1=7). The precision of the value remains the same, but the exponent is altered. For example, if P2 = 2,

(Though shown in decimal point form in the example above, the value remains in its exponential form internally.)

1.4.0.5.6  * A56

A56 ,<CHARACTER STRING>

A56 ,P2

This action assigns a message to the system string variable $UCODE. When a subsequent processing rule causes an error with an error level of W, E or S, this message, along with the standard system message for that processing rule, will be displayed.

This code may be displayed in formats if any subsequent action in the string sets the error condition on. The code is always displayed in the standard system message. The code may not be longer than 128 characters.

Note: A56 specified before an INCLOSE rule has no effect. If the user has set MES to 0 or 1, then no A56 message is output. Multiple A56's may be specified in a processing rule string:

The value of $UCODE is reset to null when the next processing rule string begins.

1.4.0.5.7  * A57

A57 :<NUM>

A57 :P1

A character string is translated in order to reduce its size. If P1 is 0, only alphabetic characters and blanks, dashes, commas and apostrophies are translated. Numbers and other special characters are converted to asterisks. Lower case letters are translated to upper case. This results in an 8 to 5 reduction in size.

If P1 is 1, any character, punctuation or number may be translated but the reduction in size is only 8 to 6. Use action 58 to re-translate.

1.4.0.5.8  * A58

A58 :<NUM>

A58 :P1

A character string translated by action 57 is retranslated to its expanded form. Use the same P1 parameter as used in action 57.

1.4.0.5.9  * A59

A59 :<NUM> ,<CHARACTER STRING>

A59 :P1 ,P2

If the P2 string is smaller than the element, it is replicated until it is as long as the element. (Avoid this overhead when working with small elements.) The element is then converted using the P2 string and a logical operation specified by the P1 number:

The error flag is set on if P1 is greater than 2 or P2 is null

1.4.0.6.0  * A60

A60 :<NUM>

A60 :P1

This action specifies encoding of the element according to an encryption key specified in the "SET CRYPT" command. Its use is to be avoided with any but the most sensitive data, since it relies on the user's memory, and restricts the searching and processing of the data in some instances. Depending on the value of P1, one or another method of encryption will be used. If P1 is 0 through 7, one method will be used; if P1 is 8 through 15, then another method, considered somewhat more secure, will be used. Whichever choice is made, the same P1 value should be coded for all INPROC, OUTPROC and SEARCHPROC rules using A60. [See C.6.20.]

1.4.0.6.1  * A61

A61: <NUM>

A61: P1

This action allows the input value to be saved and later restored. Generally this is done when conversions are to be done against the value before checking with A32, but the unconverted value is to be stored within the record. The P1 parameter determines the save/restore nature of this Action. If P1=0, the current value is saved by copying it to a save area replacing any previously saved value. If P1=1 or P1=2, the saved value replaces any current value by copying from the save area. P1=1 retains the value in the save area for possible copying again. P1=2 releases the save area after the copy. If P1~=0 and there is no value in the save area, the error flag is set on and the current value is not replaced. The save area is always released at the end of all Actions associated with an element, therefore it is not possible to save a value for one element and later restore that value for another occurrence of the same or any different element.

Note that A61 and A45 can appear in the same rule string, but only if no value has been saved when the A45 appears; thus, the A45 can appear before the first of a pair of A61s or following the second, but not between them.

1.4.0.6.2  * A62

A62 :<NUM>, <CHARACTER STRING>

A62 :P1, P2

The P2 string is the name of a USERPROC defined within the RECORD-NAME section containing the INPROC or OUTPROC rule. For SEARCHPROC and PASSPROC rules, the GOALREC-NAME specifies the RECORD-NAME section containing the requested USERPROC. This action is user defined. [See C.11.]

1.4.0.6.3  * A63

A63 :<NUM>, <STRING>, <STRING>

A63 :P1, P2, P3

The value is scanned for occurrences of the P2 string.

For P1=0, the character following any occurrence of the P2 string must be one of the characters in the P3 string, otherwise an error is flagged.

For P1=1, the character following any occurrence of the P2 string must NOT be one of the characters in the P3 string, otherwise an error is flagged.

If 2 is added to either P1 parameter above, then the P2 string may overlap part of itself. Thus: ABA occurs twice in ABABA.

1.4.0.6.4  * A64

A64 :<NUM>, <STRING> (,..., <STRING>)

A64 :P1, P+

The value is scanned for occurrences of each P+ string.

For P1=0, each P+ string may occur OPTIONALLY; but if one occurs, it must occur only once. (OPTIONAL, OCC=1)

For P1=1, each P+ string may occur OPTIONALLY; but if one occurs, it must occur more than once. (OPTIONAL, OCC>1)

If 2 is added to either P1 parameter above, then each P+ string is REQUIRED to occur. (REQUIRED, OCC=1 or OCC>1)

If 4 is added to any P1 parameter above, then any P+ string may overlap part of itself. Thus: ABA occurs twice in ABABA.

1.4.0.6.5  * A65

A65 :<NUM>, <STRING>, <STRING>

A65 :P1, P2, P3

The value input is used as the key of a record in order to access a goal record in subfile P2, whether or not that subfile is in the same file. The input value and the key must be of the same type. (This action is very similar to A32 except that A32 is restricted to record types in the same file.) This action will access the goal record in subfile P2 whose key is the input value, and retrieve the first occurrence of the data element named by P3, which can be any element in the record, including virtual elements.

The P1 parameter determines specifically what is to be done with the accessed record. P1 may be any of the values allowed for the P1 parameter of A32. If P1 is 0, then the value is replaced by the external form (i.e., the form after OUTPROCs are applied) of the first occurrence of element P3 of the goal record retrieved. If P1 is 3, then the value is replaced by the internal value of the first occurrence of element P3. If P1 is 2, the value is unaffected and the error flag is set on if no record is retrieved. If P1 is 1, the value is unaffected and the error flag is set on if a record is retrieved.

If 4 is added to any P1 parameter above, then the original value is assumed to be a locator to the goal record of subfile P2, rather than the key. This is especially useful as an OUTPROC action on the pointer elements of an index.

If 8 is added to any P1 parameter above, then the deferred queue for the subfile will not be examined for the specified goal record. This will save one I/O per transaction.

When you compile a file definition or format containing this action, SPICOMP will not test whether you have access to the named subfile, nor will it test whether the named element P3 is a real element. Both tests do occur during execution of the action, however. Note that if the subfile name is more than one word, it should be placed in single quotes, i.e., apostrophes (for example, 'SYS PROTO'). Also, if more than one subfile has the subfile name, you can preface the subfile name with the file name, which is prefixed by an ampersand (e.g., '&GG.SPI.FORMATS SYS PROTO').

If you want to extract more than one element from the accessed goal record, subgoal processing in formats is the efficient approach. Here, the record would be accessed each time the A65 action was called, which would not be very efficient.

If A65 names a subfile with command logging, the COMMAND LOGGING IN EFFECT FOR THIS SUBFILE message will be displayed when the subfile is first accessed for a lookup. The message cannot be suppressed. If you do not want the message to appear during record updating, you could select the lookup-subfile through a path created by "select commands" [See B.9.6.] or a format could have a startup frame containing an A65 action that was executed when the format was set. [See the manual "SPIRES Formats" for information on startup frames.]

1.4.0.6.6  * A66

A66 :<NUM>, <NUM>, <STRING> (,..., <STRING>)

A66 :P1, P2, P+

This action is used to verify that the P2nd character in the input value either is or is not a character in the P+ strings (P1 = 0 or 1) or that a substring of the input value, beginning with the P2nd character, either matches or does not match one of the P+ strings (P1 = 2 or 3). P+ may be from 1 to 235 strings of 1 to 16 characters each.

If P1 is 0 or 1, the P2nd character within the input value is compared to each character in each P+ string until all characters have been scanned or until a matching character is found. If P1=0 and a match is found, then the action fails, setting the error flag. If P1=1 and no match is found, then the action fails.

If P1 is 2 or 3, the substring beginning with the P2nd character of the value is compared to each P+ string until a match is found or until all the strings have been compared. The comparison is made through the length of each P+ string, as long as that length is less than or equal to the length of the value substring; if the length is greater than the length of the value substring, no match is found. If P1=2 and a match is found, then the action fails. If P1=3 and no match is found, then the action fails.

1.4.0.6.7  * A67

A67 :<RELATIONAL OPERATOR> ,<PACKED VALUE>

A67 :P1 ,P2

The input value is compared to the P2 value by the P1 relational operator. The error flag is turned on if the P1 relation is NOT met, or the input is not PACKED data type. P1 may be =, ~=, >, >=, <, or <=.

For example, AS67:>,12 will set the error flag if the input value is less than or equal to 12. Only input values greater than 12 will pass through without error. The input value is never modified.

1.4.0.6.8  * A68

A68

A68

This action alters an input string such that all blanks, commas and dollar signs are deleted; trailing DB, CR or minus signs are converted to leading minus signs; and trailing plus signs are converted to leading plus signs. Decimal points and exponential signs are ignored. The resulting value (if it is numeric) would then be acceptable as input to actions A39 ($PACK, $DECIMAL) or A42 ($DOLLAR).

For example, here are some values as input to and output from A68:

Note that the case of DB and CR is insignificant.

1.5  Actions Used Only as OUTPROC Rules (A71 -- A85)

1.5.0.7.1  * A71

A71 :<NUM> ,<NUM>

A71 :P1 ,P2

The fixed binary value is converted to a character string. If P1=1, then the converted value is zero padded on the left in order to fill P2 characters. If P1=0, then no padding occurs. The converted value is made up of digits or a minus sign followed by digits. If the converted value will not fit in the P2 characters, then the error condition is set on, but the value is converted anyway. If the fixed binary value is > 4 bytes long or <= 0 bytes, then the error condition is set on and the value is not converted.

1.5.0.7.2  * A72

A72 :<NUM> ,<NUM> ,<NUM>

A72 :P1 ,P2 ,P3

The floating point number is converted to a character string. The result will be either in exponential format or in decimal format depending on the magnitude of the value and P2. The converted value is made up of a possible minus sign, integer portion, decimal point, fractional portion not longer than P3 characters, and a possible exponential portion consisting of the letter E followed by an exponent. (If the exponent is negative, it will be preceded by an underscore character (_), rather than a hyphen (-), to distinguish the exponent from arithmetic.) If the converted value will not fit in the P2 characters, then the error condition is set and the value is not converted.

If P1=1 or 3, then a null value is considered an error. If P1=2 or 3, then trailing zero digits in the fraction portion are stripped, and the decimal point is stripped if the fraction consisted of only zero digits.

1.5.0.7.3  * A73

A73

A73

The value is converted into an alphameric form for time (hours, minutes, seconds) of the form HH:MM:SS. The value should be a two byte representation generated by action 28 or action 128.

1.5.0.7.4  * A74

A74 :<NUM> ,<NUM>

A74 :P1 ,P2

The value is converted into hexadecimal representation. If P2 is zero then the value is converted into hexadecimal for a length twice that of the original value.

If P2 is not zero then it specifies a limiting length for the converted value. The error flag is set if the original value is more than half the P2 limit, but the conversion takes place anyway. If the original value is less than or equal to half the P2 limit, then the value is converted to be twice its original length if P1 is zero, or to the P2 length with zero padding on the left if P1 is not zero.

1.5.0.7.5  * A75

A75 ,VALUE (,...., VALUE)

A75 ,P+

The fixed binary value, N, of the element is replaced by the N-th value in the P+ list. No value in the list may exceed 16 characters. A null value is allowed. This is the reverse of INPROC action A46.

1.5.0.7.6  * A76

A76 :<NUM>

A76 :P1

The value, generated by either action 31 or action 126, is converted into an external date format according to the P1 parameter. The general form depends upon the century (CC) and year (YY) as well as the occurrence of month (MM) and day (DD).

If P1=0, the general form is: MM/DD/CCYY. If CC=19, then CC is suppressed for P1=0.

If P1=1, the general form is: MONTH DD, CCYY where 'MONTH' is the month's name or abbreviated name.

If P1=4, the general form is: DD-MM-CCYY. These are "Canadian" dates. If CC=19, then CC is suppressed.

If P1=5, the general form is: DD MONTH CCYY.

If P1=8, the general form is: CCYY.MM.DD. These are metric dates. CC is NEVER suppressed (even if it's 00).

If P1=9, the general form is: CCYY MONTH DD. Again, CC is NEVER suppressed.

If P1=2, 3, 6, 7, 10 or 11 then the date (in same form as for P1=0, 1, 4, 5, 8 or 9, respectively) is preceded by a six character day-of-the-week field. This field is set to '----- ' if day (DD) is not known.

If 16 is added to any P1 value above that generates either a literal month or day-of-the-week field (or both), then these fields are reduced to being three characters long.

The following P1 values are reserved for future development and should not be used: 12, 13, 14, 15, 16, 20, 24, 28, 29, 30 and 31.

Examples: If the stored date is Nov. 9, 1980, the following external forms are possible:

  11/09/80                    P1=0 (CC=19 suppressed)
  NOV.   9, 1980              P1=1
  SUN.  11/09/80              P1=2 (CC=19 suppressed)
  SUN.  NOV.   9, 1980        P1=3
  09-11-80                    P1=4
   9 NOV.  1980               P1=5
  SUN.  09-11-80              P1=6
  SUN.   9 NOV.  1980         P1=7
  1980.11.09                  P1=8
  1980 NOV.  09               P1=9
  SUN.  1980.11.09            P1=10
  SUN.  1980 NOV.  09         P1=11
  NOV  9, 1980                P1=17
  SUN 11/09/80                P1=18 (CC=19 suppressed)
  SUN NOV  9, 1980            P1=19
   9 NOV 1980                 P1=21
  SUN 09-11-80                P1=22
  SUN  9 NOV 1980             P1=23
  1980 NOV 09                 P1=25
  SUN 1980.11.09              P1=26
  SUN 1980 NOV 09             P1=27

If the stored date is Nov. 1980 (where the day is not known), the following external forms are possible:

  11/--/80                    P1=0 (CC=19 suppressed)
  NOV.  1980                  P1=1 or 5
  ----- 11/--/80              P1=2 (CC=19 suppressed)
  ----- NOV.  1980            P1=3 or 7
  11-80                       P1=4
  ----- 11-80                 P1=6
  1980.11                     P1=8
  1980 NOV.                   P1=9
  ----- 1980.11               P1=10
  ----- 1980 NOV.             P1=11
  NOV 1980                    P1=17 or 21
  --- 11/--/80                P1=18 (CC=19 suppressed)
  --- NOV 1980                P1=19 or 23
  --- 11-80                   P1=22
  1980 NOV                    P1=25
  --- 1980.11                 P1=26
  --- 1980 NOV                P1=27

If the stored date is 1980 (where the month and the day are not known), the following external forms are possible:

  1980                        P1=0, 1, 4, 5, 8 , 9, 17, 21 or 25
  ----- 1980                  P1=2, 3, 6, 7, 10 or 11
  --- 1980                    P1=18, 19, 22, 23, 26 or 27

Following the A76 rule with an A40 will remove any extra blanks in the output value; following it with some form of A30 (usually A30:10) can be used to return the value in "uplow". For example, the action string: A76:3/ A40/ A30:10 would return a value such as "Sun. Nov. 9, 1980".

1.5.0.7.7  * A77

A77 :<NUM> ,<NUM>

A77 :P1 ,P2

The fixed binary value is converted to a character string by the same rules as for action 71. A check digit is then appended to the converted value. The calculation of the check digit is done either by a mod-11 rule (P1=0), or student services rule (P1=8) or the modified student services rule (P1=4).

If 1 is added to the P1 value, then zeroes are added to the left of the value to bring it to the length specified by P2. In general, if you use the modified student services rule, you should request the zero padding as well (in other words, code a P1 value of 5).

1.5.0.7.8  * A78

A78 :<NUM> ,<CHARACTER STRING> ,<NUM>

A78 :P1 ,P2 ,P3

This OUTPROC rule operates in exactly the same manner as action 36. Action 36 should be used instead.

1.5.0.7.9  * A79

A79 ,<ELEM>

A79 ,P2

If data element P2 contains a value, then it is appended to the end of the current value. Element P2 must be in the same structure as the current element, or both the current element and P2 must be at the record level. P2 can be either the element name (if it is unique), a valid alias, or the element number. If the element name is not unique, it can be preceded by the subtree path, i.e., structure@structure@element. If the element name is all numeric, then it must be preceded by a subtree path; otherwise, the element number must be used.

Only the first occurrence of element P2 can and will be retrieved by A79; moreover, the value retrieved is in its internal form, not external form. The types of both the retrieved value and the original value are significant too:

 - if the retrieved value is null, then the type of the final value will be the same  type  as
 the original value;
 - if the original value is null, then the type of the final value will be the  same  type  as
 the retrieved value;
 - if both the original and the retrieved value are non-null strings, the type  of  the  final
 value will be string;
 - if both values are non-null, but neither or only one is type string, then the type  of  the
 final value will be hex.

1.5.0.8.0  * A80

A80 :<NUM>

A80 :P1

The packed decimal value is expanded into a character string. If P1=0, then leading zeroes are stripped from the output value, leaving at least one digit; otherwise leading zeroes are retained. The error flag is set if the original value is null, and no conversion is attempted.

The value will be converted to character form in one of four formats: integer, decimal point, exponential or "infinity". The appropriate form is determined by SPIRES using these rules:

When the value has an exponent of 0, it is output in integer format, that is, a leading minus sign (if needed) and digits, e.g., 100, -9834, or 0.

If the value has a negative exponent, then SPIRES evaluates the total of the exponent and the number of significant digits in the value (which is the number of digits counting from the left-most non-zero digit to the right-most digit, whether zero or not). If that number is greater than or equal to -4, then the value is output with a decimal point. For example,

If the value does not meet the above requirements, it is output in exponential format, that is, a signed integer followed by the letter E and a signed exponent:

If the value is infinity, represented internally as hex FCFF in packed, it is output as either @@ or -@@ (positive or negative infinity).

1.5.0.8.1  * A81

A81 :<NUM> ,<NUM>

A81 :P1 ,P2

The dollars and cents value generated by input processing action 42 is converted back to a dollars and cents form. P2 is the maximum field width for the number upon output (counting the added $ sign).

If P1=0 or 1, the value must have been created by A42:1 (floating point form). For P1=1, the error flag is set if the value is null. If the value cannot be converted in P2 characters, then P2 stars are returned and the error flag is set.

If P1=2 or 3, the value must have been created by A42:2 (binary form). If the input value is not 1, 2, 3, or 4 bytes, then the error flag is set and the value is not converted. If the converted value does not fit into P2 characters, the error flag is set, but the value is converted and returned in a field size over P2 characters. For P1=3, the output will (normally) contain P2 digits, or P2-1 digits with leading minus sign (-). Leading zeros are used to fill out the field.

All output values contain a mimimum of three digits, and the general form is: $D.CC where CC represent two digits, D represents a string of one or more digits optionally preceeded by a minus sign (-), and the dollar sign and decimal point are the characters shown.

1.5.0.8.2  * A82

A82 ,<CHARACTER STRING>

A82 ,P2

The values of the element are combined into one value with character string P2 used as a delimiter. If this action is one of a string of OUTPROC actions, it should be the first one in the string. Note that it has no effect under any form of partial processing.

1.5.0.8.4  * A84

A84 ,MNEMONIC, MNEMONIC (,..., MNEMONIC)

A84 ,P+

This processing rule should only be used on elements of a structure which is defined more than once for a single record. The P+ list consists of a pair of mnemonics. The first mnemonic in each pair is checked against the primary mnemonic of the first element of the (record or) structure containing the structure which contains this element. If a match is found, then the mnemonic for this element is replaced by the second mnemonic of the pair.

1.5.0.8.5  * A85

A85 :<NUM> ,<NUM> ,<CHARACTER-STRING>

A85 :P1 ,P2 ,P3

If P1=0, the input value should be a packed decimal value or a binary value. If P1=1, the input value is assumed to be a binary value. The input value is edited against the specified edit mask. The P2 parameter specifies the number of places to move the decimal point; P2 may be positive or negative (see note below). The value is adjusted (if necessary) to the edit picture.

The edit mask follows the usual edit rules for valid edit pictures. The valid characters for the edit mask are: .+$*-,BCDRZ09 and blank.

See "Technical Notes", chapter 19, for complete information on SPIRES edit mask specification. EXPLAIN EDIT MASKS for details.

Below are two values demonstrated in a variety of edit masks. The value of P2 is 2.

The P3 edit mask parameter must not be enclosed in quotation marks or apostrophes. (It is shown with apostrophes above for clarity.)

The P2 parameter represents a power-of-ten divisor for the value, in effect moving the decimal point to the left or right. If P2 is a positive integer, the value will get smaller, as the decimal point is moved to the left P2 places. If P2 is a negative integer, the value will get larger, as the decimal point is moved to the right.

1.6  Actions Used Only as INCLOSE Rules (A122 -- A148)

1.6.1.2.2  * A122

A122 ,<ELEM>

A122 ,P2

Whether the element has been given a value or not, the number of occurrences of element P2 is supplied as the single value of the element. The value will be a five-digit number from "00000" to "99999" (the current limit of element occurrences is 32,767).

If no other processing rules appear in the INPROC string, the value will be converted to a two-byte binary number. (However, the "type" of the element will not be set to integer, but will be considered string.) If other processing rules appear in the INPROC string, the value will not be converted to binary, so that it may be converted to whatever type is desired (e.g., packed or real). That subsequent conversion (which may explicitly be to an integer, using A21) will determine the type of the element.

P2 can be either the element name (if it is unique), a valid alias, or the element number. If the element name is not unique, it can be preceded by the subtree path, i.e., structure@structure@element. If the element name is all numeric, then it must be preceded by a subtree path; otherwise, the element number must be used.

Note about element numbers: The first element in a record is number 0; if a slot record is defined, the slot number is element 0.

1.6.1.2.3  * A123

A123 ,<CHARACTER STRING> ,<NUM>

A123 ,P2 ,P3

If the element occurs less than P3 times, the error flag is turned on and the character string P2 is passed through the processing rule for the element in order to generate enough additional occurrences. P2 may be null.

1.6.1.2.4  * A124

A124 :<NUM>, <CHARACTER STRING>

A124 :P1, P2

The P2 string is the name of a USERPROC defined within the RECORD-NAME section containing this INCLOSE rule. This action is user defined. If the number of occurrences of the element being entered exceeds 0, then $PROCVALUE is set to the value of the first occurrence, making it accessible to the USERPROC. [See C.11.]

1.6.1.2.5  * A125

A125 :<NUM>

A125 :P1

If the element has not been given a value, or the value is null and the P1 parameter is 0, then the element is given the next unique value available for the record type. The next unique value is then incremented by one. The value generated will be an 8 byte character string ready for processing by a binary conversion rule. INPROC rule 21 or 27 should be used to convert this value to a 4 byte binary value. SPIRES maintains the value to be assigned next. Only one unique value element may be defined for a record. If the element is the record key then the record defined is a slot record type.

When a new record is added and a value is assigned to the element, the message ASSIGNED ELEMENT is displayed, followed by the element name and the assigned value.

1.6.1.2.6  * A126

A126 :<NUM>

A126 :P1

If the element has not been given a value and P1 is 0, the current date is used to generate a value for it. If P1 is 1 then the date is supplied whether or not the element has a value. The value will be a character string of the form: MM/DD/YY (such as 11/10/75). This value is suitable for processing by action 31.

1.6.1.2.7  * A127

A127 :<NUM>

A127 :P1

If P1 is 0 and the element has not been given a value, the logged on account number will be supplied as its value. If P1 is 1, then the logged on account number will be supplied whether or not the element was given a value.

1.6.1.2.8  * A128

A128 :<NUM>

A128 :P1

If the element has not been given a value and P1 is 0, the current time is used to generate a value for it. If P1 is 1 then the time is supplied whether or not the element has a value. The value will be a character string of the form: HH:MM:SS (such as 12:15:00). This value is suitable for processing by action 28.

1.6.1.3.1  * A131

A131 ,<ELEM>

A131 ,P2

If there are not the same number of occurrences for both the element and element P2, then the error flag is set on. The values are unaffected.

P2 can be either the element name (if it is unique), a valid alias, or the element number. If the element name is not unique, it can be preceded by the subtree path, i.e., structure@structure@element. If the element name is all numeric, then it must be preceded by a subtree path; otherwise, the element number must be used.

1.6.1.3.2  * A132

A132 ,<ELEM>

A132 ,P2

If neither the element or element P2 have occurrences then the error flag is set on. P2 can be either the element name (if it is unique), a valid alias, or the element number. If the element name is not unique, it can be preceded by the subtree path, i.e., structure@structure@element. If the element name is all numeric, then it must be preceded by a subtree path; otherwise, the element number must be used.

1.6.1.3.3  * A133

A133 :<LOGICAL OPERATOR> ,<ELEM>

A133 :P1 ,P2

The lengths of the values of the element are compared to the lengths of the values of element P2 occurrence by occurrence. The error flag is turned on if the criterion in P1 is not met for any pair of occurrences. If the number of values for the two elements differ then the comparison is made for the smaller number of occurrences.

P1 may be =, ~=, >, >=, <, or <=.

P2 can be either the element name (if it is unique), a valid alias, or the element number. If the element name is not unique, it can be preceded by the subtree path, i.e., structure@structure@element. If the element name is all numeric, then it must be preceded by a subtree path; otherwise, the element number must be used.

1.6.1.3.4  * A134

A134 :<LOGICAL OPERATOR> ,<ELEM>

A134: P1 ,P2

The values of the element and element P2 are compared occurrence by occurrence. If converted, both the element and P2 must have been converted by the same Actions. The error flag is turned on if the criterion in P1 is not met for any pair of occurrences. Values are assumed to be 256 characters or less in length. If the number of values for the two elements, differ then the comparison is made for the smaller number of occurrences.

P1 may be =, ~=, >, >=, <, or <=.

P2 can be either the element name (if it is unique), a valid alias, or the element number. If the element name is not unique, it can be preceded by the subtree path, i.e., structure@structure@element. If the element name is all numeric, then it must be preceded by a subtree path; otherwise, the element number must be used.

1.6.1.3.8  * A138

A138 :<NUM>

A138 :P1

The multiple occurrences of the element or the keys of the structure element are used to sort the occurrences. If P1 is 1 the occurrences will be sorted into ascending order. If P1 is 0 then the occurrences will be sorted into descending order. If P1 > 1 then the values are also tested for uniqueness. If P1 is 2 the occurrences are sorted into descending order and non-unique occurrences are deleted. If P1 is 3 the occurrences are sorted in ascending order and non-unique occurrences are deleted. If P1 is 4 the occurrences are sorted in descending order and the error flag is turned on if non-unique occurrences exist. If P1 is 5 the occrrences are sorted in ascending order and the error flag is turned on if non-unique occurrences exist. Elements that are keys of pointer groups must be sorted into descending order.

When occurrences of a structure are sorted by the structure key and the key is itself a structure with a varying-length key, the structure is sorted by the length of that key and then by the key's value.

1.6.1.3.9  * A139

A139 ,<ELEM> ,<NUM>

A139 ,P2 ,P3

If there are more than P3 occurrences of the element then the error flag is turned on, all of the occurrences of the element are deleted, and singularly occurring P2 is considered to have occurred. No other value generation rules (e.g., A126) may be used in the same INPROC string. Element P2 must be in the same structure as the current element and also must occur later in the structure. (i.e. the element number for P2 must be higher than that of the current element).

P2 can be either the element name (if it is unique), a valid alias, or the element number within the structure. If the element name is not unique, it can be preceded by the subtree path, i.e., structure@structure@element. If the element name is all numeric, then it must be preceded by a subtree path; otherwise, the element number must be used.

1.6.1.4.0  * A140

A140 :<NUM> ,<ELEM>

A140 :P1 ,P2

If there are occurrences of the element, then if P1=0 and element P2 has no occurrences then the error flag is set on. If P1 is 1 or 2 and element P2 has occurrences, then the error flag is set on. Also in this case if P1=2, the occurrences of the current element are discarded.

P2 can be either the element name (if it is unique), a valid alias, or the element number. If the element name is not unique, it can be preceded by the subtree path, i.e., structure@structure@element. If the element name is all numeric, then it must be preceded by a subtree path; otherwise, the element number must be used.

1.6.1.4.6  * A146

A146 :<NUM> ,<NUM>

A146 :P1 ,P2

If the element has more than P2 occurrences then the error flag is turned on. If P1 is 0 then all but the first P2 occurrences will be deleted. If P1 is 1 then all but the last P2 occurrences will be deleted. If P1 is 2 then all the occurrences are deleted. If P1 is 3 then all the occurrences are unchanged.

If P1 is 4 and there are more than P2 occurrences of the element, then the structure containing this element is deleted. This is primarily useful in full-screen applications -- for example:

The element DELETE would never have any stored values, for as soon as a value was input for it, the entire structure would be discarded. Thus, in a full-screen application, this element could be used to allow users to delete a structure by "marking" this element, i.e., giving it a value such as "X".

Note in the example that the DELETE element should be declared optional. Also, if any elements in the structure are non-updateable because of NOUPDATE and a priv-tag, you should do the same to the "delete" element. If you do not, it is possible that a user will remove the structure using the "delete" element, which would discard the non-updateable elements as well.

1.6.1.4.7  * A147

A147 ,<ELEM> ,<NUM>

A147 ,P2 ,P3

If the element has more than P3 occurrences, then all but the first P3 are deleted and treated as occurrences of element P2. Element P2 must be in the same structure as the current element. If the value of the current element has been created by another INCLOSE rule (e.g., A126, A128), then element P2 must come before the current element in the structure.

P2 can be either the element name (if it is unique), a valid alias, or the element number. If the element name is not unique, it can be preceded by the subtree path, i.e., structure@structure@element. If the element name is all numeric, then it must be preceded by a subtree path; otherwise, the element number must be used.

1.6.1.4.8  * A148

A148

A148

Delete all of the occurrences of the element.

1.7  Actions Used Only as PASSPROC Rules (A161 -- A171)

1.7.1.6.1  * A161

A161 :<NUM> ,<CHARACTER STRING> ,<CHARACTER STRING>

A161 :P1 ,P2 ,P3

The following description applies if P1=0. The P2 parameter specifies a delimiter string. If the P2 string occurs an even number of times in the input value, then the P2 string pairs and all characters between them are deleted from the input value. If there is an odd number of occurrences of the P2 string within the input value, all pairs are processed as above, and then the last occurrence of P2 and all characters following it are deleted from the input value.

The P3 string (which may be null) indicates whether or not the value is to be scanned for the P2 string. If P3 is non-null, then the P3 string is compared to the initial characters of the input value. If P3 does not match the initial characters of the input value, then the input is not scanned for P2. If it does match, or P3 is null, then the input value is scanned for P2.

The following description applies if P1 > 0 in A161. The P2 and P3 strings must both be single characters. The P2 character is a "start delete" character, and P3 is a "stop delete" character.

The value is scanned from left to right, retaining all characters until a P2 character is encountered. Depending on the value of P1 (see below), the P2 character is either kept or deleted. Scanning then continues, deleting all characters until a P3 character is encountered. Again, depending on the value of P1, the P3 character is either kept or deleted, but its main effect is to "turn off" the deletion action turned on by the P2 character. Scanning thus continues, retaining all characters until another P2 character is encountered, in which case the above process is repeated. If P1 > 4, then characters are deleted from the beginning of the value until a P3 character (or value end) stops the deletion.

     If P1=1 or 5, P2 (start) is deleted, and P3 (stop) is retained.
     If P1=2 or 6, P2 (start) is retained and P3 (stop) is deleted.
     If P1=3 or 7, P2 (start) is deleted, and P3 (stop) is deleted.
     If P1=4 or 8, P2 (start) is retained and P3 (stop) is retained.

If P2 = P3, then start and stop delete processing alternates with each occurrence of the character. Otherwise, if deletion is occurring, then additional P2 characters are ignored (deleted) until a P3 character (or value end) stops deletion; and if deletion is not occurring, then additional P3 characters are ignored (retained) until a P2 character starts deletion.

Here are some examples of seven strings (in the left column) as they would be processed by various values of P1:

                  A161:1,+,-;  A161:2,+,-;  A161:3,+,-;  A161:4,+,-;
     12+34-56     12-56        12+56        1256         12+-56
     1234+567     1234         1234+        1234         1234+
     +123456-     -            +            null         +-
     +1+2-3-4     -3-4         +3-4         3-4          +-3-4
     +1-2+3-4     -2-4         +2+4         24           +-2+-4
     -1-2+3+4     -1-2         -1-2+        -1-2         -1-2+
     -1+2-3+4     -1-3         -1+3+        -13          -1+-3+

1.7.1.6.2  * A162

A162 :<NUM> ,<MNEMONIC> (,.....,<MNEMONIC>)

A162 :P1 ,P+

This action provides an inclusion or exclusion list of passer elements whose values are to be forced to upper case upon passing. If P1=0 then the list is an inclusion list. I.e. elements in the list have their values forced to upper case upon passing. If P1=1 then the list is an exclusion list. i.e. elements not in the list have their values forced to upper case upon passing.

1.7.1.6.3  * A163

A163 :<OPER>,<VAL>(/...<VAL>),<MNEM> (,...,<MENM>)

A163 :P1 ,P2 ,P+

This action has the general form:

Where the P1 operator may be any of the following:

The processing is as follows: if an element being passed is one of the Y's then, 1) find element X. If X can't be found then don't pass Y. 2) For each V, compare the value of X to V by relation P1. 3) If X does not compare with any V, then don't pass Y otherwise, if X compares to some V or if an element being passed is not one of the Y's then continue to pass whatever element is being passed.

1.7.1.6.4  * A164

A164 :<NUM>

A164 :P1

The length (in binary) of the original value becomes the new value to be passed. The new value may be 1 or 2 bytes in length. If P1=1, the new value is 1 byte long. If P1=2, the new value is 2 bytes long. The passed value may be searched with SRCPROC action 21.

1.7.1.6.5  * A165

A165 :<NUM>

A165 :P1

If P1=0, this action assumes that a value was already passed by the previous PASSPROC. No value is passed by this PASSPROC. Examples of such usage are:

 - On a simple index term, indicating that no index information should be  generated  for  the
 entire  INDEX-NAME section.  This can be useful when you want to have two different sets of
 SEARCHTERMS and SRCPROCs for a single  index;  you  would  code  two  different  INDEX-NAME
 sections  naming the same index record-type, but with the different sets of SEARCHTERMS and
 SRCPROCs, and one of them would have this PASSPROC to prevent the data  from  being  passed
 twice.
 - On the SUB-INDEX term following the use of A38 by the previous PASSPROC.  See  A38  for  an
 example.
 - On a global QUAL-ELEM term that defines the same element as the previous linkage  term.   A
 typical  case is following the PTR-ELEM term when A169 was used to pass the goal record key
 as the pointer back.  The QUAL-ELEM  allows  this  pointer  to  be  used  as  a  qualifier.

The use of A165 for passing occurrence counters (as discussed below) is restricted to local QUAL-ELEM and SUB-INDEX terms.

If P1=1 or 3, then a unique number is passed as a one-byte binary quantity. There are two counters: P1=1 chooses the first counter, and P1=3 chooses the other counter. Both counters are initialized to 1 for each INDEX-NAME processed for each goal record. The appropriate counter is updated by 1 each time it is used. The counter value passed is the value before the update. This use of A165 allows counting of values passed to an index. Each value passed causes the counter to be incremented; thus, if a value is being split by PASSPROC rules, the counter will be incremented several times during the passing process.

If P1=2 or 4, then a unique number is passed as a two-byte binary quantity. The same counters as for P1=1 or 3 are used by P1=2 or 4, and the same rules apply.

For P1 from 6 to 15, SPIRES will pass a value representing some combination of occurrence numbers depending on the current structural path of the element just passed. For the simplest example, if P1 = 6 and the previous PASSPROC passed the third occurrence of an element, this PASSPROC will pass the one-byte integer 3, probably as a qualifier. This use of A165 is particularly useful when same-structure retrieval is necessary in index searches. [See C.6.13.]

The value created by A165 may be from 1 to 4 bytes long, containing occurrence numbers of the element, and/or the structure containing the element, and/or the structure containing that structure, and/or the structure containing that structure. The value produced is in the form "S3.S2.S1.E" where E represents the occurrence number of the element, S1 the occurrence number of the structure containing it, and so forth. (The periods are not produced in the value, but are shown here for clarity.) Depending on the value of P1 as shown in the chart below, the value will look like this:

Hence, for example, if P1 = 10, the value returned will be a two-byte integer, with the first byte representing the occurrence number of structure S2 and the second representing the occurrence number of S1. The occurrence number of the element itself would not be included.

If you choose a P1 value of 6 to 15 that specifies more structures than the element is actually contained in, the higher-level (i.e., higher-numbered, in the chart above) structures not used will be given values of "1". For example, if P1 is 15, but element E is contained only by one structure (S1), then S2 and S3 will each be "1".

You might want to include A54 ($PARAGRAPH) on the qualifier element's OUTPROC in the index record definition since the value produced by A165 is like a paragraph number.

1.7.1.6.6  * A166

A166 :<NUM>

A166 :P1

This action retrieves for passing the value of the associated "Passer" of the linkage record for later processing by A45 or A38 in this same PASSPROC. If P1=1, the retrieved value is not forced to upper case. This is important when passing binary values such as converted numerics or dates. If P1 = 0, the retrieved value is forced to upper case.

If 8 is added to the P1 parameter, the element value being passed will be driven through its OUTPROC rule, if any; thus the effect is that the passed value will be in its external form.

1.7.1.6.7  * A167

A167 :<NUM> ,<MNEMONIC> (,....,<MNEMONIC>)

A167 :P1 ,P+

This action provides for multiple passers. The P+ parameter consists of a list of goal record mnemonics, separated by commas.

If P1=0, this action is for compound index records, and is the only action used in the first PASSPROC string of a compound index linkage section. Note: this action defines the key of the index record, and this key should be defined as FIXED with LEN=2.

If P1=1, this action retrieves for passing the values of the P+ elements of the linkage record not to be processed later by A38 or A45 in this same PASSPROC.

If P1=2, this action retrieves for passing the values of the P+ elements of the linkage record for later processing by A38 or A45 in this same PASSPROC.

If 4 is added to a P1 of 1 or 2 to make P1=5 or P1=6, the retrieved values are not forced to upper case.

If 8 is added to any of the four P1 values above, then the element values being passed will be driven through their OUTPROCs before passing; thus, the passed values will be in their external forms.

Note: The order of the P+ parameters is not significant unless some of the elements passing are inside of structures. If this is the case, the element names must be specified in the order in which the elements are shown in SHOW ELEMENT DICTIONARY.

Note: the element mnemonic may be specified in the fully-qualified form "struc1@struc1.1@struc1.1.1@elem", where the structures are keyed structures. This allows for passing elements in floating keyed structures by specifying the structural path to the element. If a fully-qualified path is not given, only the first element along the structural path found with the specified name will be passed.

1.7.1.6.8  * A168

A168 :<NUM> ,<MNEMONIC>,<MNEMONIC> (,...,<MNEMONIC>)

A168 :P1 ,P+

The P+ parameter of this action consists of one or more sets of mnemonic pairs, separated by commas. The first mnemonic of each pair must be a non-structure element of the linkage record, and the second mnemonic is that of any element of the linkage record defined in the same structure as the first mnemonic or any containing structure. The first mnemonic of each pair is checked agains the mnemonic of the element currently being processed by this PASSPROC. If a match is not found, then this Action does nothing. If a match is made, then the linkage record is searched for any occurrence of the second mnemonic within current structural bounds. If P1=0 and the second mnemonic is found to occur, or P1=1 and the second mnemonic is not found to occur, then this Action does nothing. Otherwise, the value currently being processed is not passed. This action provides for conditional passing of elements.

1.7.1.6.9  * A169

A169 :<NUM>

A169 :P1

This action retrieves for passing the value of the associated "passer" of the linkage record not to be processed later by A45 or A38 in this same PASSPROC. If P1=1, the retrieved value is not forced to upper case. This is important when passing binary values such as converted numerics or dates. If P1=0, the retrieved value is forced to upper case.

If 8 is added to the P1 parameters above, the retrieved value is driven through the element's OUTPROC rules; thus, the external form (in upper or uplow case, depending on whether P1 is 8 or 9) of the element is passed.

1.7.1.7.0  * A170

A170

A170

This action passes as the value the locator of the linkage record currently being processed. The linkage records must be "removed".

1.7.1.7.1  * A171

A171 ,VALUE

A171 ,P2

This is the first action of a PASSPROC, and it sets up a default value to be passed if no other value can be found using later actions in this same PASSPROC.

If a default value is supplied because no value was passed by the fetcher action (A166, A167 or A169), then the following actions will not be executed if they appear later in the PASSPROC string:

SPIBILD will simply skip past them, continuing with the next rule in the string.

2  Quick Reference to Processing Rule Functions by Number

2.1  Actions Used Only As SEARCHPROC Rules (A6 -- A16)

    S      A6     Implicit AND Replaced by Explicit Logical Operator
    S      A7     Reparse Value as New Search
    S      A11    Embedded Truncated Search
    S      A12    Implicit "=" Replaced by Explicit Relational Operator
    S      A13    Truncated Search if Any Characters Match
    S      A14    Truncated Search if Special Character ends Search Value
    S      A15    Truncated Search to Alphabetically Lower Key
    S      A16    Truncated Search to Alphabetically Higher Key

2.2  Actions Used as INPROC, OUTPROC or SEARCHPROC Rules (A21 -- A37)

I,  S      A21    Alphanumeric to Binary Conversion
I,O,S,P    A22    Length Test; Error if Value Too Long
I,  S      A23    Length Test; Error if Value Too Short
I,  S      A24    Range Test for Previous Binary Conversion
I,  S      A25    Alphanumeric to Floating Point Conversion
I,  S      A26    Range Test for Previous Floating Point Conversion
I,O,S      A27    Binary Conversion, Check Digit Set Aside
I,  S      A28    Alphanumeric Time to Binary Conversion
I,  S      A29    Alphanumeric Hex String to Bit String Conversion
I,O,S      A30    Force Upper Case
I,  S      A31    Alphanumeric Date to Binary Conversion
I,O,S,P    A32    Compare or Replace Current Elem with Other Elem
I,O        A33    Structured Element Processing
I,  S      A34    Check Digit Test
I,O        A35    Augment Record Key to Generate Unique Value
I,O,S,P    A36    String Insertion
I          A37    Value Breakup on Length to Two Occurrences

2.3  Actions Used as INPROC, OUTPROC, SEARCHPROC, PASSPROC Rules (A38-A62)

I,O,S,P    A38    Personal Name Algorithm for Linkage and Index
I,  S      A39    Packed Decimal conversion
I,O,S,P    A40    Squeeze Multiple Spaces to Single Space
I,O,S      A41    Personal Name Algorithm for Goal Record
I,  S      A42    Dollar-and-Cents from String Conversion
I,O,S,P    A43    Character Translation to Different Character Set
I,O,S,P    A44    String Replacement
I,  S,P    A45    Value Breakup on Delimiter to Several Occurrences
I,O,S,P    A46    Value Replacement by Position, Inclusion, Exclusion
    S,P    A47    Value Inclusion, Exclusion Based on Length
I,O,S,P    A48    First Value of Each Pair Replaced by Second of Each Pair
I,O,S      A49    Character Test, Inclusion, Exclusion
I,O,S      A50    Bit to Mask Conversion
I,O,S      A51    Strip Trailing Blanks
I,O,S,P    A52    Delete Value, Structure or Record; Test Null Value
I,O,S      A53    Account Test
I,O,S      A54    Paragraph Number Conversion
I,O,S      A55    Circular Shift of Value Left or Right
I,O,S      A56    User Error Code
I,O,S      A57    String Translate and Pack
I,O,S      A58    String Translate and Unpack
I,O,S      A59    String Conversion by Logical Operator
I,O,S      A60    Encryption
I          A61    Save or Restore Value
I,O,S,P    A62    User Defined Processing
I,O,S      A63    Conditional Character Testing
I,O,S      A64    Substring Occurrences Within Value
I,O,S      A65    Value Replacement By Element in Another Value
I          A66    Substring Test Within Value
I,O,S      A68    Remove/Adjust Edit Mask Characters
I,  S      A67    Packed Value Test

2.4  Actions Used Only as OUTPROC Rules (A71 -- A85)

  O        A71    Binary to String Conversion
  O        A72    Floating Point to String Conversion
  O        A73    Binary Time to String Conversion
  O        A74    Hex to String Conversion
  O        A75    Binary to Parameter Position Conversion
  O        A76    Binary Date to String Conversion
  O        A77    Binary to String, Check Digit Appended
  O        A78    String Insertion
  O        A79    Concatenate Another Element to Current Element
  O        A80    Packed Decimal to String Conversion
  O        A81    Dollar-and-Cents to String Conversion
  O        A82    String Buildup from Multiple Occurrences with Delimiter
  O        A84    Mnemonic Replacement
  O        A85    Dollar or Packed Dec Values Edited by Mask

2.5  Actions Used Only as INCLOSE Rules (A122 -- A148)

I          A122   Element Generation by Occurrences of Another Element
I          A123   Minimum Occurrences Test, Value Generation
I          A124   User Defined Processing
I          A125   Unique Value or Slot Number Generation
I          A126   Date Generation
I          A127   Account Generation
I          A128   Time Generation
I          A131   Elem Occ Number Tested with Other Elem Occ Number
I          A132   Element and Other Element Tested for Occurrences
I          A133   Elem and Other Elem Length Tested by Logical Operator
I          A134   Elem and Other Elem Value Tested by Logical Operator
I          A138   Multiple Occ of Elem or Structure Key Sorted by Value
I          A139   Maximum Occ Test, Other Elem Value Generation
I          A140   Elem Occurrence Compared with Other Elem Occurrence
I          A146   Maximum Occurrences Test, Occurrence Deletion
I          A147   Maximum Occ Test, Other Elem Generated from Extras
I          A148   Delete All Occurrences

2.6  Actions Used Only as PASSPROC Rules (A161 -- A171)

      P    A161   Delimited String Exclusion
      P    A162   Inclusion/Exclusion List Passed Elems to Upper Case
      P    A163   Pass by Relational Compare With Value of Other Elem
      P    A164   Pass Length of Value
      P    A165   Pass Occurrence Number, Pass Nothing
      P    A166   Fetch Passer for A45 or A38
      P    A167   Multiple Passer Elements to Single Index Record
      P    A168   Conditional Passing of Elements
      P    A169   Fetch Passer Not to Be Followed By A45 or A38
      P    A170   Passer Is Pointer to Removed Record Type
      P    A171   Supply Default Value to Be Passed If No Value Found

3  Quick Reference to Processing Rules by Function-Keyword

3.1  Binary Conversion

I,  S      A21  :P1
                 Alphanumeric to Binary Conversion
I,O,S      A27  :P1
                 Binary Conversion, Check Digit Set Aside
  O        A71  :P1, P2(NUMBER)
                 Binary to String Conversion
  O        A77  :P1, P2(NUMBER)
                 Binary Conversion, Check Digit Appended

3.2  Character Test

    S      A13  :P1, P2(CHARACTERS)
                 Truncated Search, Character Test
I,O,S,P    A44  :P1, P2(CHARACTERS), P3(CHARACTERS)
                 String Replacement
I,O,S      A49  :P1, P2(CHARACTERS)
                 Character Test, Inclusion, Exclusion
I,O,S      A63  :P1, P2(CHARACTERS), P3(CHARACTERS)
                 Conditional Character Testing
I,O,S      A64  :P1, P+(CHAR STRS)
                 Substring Occurrences Within Value
I          A66  :P1, P2(NUMBER), P+(CHAR STRS)
                 Substring Test Within Value

3.3  Comparison and Generation of Elements

I          A122 :P1, P2(ELEM #)
                 Element Generation by Occurrences of Another Element
I          A123 :P1, P2(CHARACTERS), P3(NUMBER)
                 Minimum Occurrences Test, Value Generation
I          A124 :P1, P2(CHARACTERS)
                 User Defined Processing
I          A131 :P1, P2(ELEM #)
                 Element Occurrence Number Tested with Other Elem Occ
                 Number
I          A132 :P1, P2(ELEM #)
                 Element and Other Element Tested for Occurrences
I          A133 :P1, P2(ELEM #)
                 Element and Other Element Length Tested by Logical
                 Operator
I          A134 :P1, P2(ELEM #)
                 Element and Other Element Value Tested by Logical
                 Operator
I          A139 :P1, P2(ELEM #), P3(NUMBER)
                 Maximum Occurrences Test, Other Element Value
                 Generation
I          A140 :P1, P2(ELEM #)
                 Element Occurrence Compared with Other Element
                 Occurrence
I          A146 :P1, P2(NUMBER)
                 Maximum Occurrences Test, Occurrence Deletion
I          A147 :P1, P2(ELEM #), P3(NUMBER)
                 Maximum Occurrences Test, Other Elem Generated from
                 Extras

3.4  Date Generation and Conversion

I,  S      A31  :P1
                 Alphanumeric Date to Binary Conversion
  O        A76  :P1
                 Binary Date to String Conversion
I          A126 :P1
                 Date Generation

3.5  Default Value Generation

I          A123 :P1, P2(CHARACTERS), P3(NUMBER)
                 Minimum Occurrences Test, Value Generation
I          A124 :P1, P2(CHARACTERS)
                 User Defined Processing
      P    A171 :P1, P2(CHARACTERS)
                 Supply Default Value to Be Passed If No Value Found

3.6  Dollar-and-Cents Conversion

I,  S      A42  :P1
                 Dollar-and-Cents from String Conversion
  O        A81  :P1, P2(NUMBER)
                 Dollar-and-Cents to String Conversion
  O        A85  :P1, P2(NUMBER), P3(EDIT MASK)
                 Dollar or Packed Dec Values Edited by Mask

3.7  Floating-Point Conversion

I,  S      A25  :P1
                 Alphanumeric to Floating Point Conversion
  O        A72  :P1, P2(NUMBER), P3(NUMBER)
                 Floating Point to String Conversion

3.8  General

I,O,S      A30  :P1
                 Force Upper Case
I,O,S,P    A40  :P1
                 Squeeze Multiple Spaces to Single Space
I,O,S      A51  :P1
                 Strip Trailing Blanks
I,O,S,P    A62  :P1, P2(CHARACTERS)
                 User Defined Processing

3.8a  Hexadecimal Conversion

I,  S      A029   :P1(NUMBER), P2(NUMBER)
                   Hexadecimal Conversion
I,O,S      A054   :P1(NUMBER), P2(NUMBER)
                   Paragraph Number Conversion
  O        A074   :P1(NUMBER), P2(NUMBER)
                   Hexadecimal Conversion

3.9  Insertion of String

I,O,S,P    A36  :P1, P2(CHARACTERS), P3(NUMBER)
                 String Insertion
  O        A78  :P1, P2(CHARACTERS), P3(NUMBER)
                 String Insertion

3.10  Length Test

I,O,S,P    A22  :P1, P2(NUMBER)
                 Length Test; Error if Value Too Long
I,  S      A23  :P1, P2(NUMBER)
                 Length Test; Error if Value Too Short
    S,P    A47  :P1, P2(NUMBER)
                 Value Inclusion, Exclusion Based on Length
I          A133 :P1(LOGICAL OPERATOR), P2(ELEM #)
                 Element Occurrences, Length Test

3.11  Multiple Occurrence Conversion

I,  S,P    A45  :P1, P2(CHARACTER)
                 Value Breakup on Delimiter to Several Occurrences
I          A37  :P1, P2(NUMBER)
                 Value Breakup on Length to Two Occurrences
  O        A82  :P1, P2(CHARACTERS)
                 String Buildup from Multiple Occurrences with
                 Delimiter

3.11a  Packed Decimal Conversion

I,  S      A24  :P1(NUMBER), P2(NUMBER), P3(NUMBER)
                 Packed Decimal Characteristics Tests
I,  S      A39  :P1(NUMBER), P2(NUMBER)
                 Packed Decimal Conversion
I,O,S,P    A55  :P1(NUMBER), P2(NUMBER)
                 Packed Decimal Adjustment and Rounding
I,  S      A67  :P1(RELOP), P2(NUMBER)
                 Packed Decimal Value Test
  O        A80  :P1(NUMBER)
                 Packed Decimal Conversion
  O        A85  :P1, P2(NUMBER), P3(MASK)
                 Editing Packed Numbers Against an Edit Mask

3.12  Personal Name Algorithm

I,O,S,P    A38  :P1
                 Personal Name Algorithm for Linkage and Index
I,O,S      A41  :P1
                 Personal Name Algorithm for Goal Record

3.13  Range Test

I,  S      A24  :P1, P2(NUMBER), P3(NUMBER)
                 Range Test for Previous Binary Conversion
I,  S      A26  :P1, P2(FLT PT #), P3(FLT PT #)
                 Range Test for Previous Floating Point Conversion

3.14  String Replacement, Inclusion, Exclusion, Code Translation

I,O,S,P    A43  :P1, P2(CHARACTERS), P3(CHARACTERS)
                 Character Translation to Different Character Set
I,O,S,P    A32  :P1, P2(RECORD NUMBER), P3(ELEMENT NUMBER)
                 Compare or Replace Current Elem with Other Elem
I,O,S,P    A44  :P1, P2(CHARACTERS), P3(CHARACTERS)
                 String Replacement
I,O,S,P    A46  :P1, P2, P3, P4, ... (CHAR STRS)
                 Value Replacement by Position, Inclusion, Exclusion
I,O,S,P    A48  :P1, P2, P3, P4, ... (CHAR STRS)
                 First Value of Each Pair Replaced by Second of Each
                 Pair
I,O,S      A65  :P1, P2(CHARACTERS), P3(CHARACTERS)
                 Value Replacement By Element In Another Subfile
  O        A75  :P1, P2, P3, P4, ... (CHAR STRS)
                 Binary to Parameter Position Conversion

3.15  Time Generation and Conversion

I,  S      A28  :P1
                 Alphanumeric Time to Binary Conversion
  O        A73  :P1
                 Binary Time to String Conversion
I          A128 :P1
                 Time Generation

INDEX


ACTIONS, BINARY CONVERSION   3.1
ACTIONS, CHARACTER TEST   3.2
ACTIONS, CODE TRANSLATION   3.14
ACTIONS, COMPARISON OF ELEMENTS   3.3
ACTIONS, DATE GENERATION AND CONVERSION   3.4
ACTIONS, DEFAULT VALUE GENERATION   3.5
ACTIONS, DOLLAR-AND-CENTS CONVERSION   3.6
ACTIONS, EXCLUSION   3.14
ACTIONS, FLOATING-POINT CONVERSION   3.7
ACTIONS, GENERATION OF ELEMENTS   3.3
ACTIONS, HEXADECIMAL   3.8a
ACTIONS, INCLUSION   3.14
ACTIONS, LENGTH TEST   3.10
ACTIONS, MULTIPLE OCCURRENCE CONVERSION   3.11
ACTIONS, PACKED DECIMAL   3.11a
ACTIONS, PERSONAL NAME   3.12
ACTIONS, RANGE TEST   3.13
ACTIONS, STRING INSERTION   3.9
ACTIONS, STRING REPLACEMENT   3.14
ACTIONS, TIME GENERATION AND CONVERSION   3.15
ACTIONS, UTILITY   3.8
ASSIGNED ELEMENT   1.6.1.2.5
A11 RULE   1.2.0.1.1
A12 RULE   1.2.0.1.2
A122 RULE   1.6.1.2.2
A123 RULE   1.6.1.2.3
A124 RULE   1.6.1.2.4
A125 RULE   1.6.1.2.5
A126 RULE   1.6.1.2.6
A127 RULE   1.6.1.2.7
A128 RULE   1.6.1.2.8
A13 RULE   1.2.0.1.3
A131 RULE   1.6.1.3.1
A132 RULE   1.6.1.3.2
A133 RULE   1.6.1.3.3
A134 RULE   1.6.1.3.4
A138 RULE   1.6.1.3.8
A139 RULE   1.6.1.3.9
A14 RULE   1.2.0.1.4
A140 RULE   1.6.1.4.0
A146 RULE   1.6.1.4.6
A147 RULE   1.6.1.4.7
A148 RULE   1.6.1.4.8
A15 RULE   1.2.0.1.5
A16 RULE   1.2.0.1.6
A161 RULE   1.7.1.6.1
A162 RULE   1.7.1.6.2
A163 RULE   1.7.1.6.3
A164 RULE   1.7.1.6.4
A165 RULE   1.7.1.6.5
A166 RULE   1.7.1.6.6
A167 RULE   1.7.1.6.7
A168 RULE   1.7.1.6.8
A169 RULE   1.7.1.6.9
A170 RULE   1.7.1.7.0
A171 RULE   1.7.1.7.1
A21 RULE   1.3.0.2.1
A22 RULE   1.3.0.2.2
A23 RULE   1.3.0.2.3
A24 RULE   1.3.0.2.4
A25 RULE   1.3.0.2.5
A26 RULE   1.3.0.2.6
A27 RULE   1.3.0.2.7
A28 RULE   1.3.0.2.8
A29 RULE   1.3.0.2.9
A30 RULE   1.3.0.3.0
A31 RULE   1.3.0.3.1
A32 RULE   1.3.0.3.2
A33 RULE   1.3.0.3.3
A34 RULE   1.3.0.3.4
A35 RULE   1.3.0.3.5
A36 RULE   1.3.0.3.6
A37 RULE   1.3.0.3.7
A38 RULE   1.4.0.3.8
A39 RULE   1.4.0.3.9
A40 RULE   1.4.0.4.0
A41 RULE   1.4.0.4.1
A42 RULE   1.4.0.4.2
A43 RULE   1.4.0.4.3
A44 RULE   1.4.0.4.4
A45 RULE   1.4.0.4.5
A46 RULE   1.4.0.4.6
A47 RULE   1.4.0.4.7
A48 RULE   1.4.0.4.8
A49 RULE   1.4.0.4.9
A50 RULE   1.4.0.5.0
A51 RULE   1.4.0.5.1
A52 RULE   1.4.0.5.2
A53 RULE   1.4.0.5.3
A54 RULE   1.4.0.5.4
A55 RULE   1.4.0.5.5
A56 RULE   1.4.0.5.6
A57 RULE   1.4.0.5.7
A58 RULE   1.4.0.5.8
A59 RULE   1.4.0.5.9
A6 RULE   1.2.0.0.6
A60 RULE   1.4.0.6.0
A61 RULE   1.4.0.6.1
A62 RULE   1.4.0.6.2
A63 RULE   1.4.0.6.3
A64 RULE   1.4.0.6.4
A65 RULE   1.4.0.6.5
A66 RULE   1.4.0.6.6
A67 RULE   1.4.0.6.7
A68 RULE   1.4.0.6.8
A7 RULE   1.2.0.0.7
A71 RULE   1.5.0.7.1
A72 RULE   1.5.0.7.2
A73 RULE   1.5.0.7.3
A74 RULE   1.5.0.7.4
A75 RULE   1.5.0.7.5
A76 RULE   1.5.0.7.6
A77 RULE   1.5.0.7.7
A78 RULE   1.5.0.7.8
A79 RULE   1.5.0.7.9
A8 RULE   1.2.0.0.8
A80 RULE   1.5.0.8.0
A81 RULE   1.5.0.8.1
A82 RULE   1.5.0.8.2
A84 RULE   1.5.0.8.4
A85 RULE   1.5.0.8.5
BINARY CONVERSION ACTIONS   3.1
CHARACTER TEST ACTIONS   3.2
CHECK DIGIT COMPUTATION   1.3.0.2.7
CODE TRANSLATION ACTIONS   3.14
COMPARISON OF ELEMENTS   3.3
DATE GENERATION AND CONVERSION   3.4
DEFAULT VALUE GENERATION   3.5
DOLLAR-AND-CENTS CONVERSION   3.6
EDIT MASKS   1.5.0.8.5
EXCLUSION ACTIONS   3.14
FLOATING-POINT CONVERSION   3.7
GENERATION OF ELEMENTS   3.3
HEXADECIMAL ACTIONS   3.8a
INCLUSION ACTIONS   3.14
INDIRECT SEARCHING   1.2.0.0.8
LENGTH TEST   3.10
MULTIPLE OCCURRENCE ACTIONS   3.11
PACKED DECIMAL ACTIONS   3.11a
PERSONAL NAME ACTIONS   3.12
RANGE TEST ACTIONS   3.13
SLOTCHECK, CHECK DIGIT COMPUTATION   1.3.0.2.7
STRING INSERTION   3.9
STRING REPLACEMENT ACTIONS   3.14
TIME GENERATION AND CONVERSION   3.15
UTILITY ACTIONS   3.8