# Subordinate SQL Objects

> Source: https://manual.pvxplus.com/data-dictionary/sql-interface-objects/subordinate-sql-objects

Subordinate objects include the following: **[Idxinfo](https://manual.pvxplus.com/data-dictionary/sql-interface-objects/subordinate-sql-objects#idxinfo)**, **[Colinfo](https://manual.pvxplus.com/data-dictionary/sql-interface-objects/subordinate-sql-objects#colinfo)** and **[Tblinfo](https://manual.pvxplus.com/data-dictionary/sql-interface-objects/subordinate-sql-objects#tblinfo)**. The methods and properties belonging to these objects are described below.

## Idxinfo

Below is a list of *Idxinfo* methods and properties:

|  |  |
| --- | --- |
| **Idxinfo - Provides a common means to describe the indexes for a definition (table) or file** |  |
| **Idxinfo** **Methods** | **Description** |
| **AddSegment**(*n*) | Adds a new index segment at the position specified by *n*. If *n* is null, then a new index segment will be added at the end. Your index object's **SegNo** will be positioned to the new segment added. |
| **DropSegment**(*n*) | Removes an index segment at the position specified by *n*. If *n* is null, then the last index segment will be removed. Your index object's **SegNo** will be positioned to the removed segment. |
| **GetValues$**(*iol_obj$*) | Return value of queried property or properties as a data record:  <br>  <br>*iol_obj$* = **CPL(**"*iolistname$*")  <br>*X$* = **Object'GetValues**(*iol_obj$*)  <br>*X$* = Value found in *name$* for this object |
| **InitValues**( ) | Initializes the object's properties. Strings will be set to null, numeric and Booleans to zero. |
| **Segment**(*n*) | Simple method to change segments. Returns object ID after setting **SegNo**. Allows the user to code:  <br>  <br>Obj'Segment(4)'ColumnWidth  <br>  <br>***or***   <br>  <br>X$ = Obj'Segment(3)'Attributes$ |
| **SetValues**(*val$*, *iol_obj$*) | Set object's properties to the value or values specified:  <br>  <br>*iol_obj$* = **CPL**("*iolistname$, attributes$*")   <br>*val$* = "*newname*"+**SEP**+"Enter your Name"<br>**Object'SetValues**(*val$, iol_obj$*) will return 1 if passed, 0 if failed. |
| **Idxinfo** **Properties** | **Description** |
| **Attributes$** | Attribute string for current index:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| **U** \| Unique \|<br>\| " " \| Not Unique \| |
| **ColumnAttr$** | Attribute string for current segment:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| **A** \| Ascending \|<br>\| **D** \| Descending \| |
| **ColumnName$** | Name of column based on current segment |
| **ColumnNullCharacter$** | *(Not Used)* |
| **ColumnOffset** | Offset into current segment's column (zero-based) |
| **ColumnWidth** | Width to use of current segment's column (zero indicates full column) |
| **IsExternal** | *(Not Used)* |
| **IsUnique** | Boolean indicator for unique index |
| **Name$** | Name of the index |
| **NullCharacter$** | *(Not Used)* |
| **NullSuppress** | *(Not Used)* |
| **SegCount** | ***(Read Only)*** Number of segments for index |
| **SegNo** | Current segment number being referenced |

## Colinfo

Below is a list of *Colinfo* methods and properties:

|  |  |
| --- | --- |
| **Colinfo - Provides a common definition of a data element and provides for common data validation rules** |  |
| **Colinfo** **Methods** | **Description** |
| **GetValues$**(*iol_obj$*) | Return value of queried property or properties as a data record:  <br>  <br>*iol_obj$* = **CPL(**"*iolistname$*")  <br>*X$* = **Object'GetValues**(*iol_obj$*)  <br>*X$* = Value found in *Name$* for this object |
| **InitValues**( ) | Initializes this object's properties. Strings will be set to null, numeric and Booleans to zero. |
| **SetValues**(*val$*, *iol_obj$*) | Set object's properties to the value or values specified:  <br>  <br>*iol_obj$* = **CPL**("*iolistname$, attributes$*")   <br>*val$* = "*newname*"+**SEP**+"Enter your Name"<br>**Object'SetValues**(*val$, iol_obj$*) will return 1 if passed, 0 if failed. |
| **Validate**(*val* \| *val$*) | Validate the contents of the column. Will return 1 if valid, 0 if not. Reason for rejection will be in **ErrorCode$** **/ ErrorMessage$**. |
| **Colinfo** **Properties** | **Description** |
| **AlternateName$** | *(Not Used)* |
| **Class$** | *(Not Used)* |
| **ColumnNo** | Column number |
| **DefaultValue$** | *(Not Used)* |
| **Description$** | *(Not Used)* |
| **ErrorCode$** | *(Not Used)* |
| **ErrorMessage$** | *(Not Used)* |
| **Extension$** | *(Not Used)* |
| **ExternalFormat$** | *(Not Used)* |
| **Help$** | *(Not Used)* |
| **InputLength** | ***(Read Only)*** Length required to allow user to input this data |
| **InternalFormat$** | Valid formats include:<br>**ODBC Types**<br>\|  \|  \|  \|  \|  \|<br>\| --- \| --- \| --- \| --- \| --- \|<br>\| "AUTONUMBER" \| "DATE" \| "INT" \| "NUMERIC" \| "TEXT" \|<br>\| "BIGINT" \| "DATETIME" \| "INTEGER" \| "NVARCHAR" \| "TIMESTAMP" \|<br>\| "BINARY" \| "DATE/TIME" \| "LONG VARCHAR" \| "OLE OBJECT" \| "TINYINT" \|<br>\| "BIT" \| "DECIMAL" \| "MEMO" \| "REAL" \| "UNIQUEIDENTIFIER" \|<br>\| "CHAR" \| "DOUBLE PRECISION" \| "MONEY" \| "SMALLDATETIME" \| "VARBINARY" \|<br>\| "CHARACTER" \| "FLOAT" \| "NCHAR" \| "SMALLINT" \| "VARCHAR" \|<br>\| "COUNTER" \| "HYPERLINK" \| "NTEXT" \| "SMALLMONEY" \| "YES/NO" \|<br>\| "CURRENCY" \| "IMAGE" \| "NUMBER" \| "SQL_VARIANT" \|  \|<br>**OCI Types**<br>\|  \|  \|<br>\| --- \| --- \|<br>\| "BFILE" \| "NCLOB" \|<br>\| "BLOB" \| "NUMBER" \|<br>\| "CHAR" \| "NVARCHAR2" \|<br>\| "CLOB" \| "RAW" \|<br>\| "DATE" \| "ROWID" \|<br>\| "FLOAT" \| "UROWID" \|<br>\| "LONG" \| "VARCHAR2" \|<br>\| "LONG RAW" \| "XMLTYPE" \|<br>\| "NCHAR" \|  \|<br>**DB2 Types**<br>\|  \|  \|<br>\| --- \| --- \|<br>\| "BIGINT" \| "INTERGER" \|<br>\| "BLOB" \| "LONG VARCHAR" \|<br>\| "CHARACTER" \| "REAL" \|<br>\| "CLOB" \| "SMALLINT" \|<br>\| "DATE" \| "TIME" \|<br>\| "DECIMAL" \| "TIMESTAMP" \|<br>\| "DOUBLE" \| "VARCHAR" \| |
| **IsExternal** | *(Not Used)* |
| **IsRequired** | *(Not Used)* |
| **IsUpperCase** | *(Not Used)* |
| **Length** | Length of data in total bytes/digits |
| **Name$** | Name of the column |
| **Notes$** | *(Not Used)* |
| **Occurs$** | *(Not Used)* |
| **ODBCOption$** | *(Not Used)* |
| **Query$** | *(Not Used)* |
| **Scale** | ***(Numeric Type Only)*** Number of decimal points |
| **Security$** | *(Not Used)* |
| **ShortName$** | Short name to be used for column headers |
| **Tag$** | *(Not Used)* |
| **Type$** | Type of data:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| **S** \| String \|<br>\| **N** \| Numeric \| |
| **Validation$** | *(Not Used)* |
| **Variable$** | ***(Read Only)*** Variable name to be used to store data. Name plus **$** if string. |
| **ViewsExpression$** | *(Not Used)* |

## Tblinfo

Below is a list of *Tblinfo* methods and properties:

|  |  |
| --- | --- |
| **Tblinfo - Provides information about the file** |  |
| **Tblinfo** **Methods** | **Description** |
| **GetValues$**(*iol_obj$*) | Return value of queried property or properties as a data record:  <br>  <br>*iol_obj$* = **CPL(**"*iolistname$*")  <br>*X$* = **Object'GetValues**(*iol_obj$*)  <br>*X$* = Value found in *name$* for this object |
| **InitValues( )** | Initialize this object's properties. Strings are set to null, numeric and Booleans are set to zero. |
| **SetValues**(*val$*, *iol_obj$*) | Set object's properties to the value or values specified:  <br>  <br>*iol_obj$* = **CPL**("*iolistname$, description$*")  <br>*val$* = "*newname*"+**SEP**+"Enter your Name"<br>**Object'SetValues**(*val$, iol_obj$*) will return 1 if passed, 0 if failed. |
| **Tblinfo** **Properties** | **Description** |
| **BlockSize$** | *(Not Used)* |
| **Description$** | Short description of the table contents |
| **Extension$** | *(Not Used)* |
| **Group$** | *(Not Used)* |
| **IOProgram$** | *(Not Used)* |
| **IsDataCompression** | *(Not Used)* |
| **IsExtendedRecords** | *(Not Used)* |
| **LastChangeBy$** | *(Not Used)* |
| **LastChangeDate$** | *(Not Used)* |
| **Name$** | Logical file name |
| **Notes$** | *(Not Used)* |
| **Options$** | *(Not Used)* |
| **PhysicalFile$** | *(Not Used)* |
| **Security$** | *(Not Used)* |
| **Separator$** | *(Not Used)* |
