cat > script <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
hold select from loans;
start;
select name from loans where amount > 50.00;
select name from loans where name match 'J*';
store into XX1;
recall;
hold 2;
run;
recall all;
store 2 onto XX1;
recall 1;
run 1 into XX2;
start XX1 onto XX2;
do 'cat XX2';
set tab loans;
hold select $1 from $tab where amount > '$2';
recall;
run set amount, 100.00;
store into XX3;
do 'cat XX3';
run XX3 set date, 50.00;
start from XX3 (name, 250.00, 19840619);
do 'rm XX*';
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 755 script
cat > stdout <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
* * select from loans;
name                                    date        amount

Mosca                       2 February  1981       $150.00
Jones                       7 February  1981        $33.95
Kilroy                     16 February  1981       $250.00
Wladislaw                  27 February  1981        $55.00
Jones                       3 April     1981        $25.00
Mosca                       4 May       1981       $200.00
Wladislaw                  12 May       1981        $25.00
Peterson                    6 June      1981        $50.00
Wladislaw                  25 June      1981        $75.00
Jones                      12 August    1981       $300.00
* name

Mosca
Kilroy
Wladislaw
Mosca
Wladislaw
Jones
* name

Jones
Jones
Jones
* * select name from loans where name match 'J*';
* * select name from loans where amount > 50.00;
name

Mosca
Kilroy
Wladislaw
Mosca
Wladislaw
Jones
*    1  select from loans;
   2  select name from loans where amount > 50.00;
   3  select name from loans where name match 'J*';
   4  select name from loans where amount > 50.00;
* * select from loans;
* select from loans;
* * name                                    date        amount

Mosca                       2 February  1981       $150.00
Jones                       7 February  1981        $33.95
Kilroy                     16 February  1981       $250.00
Wladislaw                  27 February  1981        $55.00
Jones                       3 April     1981        $25.00
Mosca                       4 May       1981       $200.00
Wladislaw                  12 May       1981        $25.00
Peterson                    6 June      1981        $50.00
Wladislaw                  25 June      1981        $75.00
Jones                      12 August    1981       $300.00
name

Jones
Jones
Jones
name

Mosca
Kilroy
Wladislaw
Mosca
Wladislaw
Jones
* * * select $1 from $tab where amount > '$2';
* select $1 from $tab where amount > '$2';
      amount

     $150.00
     $250.00
     $200.00
     $300.00
* * select $1 from $tab where amount > '$2';
*              date

 2 February  1981
16 February  1981
27 February  1981
 4 May       1981
25 June      1981
12 August    1981
* name

Jones
* * 
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 stdout
cat > tag <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
Test for "hold", "recall", "run", "start" and "store" commands
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 tag
