cat > script <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
: "export two items, definition only"

empexpt -TESTMODE -vd testout1 $MSTESTDB "select table" "view"	
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 755 script
cat > stdout <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'

**  Table: select table  **
    exporting the table definition...
    exporting lock levels...
    exporting table comments...
    exporting range checks...

**  View: view  **
    exporting the view definition...
    exporting table comments...

*** export complete ***
<!HEADER!>

x
<262>
c
<1>

 <!ENDHEADER!>
<!MODHEAD!>
 <!ENDMODHEAD!>
<!TABHEAD!>
select table
0
view
VIEW1
 <!ENDTABHEAD!>
<!TABLE!>
select table
<!CREATE!>
create table 'select table' (attr 'into' integer Not Null,attr 'attr' character(5,1),attr 'table' bulk(20,0,20,1))
<!PRIVILEGE!>
grant alter,drop,empty,index,sort on 'select table' to 'CREATOR' as 'CREATOR';
<!PRIVILEGE!>
grant delete,insert,select,update,display on 'select table' to user as 'CREATOR' with grant option;
<!LOCK!>
lock level on table 'select table' is table
<!TCMMT!>
create comment table 'select table' 'a test of complex names and bulk'
<!RANGE!>
create range 'select table'.'into' >= '1'
<!TABLE!>
view
<!VIEW!>
create view 'view' ( 'into', 'attr', 'table') as select attr 'into', attr 'attr', attr 'table' from 'select table'
<!PRIVILEGE!>
grant alter,drop,empty,index,sort on 'view' to 'CREATOR' as 'CREATOR';
<!PRIVILEGE!>
grant delete,insert,select,update,display on 'view' to user as 'CREATOR' with grant option;
<!TCMMT!>
create comment table 'view' 'a view defined over select table'
 <!ENDFILE!>
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 stdout
cat > stdout.jp_euc <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'

**  Table: select table  **
    ơ֥ݡ档...
    å٥륨ݡ档...
    ơ֥륳ȥݡ档...
    󥸥åݡ档...

**  View: view  **
    ӥ塼ݡ档...
    ơ֥륳ȥݡ档...

*** ݡȽλ ***
<!HEADER!>

x
<262>
c
<1>

 <!ENDHEADER!>
<!MODHEAD!>
 <!ENDMODHEAD!>
<!TABHEAD!>
select table
0
view
VIEW1
 <!ENDTABHEAD!>
<!TABLE!>
select table
<!CREATE!>
create table 'select table' (attr 'into' integer Not Null,attr 'attr' character(5,1),attr 'table' bulk(20,0,20,1))
<!PRIVILEGE!>
grant alter,drop,empty,index,sort on 'select table' to 'CREATOR' as 'CREATOR';
<!PRIVILEGE!>
grant delete,insert,select,update,display on 'select table' to user as 'CREATOR' with grant option;
<!LOCK!>
lock level on table 'select table' is table
<!TCMMT!>
create comment table 'select table' 'a test of complex names and bulk'
<!RANGE!>
create range 'select table'.'into' >= '1'
<!TABLE!>
view
<!VIEW!>
create view 'view' ( 'into', 'attr', 'table') as select attr 'into', attr 'attr', attr 'table' from 'select table'
<!PRIVILEGE!>
grant alter,drop,empty,index,sort on 'view' to 'CREATOR' as 'CREATOR';
<!PRIVILEGE!>
grant delete,insert,select,update,display on 'view' to user as 'CREATOR' with grant option;
<!TCMMT!>
create comment table 'view' 'a view defined over select table'
 <!ENDFILE!>
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 stdout.jp_euc
cat > tag <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
Test export utility, export specific tables.
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 tag
