CHANGE ITEM [ DBChange Plus Technical Addendum for MPE/iX Release 4.0 ] MPE/iX 5.0 Documentation
DBChange Plus Technical Addendum for MPE/iX Release 4.0
CHANGE ITEM
Changes the subitem count, type, length, security, and/or order of a data
item. (For information about supported item type conversions, refer to
Table 3-1 later in this section.)
Syntax
CHA[NGE] ITEM DataItemName [(NextItem)] [SubitemCount] SubitemType SubitemLength
[([ReadClassList]/[WriteClassList])]
Parameters
DataItemName is the name of the data item to be changed. It
must be an existing data item in the database.
Each data item within the database must have a
unique name. This name must be from 1 to 16
characters, the first of which must be
alphabetic. Characters after the first must be
chosen from this set: letters A - Z, digits 0
- 9, and + * / ? ' # % & @ only.
(NextItem) is the name of the data item that will follow
the changed data item in the schema. If this
parameter is omitted, the data item order is
not changed.
SubitemCount must be an integer from 1 through 255. For
data item type P, the product of the subitem
count and the subitem length must be evenly
divisible by 4. For data item types U, X, and
Z, the product of the subitem count and the
subitem length must be an even number. The
default is 1 subitem. If this parameter is
selected, the SubitemType and the SubitemLength
parameters are also required. If this
parameter is omitted, the subitem count remains
unchanged.
SubitemType must be a valid data item type: [!]E, I, J, K,
P, R, U, X, or Z. Data type E is specified in
two ways as follows:
E Specifies IEEE format for real numbers.
!E Specifies IEEE format when the stored data
is already in IEEE data format. The
optional exclamation point (!) indicates
that the data type is changed to type E;
however, the data is not converted because
it is already in the correct format. To
use !E, the current subitem length must be
equivalent to 2 or 4 halfwords.
If this parameter is selected, the
SubitemLength parameter is also required. If
this parameter is omitted, the subitem type
remains unchanged.
SubitemLength must be an integer from 1 to 255 for data item
types P, U, X, and Z. The length for types I
and J must be 1, 2, or 4. For type K, it must
be 1 or 2; and for types E and R, it must be 2
or 4. For data item type P, the product of the
subitem count and the subitem length must be
evenly divisible by 4. For data item types U,
X, and Z, the subitem count and the subitem
length must be an even number. If this
parameter is selected, the SubitemType
parameter is also required. If this parameter
is omitted, the subitem length remains
unchanged.
______________________________________________
NOTE When specifying type E with the
no-conversion option (!E), if the subitem
length is changed from 2 to 4, or 4 to 2,
the data has to be converted to fit into
the new field size with the assumption it
is already in IEEE format.
______________________________________________
(ReadClassList/ defines user class access to the data set. If
WriteClassList) this entire parameter is omitted, the data item
security remains unchanged. The class lists
are defined as follows:
(ReadClassList) is a list of user classes
having read access to the
data set. It can consist
of user class numbers from
0 to 63, separated by
commas. If this parameter
is empty [for example,
(/12,14)], read access to
the data set remains
unchanged.
(WriteClassList) is a list of user classes
that have write (and
implied read) access to the
data set. It can consist
of user class numbers from
0 to 63, separated by
commas. If this parameter
is empty [for example
(12,14/)], write access to
the data set remains
unchanged.
Description
Use this command when making several data item changes at the same time.
NOTE Several parameters are interrelated. For example, if you enter the
subitem count, you must enter the subitem type and the subitem
length, even if the last two parameters have not changed. The
SubitemType and SubitemLength parameters are also interrelated. If
you enter one, you must enter the other, even if only one has
changed.
When making changes to data item security, remember that access to data
items within data sets may be further allowed or restricted by data set
security.
Item Type Conversions
DBChange Plus supports type conversion for all data item types defined in
the TurboIMAGE/XL Reference Manual with the exception of I4 and J4.
Table 3-1 shows the data item type conversions supported by DBChange
Plus. An x in the appropriate box indicates that you can convert the
current item type to the new item type.
Table 3-1. DBChange Plus Supported Item Type Conversions
-----------------------------------------------------------------------------------------------------------------
| | |
| Current | New Item Type |
| Item Type | |
| | |
-----------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| | E2,E4* | I1,I2 | J1,J2 | K1 | P | R2,R4 | U | X | Z |
| | | | | | | | | | |
-----------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| E2,E4 | x | x | x | x | | x | | | |
| | | | | | | | | | |
-----------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| I1,I2 | x | x | x | x | x | x | x | x | x |
| | | | | | | | | | |
-----------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| J1,J2 | x | x | x | x | x | x | x | x | x |
| | | | | | | | | | |
-----------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| K1 | x | x | x | x | x | x | x | x | x |
| | | | | | | | | | |
-----------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| P | | x | x | x | x | | x | x | x |
| | | | | | | | | | |
-----------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| R2,R4 | x | x | x | x | | x | | | |
| | | | | | | | | | |
-----------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| U | | | | | | | x | x | |
| | | | | | | | | | |
-----------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| X | | | | | | | x | x | |
| | | | | | | | | | |
-----------------------------------------------------------------------------------------------------------------
| | | | | | | | | | |
| Z | | x | x | x | x | | x | x | x |
| | | | | | | | | | |
-----------------------------------------------------------------------------------------------------------------
| |
| * !E2 or !E4 assumes a current data type of E. The length must be equivalent to 2 or |
| 4 halfwords. |
| |
-----------------------------------------------------------------------------------------------------------------
CAUTION When converting data item types, overflow, underflow, and
truncation may occur if you are reducing data item size. Be
sure to verify that data item conversions do not result in loss
of data. When converting to new data types and prior to
restructuring your database, always check any values that could
exceed the minimum and maximum limits for the new data types.
You can use QUERY/3000 to verify the data item conversions and
to check for values less than the minimum and greater than the
maximum limits before converting to the new data type.
Example
>change item deliv-date 2 u 6 (/11,14)
In this example, the subitem count of the data item DELIV-DATE is changed
to 2, the subitem type to U, and the subitem length to 6. User class 11
has also been given write access to the data item. Note that the subitem
length must be entered even though it has not been changed. Because
NextItem was not entered, the data item order remains the same.
Before the change, the ITEMS part of the schema looks like this:
ITEMS:
ACCOUNT , J2(0,11,12,13,14,18/);
BINNUM , Z2(/13);
CITY , X12(12,13,14,/11);
CREDIT-RATING , R2(/14);
DATE , X6(0,11,12,13,14,18/);
DELIV-DATE , X6(/14); <== item to be changed
DESCRIPTION , X20(0,11,12,13,14,18/);
FIRST-NAME , X10(14/11);
INITIAL , U2(14/11);
LAST-NAME , X16(14/11);
LASTSHIPDATE , X6(12/);
ONHANDQTY , J2(14/12);
PRICE , J2(14/);
PURCH-DATE , X6(11/14);
QUANTITY , I1(/14);
STATE , X2(12,13,14,/11);
STOCK# , U8(0,11,12,13,14,18/);
STREET-ADD , S26(12,13,14/11);
SUPPLIER , X16(12,13/);
TAX , J2(14/);
TOTAL , J2(11,14);
UNIT-COST , P8(/12);
ZIP , X6(12,13,14/11);
After the change, the ITEMS part of the schema looks like this:
ITEMS:
ACCOUNT , J2(0,11,12,13,14,18/);
BINNUM , Z2(/13);
CITY , X12(12,13,14,/11);
CREDIT-RATING , R2(/14);
DATE , X6(0,11,12,13,14,18/);
DELIV-DATE , 2U6(/11,14); <== item changed
DESCRIPTION , X20(0,11,12,13,14,18/);
FIRST-NAME , X10(14/11);
INITIAL , U2(14/11);
LAST-NAME , X16(14/11);
LASTSHIPDATE , X6(12/);
ONHANDQTY , J2(14/12);
PRICE , J2(14/);
PURCH-DATE , X6(11/14);
QUANTITY , I1(/14);
STATE , X2(12,13,14,/11);
STOCK# , U8(0,11,12,13,14,18/);
STREET-ADD , S26(12,13,14/11);
SUPPLIER , X16(12,13/);
TAX , J2(14/);
TOTAL , J2(11,14);
UNIT-COST , P8(/12);
ZIP , X6(12,13,14/11);
STORE# , J2(11,12/14);
MPE/iX 5.0 Documentation