CHANGE ITEM [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation
DBChange Plus User's Guide
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 10-2 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.
(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 types U, X, or Z, the product of the
subitem count and the subitem length must be an
even number. For data item type P, the product
of the subitem count and the subitem length
must be evenly divisible by 4. 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: I, J, K, R, U,
X, Z, or P. 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 U, X, Z, and P. The length for types I or
J must be 1, 2, or 4. If this parameter is
selected, the SubitemType parameter is also
required. If this parameter is omitted, the
subitem length remains unchanged.
(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. The
following table 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 10-2. DBChange Plus Supported Item Type Conversions
--------------------------------------------------------------------------------------------------------------
| | |
| | New Item Type |
| | |
--------------------------------------------------------------------------------------------------------------
| | | | | | | | | |
| Current | I1,I2 | J1,J2 | K1 | P | R2,R4 | U | X | Z |
| Item Type | | | | | | | | |
| | | | | | | | | |
--------------------------------------------------------------------------------------------------------------
| | | | | | | | | |
| I1,I2 | x | x | x | x | x | x | x | x |
| | | | | | | | | |
--------------------------------------------------------------------------------------------------------------
| | | | | | | | | |
| J1,J2 | x | x | x | x | x | x | x | x |
| | | | | | | | | |
--------------------------------------------------------------------------------------------------------------
| | | | | | | | | |
| K1 | x | x | x | x | x | x | x | x |
| | | | | | | | | |
--------------------------------------------------------------------------------------------------------------
| | | | | | | | | |
| P | x | x | x | x | | x | x | x |
| | | | | | | | | |
--------------------------------------------------------------------------------------------------------------
| | | | | | | | | |
| R2,R4 | x | x | x | | x | | | |
| | | | | | | | | |
--------------------------------------------------------------------------------------------------------------
| | | | | | | | | |
| U | | | | | | x | x | |
| | | | | | | | | |
--------------------------------------------------------------------------------------------------------------
| | | | | | | | | |
| X | | | | | | x | x | |
| | | | | | | | | |
--------------------------------------------------------------------------------------------------------------
| | | | | | | | | |
| Z | x | x | x | x | | x | x | x |
| | | | | | | | | |
--------------------------------------------------------------------------------------------------------------
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.
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