4 Database Manipulation
DBINFO (base name, qualifier, mode, status, buffer)
The parameters are:
For each mode, the information is returned to the buffer as a word string. Some of the string information may actually represent numeric data. The UNPACK statement, described in page 179 , provides a means of properly interpreting these values. The following tables describe the results associated with a successful execution of DBINFO (Conditional word equal to 0).
Mode | Purpose | Qualifier | Buffer | Contents | Comments |
---|---|---|---|---|---|
101 | Identifies the data-item number for a given data item. | Data item name or number. | Word 1 | Data-item number. | Integer. |
102 | Describes a specific data item. | Data item name or number. | Words 1-8 Word 9 10 11 12 13 | Data-itemname. Data-type. Item-word length. Sub-item count. 0 Control number. | Left-justified and filled with blanks. (L,S,I,X) Integer. Integer. Integer. Integer. |
103 | Identifies all data items in database | (ignored) | Word 1 Word 2... n+1 | n Data-item number ... | n = number of data items listed. All words are integers |
104 | Identifies all data items in a specific data set. The data items are listed in order of occurrence in the data entry. | Data setname or number. | Word 1 Word 2 ... n+1 | n Data-item number ... | n = number of data items listed. All words are integers. |
Mode | Purpose | Qualifier | Buffer | Contents | Comments |
---|---|---|---|---|---|
201 | Identifies a data-set number for a given data set. | Data set name or number. | Word 1 | Data set number. | If positive, entriescan be read only. If negative, entries can be read, written or modified. |
202 | Describes a specific data set. | Data set name or number. | Words 1-8 Word 9 10 11 12 13 14 & 15 16 & 17 | Data set name. Set type. Entry word-length. 0 0 0 Number of data entries.Data-set capacity. | Left-justified andfilled with blanks. (M,A,D) Words 10-17 are four-byte integers. |
-202 | Describes a specific data set. | (Same as mode 202.) | (Same as mode 202.) | (Same as mode 202.) | This is the same as mode 202, however it is processed locally (without contacting the database server) and the entry count is always zero. |
203 | Identifies all accessible datas ets in the data-base. The sets are listed in the order of their occurrence in the schema. | (Ignored) | Word 12...n+1 | n number of accessible datasets in database. Arranged in data-set number order. If positive, the data set can be read only. If negative, the data set can be read, written or modified. All words are integers. | |
204 | Identifies all accessible datasets which containa specific data item. | Data-item name or number. | (Same as mode 203.) | (Same as mode 203.) | (Same as mode 203.) |
Mode | Purpose | Qualifier | Buffer | Contents | Comments |
---|---|---|---|---|---|
301 | Identifies paths defined for a specified data set. | Data-setname or number. | Word 1 2 3 4 ............ 3n-1 3n 3n+1 | n Data-set number. Search itemnumber. 0 ............ Data-set number. Search itemnumber. 0 | n = Number of paths. Repeat for each path. If qualifier refers to master, set number is for detail. If qualifier refers to detail, set number is for master. Item numbers identify items in detail set. Path designators presented in order of their appearance in schema. All words are integers. |
302 | Identifies a search item for specifieddata set. | Master data-set name or number. OR Detail data-set name or number | Word 1 2 Word 1 2 | Search-itemnumber. 0 Search-itemnumber. Data-set number. | Search-item number in master set. All words are integers. First search item defined in the detail data set.All words are integers. |
Mode | Purpose | Qualifier | Buffer | Contents | Comments |
---|---|---|---|---|---|
501 | Identifies the index-item name or number. | index-item name or number. | Word 1 | Index-itemnumber. | Integer. |
502 | Describes a specific index item. | Index-item name or number. | Word 1-8 Word 9 Word 10 Word 11 Word n2*n+9...Word 2*n+10 | Index-itemname. Segment count. Item number. Item length. | Left-justified and filled with blanks. Integer. Integer. Integer. All words are integers. |
503 | Identifies all index items in database | (ignored) | Word 1 Word 2 ... n+1 | n Index-item number | n = number of index items listed. All words are integers |
504 | Identifies all index items in a specificdata set. The items are listed in order of occurrence in the data set. | Data-set name or number. | Word 1 Word 2 ... n+1 | n Index-item number. | n = number of index items listed. All words are integers. |
Array Element | Value | Description |
---|---|---|
1 | 0 | CW. |
2 | Buffer Length | Number of words transferred to the buffer. |
3 | 0 | |
4 | Unchanged | |
5 | 0 | |
6 | Bits 0 through 11 | The DBINFO identification number 402. |
Bits 12 through 15 | The mode value used to open the database. | |
7 | Program line number | |
8 | 0 | |
9 | Mode number | The mode parameter value. |
10 | Any value | Reserved. |