*   *ID* P04SEL5  DBCMD    changed on 1992-09-28-13.27.47 by ADMIN     *
file connect ( kern test !
select name, deptno from emp!
fetch !
select erg1 (name, deptno) from emp order by deptno !
fetch erg1 !
select erg2 (name, deptno) from erg1
           where deptno >= 50 !
fetch erg2!
close erg1 !
close erg2 !
select erg1 (manager, name, currsal, deptno) from emp for reuse!
fetch erg1 !
select erg1a (*) from erg1!
fetch erg1a !
close erg1a !
select erg2 ( deptno, name, manager) from erg1
           where deptno >= 50 for reuse!
fetch erg2!
select erg2a (*) from erg2!
fetch erg2a !
close erg2a !
select erg3 (deptno, name, manager) from erg1
     order by deptno!
fetch erg3!
close erg3 !
select erg4 (name, manager, deptno ) from erg1 order by deptno!
fetch erg4!
select erg5 (name) from erg4 !
fetch erg5!
close erg4 !
close erg5 !
select erg10 (manager, name, deptno, currsal) from emp
where deptno = 50 and  currsal > 10000 for reuse!
fetch erg10 !
select erg11 (name, currsal, deptno) from erg10!
fetch erg11!
select erg20 (manager, name, deptno, currsal) from emp
where deptno >= 50 and (currsal > 14000 or name < 'Pat') for reuse!
fetch erg20!
select erg21 (name, currsal, deptno) from erg20!
fetch erg21!
select erg30 (manager, name, deptno, currsal) from emp
where deptno = 50 or currsal > 14000 for reuse!
fetch erg30 !
select erg31 (name, currsal, deptno) from erg30 !
fetch erg31!
select erg41 (manager, name, deptno, currsal) from erg1
where deptno = 50 and  currsal > 14000!
fetch erg41!
select erg42 (manager, name, deptno, currsal) from erg1
where deptno >= 50 and (currsal > 14000 or name < 'Pat') !
fetch erg42!
select erg43 (manager, name, deptno, currsal) from erg1
where deptno = 50 or currsal > 14000!
fetch erg43!
select erg1041 (manager, name, deptno, currsal) from erg10
where deptno = 50 and  currsal > 14000!
fetch erg1041!
select erg1042 (manager, name, deptno, currsal) from erg10
where deptno >= 50 and deptno < 70 and
(currsal > 14000 or name < 'Pat') !
fetch erg1042!
select erg1043 (manager, name, deptno, currsal) from erg10
where deptno = 50 or currsal > 14000 or name < 'Martin'!
fetch erg1043!
close erg10 !
close erg1041 !
close erg1042 !
close erg1043 !
select erg2041 (manager, name, deptno, currsal) from erg20
where deptno = 50 and  currsal > 14000!
fetch erg2041!
select erg2042 (manager, name, deptno, currsal) from erg20
where deptno >= 50 and (currsal > 14000 or name < 'Pat') !
fetch erg2042!
select erg2043 (manager, name, deptno, currsal) from erg20
where deptno = 50 or currsal > 14000!
fetch erg2043!
close erg20 !
close erg2041 !
close erg2042 !
close erg2043 !
select erg3041 (manager, name, deptno, currsal) from erg30
where deptno = 50 and  currsal > 14000!
fetch erg3041!
select erg3042 (manager, name, deptno, currsal) from erg30
where deptno >= 50 and (currsal > 14000 or name < 'Pat') !
fetch erg3042!
select erg3043 (manager, name, deptno, currsal) from erg30
where deptno = 50 or currsal > 14000!
fetch erg3043!
close erg30 !
close erg3041 !
close erg3042 !
close erg3043 !
commit work release !
