cat > script <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
create index on table personnel set date7, date8;
select name, phone, date7, date8 from personnel
	where date7 < 19810202 and date8 > 19800401;
create (2, 0) index short1 on table personnel (number);
insert into personnel set number to 5;
insert into personnel set number to 5;
delete from personnel where name = null;
create unique index credit on personnel(credit_limit);
create (1, 0) index credit personnel set credit_limit;
create (1, 1) index credit on personnel (credit_limit);
create (1, 1) index credit personnel(date2);
insert into personnel set credit_limit to 1;
create unique index short personnel set sint, number, phone;
insert into personnel set sint to 11, number to 177,
	phone to 9617363;
insert into personnel set sint to 11, number to 513,
	phone to 9617363;
update personnel set number to 177 where number = 513;
delete from personnel where name = null;
create distinct index personnel (name, char2, date4);
create unique index on personnel(phone);
update personnel set phone to 9617363 where phone != 9617363;
create (1, 1) index personnel(phone);
create (0, -1) index personnel(date1);
select tab_name, tab_index from sys_tables where tab_name = 'personnel';
drop index credit personnel set credit_limit;
create (3, 0) index personnel personnel (credit_limit);
drop index personnel (name, char2);
drop index on table personnel (name, char2, date4);
drop index unknown personnel;
drop index on personnel(number);
drop index short on personnel set sint, number;
drop index short on personnel;
select tab_name, tab_index from sys_tables where tab_name = 'personnel';
drop index personnel personnel;
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 script
cat > stdout <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
* * . name                   phone       date7       date8

Jones                6672951  01/22/1981  22/01/1981
Mosca                5442243  12/27/1980  27/12/1980
Waldislaw            7236073  11/30/1980  30/11/1980
* * * 
*** Error: too many duplicate values for attribute 'number'
* * 
*** Error: duplicate index key value: '$500.00' (at record: 1, 2)
* 
*** Error: duplicate index key value: '$500.00' (at record: 1, 2)
* * 
*** Error: index 'credit' already exists
* 
*** Error: null value for attribute 'number'
* * . 
*** Error: duplicate value for attribute '(combination)'
* . * 
*** Error: duplicate value for attribute '(combination)'
* * * * 
*** Error: duplicate value for attribute 'phone'
* 
*** Error: index already exists
* *** Syntax Error: expecting a table specification
Error detected near the end of:
create (0, -1
* tab_name                          tab_index

personnel                         1 2 'short1' 2 0 'nu
                                  mber'
                                  1 3 'credit' 1 1 'cr
                                  edit_limit'
                                  2 1 '' 2 15 'date7'
                                  'date8'
                                  3 4 'short' 1 0 'sin
                                  t' 'number' 'phone'
                                  3 5 '' 1 0 'name' 'c
                                  har2' 'date4'
                                  1 6 '' 1 0 'phone'
* * * 
*** Error: index does not exist for 'personnel'
* * 
*** Error: index does not exist for 'personnel'
* * 
*** Error: incompatible index name / attributes for 'personnel'
* * tab_name                          tab_index

personnel                         1 6 '' 1 0 'phone'
                                  1 3 'personnel' 3 0
                                  'credit_limit'
                                  2 1 '' 2 15 'date7'
                                  'date8'
* * 
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 stdout
cat > tag <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
Test for "create index" and "drop index" commands
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 tag
cat > stdout.jp_euc <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
* * . name                   phone       date7       date8

Jones                6672951  01/22/1981  22/01/1981
Mosca                5442243  12/27/1980  27/12/1980
Waldislaw            7236073  11/30/1980  30/11/1980
* * * 
*** Error: ȥӥ塼 'number' ͤϲ¿ʣƤޤ
* * 
*** Error: ʣΥǥå  '$500.00' (쥳: 1, 2) Ǥ
* 
*** Error: ʣΥǥå  '$500.00' (쥳: 1, 2) Ǥ
* * 
*** Error: ǥå 'credit' ϴ¸ߤޤ
* 
*** Error: ȥӥ塼 'number' ͤϥ̥(NULL)Ǥ
* * . 
*** Error: ȥӥ塼 '(combination)' ͤϴ¸ߤޤ
* . * 
*** Error: ȥӥ塼 '(combination)' ͤϴ¸ߤޤ
* * * * 
*** Error: ȥӥ塼 'phone' ͤϴ¸ߤޤ
* 
*** Error: ǥåϴ¸ߤޤ
* *** Syntax Error: ơ֥꤬ɬפǤ
顼ζ᤯ǵƤޤ:
create (0, -1
* tab_name                          tab_index

personnel                         1 2 'short1' 2 0 'nu
                                  mber'
                                  1 3 'credit' 1 1 'cr
                                  edit_limit'
                                  2 1 '' 2 15 'date7'
                                  'date8'
                                  3 4 'short' 1 0 'sin
                                  t' 'number' 'phone'
                                  3 5 '' 1 0 'name' 'c
                                  har2' 'date4'
                                  1 6 '' 1 0 'phone'
* * * 
*** Error: 'personnel' Фǥå¸ߤޤ
* * 
*** Error: 'personnel' Фǥå¸ߤޤ
* * 
*** Error: 'personnel' Ф륤ǥå̾ȥӥ塼ȤǤϻǤޤ
* * tab_name                          tab_index

personnel                         1 6 '' 1 0 'phone'
                                  1 3 'personnel' 3 0
                                  'credit_limit'
                                  2 1 '' 2 15 'date7'
                                  'date8'
* * 
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 stdout.jp_euc
