Procedure Modules › Searching a Table (CULLUS62) › How to Use CULLUS62
How to Use CULLUS62
To invoke CULLUS62:
First—Define input fields on REC parameters.
Second—Define required fields that are not input fields or specified by literals on work field parameters. For example:
- The table, which is a multiply-occurring field
- The table type code
- The number of bytes in each entry of the table
- The total number of the table entries
- The type of search code
- The numeric work field that will receive the occurrence number of the key value in the table
Third—Issue a CALL to CULLUS62 in type 7 logic:
Col
2
RPT-nn7sss CALL US62 (table-field-name table-type-qv entry-length-vn
entry-count-vn search-type-qv key-vn index-v)
- Rpt-nn, coded in columns 2 and 3, specifies a 2-digit number in the range 00 through 99 that identifies the CA Culprit report.
- Sss, coded in columns 5 through 7, specifies a 3-digit number indicating the sequence number of the type 7 parameter.
- Table-field-name (ARG1) requires the name of the table to be searched.
- Table-type-qv (ARG2) requires the name of a work field or a 1-character alphanumeric code, enclosed in single quotation marks, that specifies the type of table searched. Valid codes are shown below:
Table type...
|
Code...
|
Table entry length...
|
Alphanumeric
|
'A'
|
1 through 64
|
Numeric
|
'N'
|
8 or 16
|
- Entry-length-vn (ARG3) requires a numeric literal or the name of an 8-byte numeric work field that indicates the length of each table entry (see above).
- Entry-count-vn (ARG4) requires a numeric literal or the name of an 8-byte numeric work field that indicates the total number of entries in the table. The maximum is 32,767.
- Search-type-qv (ARG5) requires the name of a work field or a 1-character alphanumeric literal, enclosed in single quotation marks, that specifies the type of search:
Search type...
|
Code...
|
Table entry order...
|
Binary
|
'B'
|
Ascending
|
Sequential
|
'S'
|
Any order
|
- Key-vn (ARG6) requires a numeric literal, alphanumeric literal, or the name of a field that contains the search value.
- Index-v (ARG7) requires the name of a numeric work field that receives the number of the entry in the table that matches the key value (key-vn).
Copyright © 2014 CA.
All rights reserved.
|
|