# IceBreak build 0804

| Download | Contents |
|---|---|
| [IceBreak-0804.savf](https://webfiles.system-method.com/download/IceBreak/savf/IceBreak-0804.savf) | The bundle: IceBreak and the admin server in one save file |
| [IceBreak-0804-core.savf](https://webfiles.system-method.com/download/IceBreak/savf/IceBreak-0804-core.savf) | IceBreak alone, without the admin server |
| [IceBreak-0804-admin.savf](https://webfiles.system-method.com/download/IceBreak/savf/IceBreak-0804-admin.savf) | The admin server alone, for an IceBreak that is already installed |

## Before you start

- Log on with IBM i Access Client Solutions (ACS) as QSECOFR or as a profile with
  SPCAUT(\*ALLOBJ \*SECADM \*JOBCTL).
- Open "Run SQL Scripts", paste one of the scripts below, place the cursor on the first line and
  press CTRL-R. Check the job log with CTRL-J.
- The scripts download the save file to `/tmp` with SYSTOOLS.HTTPGETBLOB. A system that cannot
  reach the internet: copy the save file to `/tmp` on the IBM i in any way (for example FTP in
  binary mode), leave out the two download lines (`set buf` and `ifs_write_binary`) and run the
  rest.
- Change the values to your own: `LIB` and `ICELIB` (the IceBreak library, here ICEBREAK),
  `IFSPATH` (here /sitemule/IceBreak), `SVRID` (the admin server's name, here ADMIN) and
  `ADMINPORT` (the admin server's port, here 7000). Installing into an existing IceBreak library
  upgrades it: the installed library is kept as a backup library ICEBCKnnnn and your data is
  copied into the new release.

## 1. The bundle: IceBreak and the admin server

One save file for both - the easiest to move into a production system. ICEINSTALL installs
IceBreak into LIB; ICEINSTADM then installs the admin library (LIB's name + ADM, e.g. ICEBREAKAD)
and creates the admin server SVRID on ADMINPORT. Without the admin server, leave out the two
ICEINSTADM lines.

```sql
begin
    declare buf blob(2G);
    set buf = systools.httpgetblob (url => 'https://webfiles.system-method.com/download/IceBreak/savf/IceBreak-0804.savf', httpheader => null);
    call qsys2.ifs_write_binary(path_name => '/tmp/IceBreak-0804.savf', line => buf, overwrite => 'REPLACE');
    begin
        declare continue handler for sqlexception begin end;
        call qcmdexc ('DLTLIB ICEINSTTMP');
    end;
    call qcmdexc ('CPYFRMSTMF FROMSTMF(''/TMP/IceBreak-0804.savf'') TOMBR(''/QSYS.LIB/QTEMP.LIB/ICEBREAK.FILE'') MBROPT(*REPLACE) CVTDTA(*NONE)');
    call qcmdexc ('RSTLIB SAVLIB(BLUEICE) DEV(*SAVF) SAVF(QTEMP/ICEBREAK) RSTLIB(ICEINSTTMP)');
    call qcmdexc ('CHGCMD ICEINSTTMP/ICEINSTALL PRDLIB(ICEINSTTMP)');
    call qcmdexc ('ICEINSTTMP/ICEINSTALL LIB(ICEBREAK) IFSPATH(''/sitemule/IceBreak'')');
    call qcmdexc ('CHGCMD ICEINSTTMP/ICEINSTADM PRDLIB(ICEINSTTMP)');
    call qcmdexc ('ICEINSTTMP/ICEINSTADM ICELIB(ICEBREAK) SVRID(ADMIN) ADMINPORT(7000)');
    call qcmdexc ('DLTLIB ICEINSTTMP');
end;
```

## 2. IceBreak alone (the core)

IceBreak without the admin server. The admin server can be added later with step 3.

```sql
begin
    declare buf blob(2G);
    set buf = systools.httpgetblob (url => 'https://webfiles.system-method.com/download/IceBreak/savf/IceBreak-0804-core.savf', httpheader => null);
    call qsys2.ifs_write_binary(path_name => '/tmp/IceBreak-0804-core.savf', line => buf, overwrite => 'REPLACE');
    begin
        declare continue handler for sqlexception begin end;
        call qcmdexc ('DLTLIB ICEINSTTMP');
    end;
    call qcmdexc ('CPYFRMSTMF FROMSTMF(''/TMP/IceBreak-0804-core.savf'') TOMBR(''/QSYS.LIB/QTEMP.LIB/ICEBREAK.FILE'') MBROPT(*REPLACE) CVTDTA(*NONE)');
    call qcmdexc ('RSTLIB SAVLIB(BLUEICE) DEV(*SAVF) SAVF(QTEMP/ICEBREAK) RSTLIB(ICEINSTTMP)');
    call qcmdexc ('CHGCMD ICEINSTTMP/ICEINSTALL PRDLIB(ICEINSTTMP)');
    call qcmdexc ('ICEINSTTMP/ICEINSTALL LIB(ICEBREAK) IFSPATH(''/sitemule/IceBreak'')');
    call qcmdexc ('DLTLIB ICEINSTTMP');
end;
```

## 3. The admin server alone

For an IceBreak that is already installed (step 2). It checks that the IceBreak in ICELIB is new
enough, installs the admin library and creates the admin server SVRID on ADMINPORT.

```sql
begin
    declare buf blob(2G);
    set buf = systools.httpgetblob (url => 'https://webfiles.system-method.com/download/IceBreak/savf/IceBreak-0804-admin.savf', httpheader => null);
    call qsys2.ifs_write_binary(path_name => '/tmp/IceBreak-0804-admin.savf', line => buf, overwrite => 'REPLACE');
    begin
        declare continue handler for sqlexception begin end;
        call qcmdexc ('DLTLIB ICEADMTMP');
    end;
    call qcmdexc ('CPYFRMSTMF FROMSTMF(''/TMP/IceBreak-0804-admin.savf'') TOMBR(''/QSYS.LIB/QTEMP.LIB/ICEADMIN.FILE'') MBROPT(*REPLACE) CVTDTA(*NONE)');
    call qcmdexc ('RSTLIB SAVLIB(BLUEADM) DEV(*SAVF) SAVF(QTEMP/ICEADMIN) RSTLIB(ICEADMTMP)');
    call qcmdexc ('CHGCMD ICEADMTMP/ICEINSTADM PRDLIB(ICEADMTMP)');
    call qcmdexc ('ICEADMTMP/ICEINSTADM ICELIB(ICEBREAK) SVRID(ADMIN) ADMINPORT(7000)');
    call qcmdexc ('DLTLIB ICEADMTMP');
end;
```

## What's changed in build 0804


#### Check your webconfig before you upgrade

- **Routing maps: `lib="*LIBL"` is refused.** A `<routing><map>` with `lib="*LIBL"` now answers
  "403 Forbidden": through the library list a URL could run any program the list finds. Name
  the library instead - or **`lib="*ICELIB"`** for IceBreak's own programs, for example
  `<map pattern="\.md$" pgm="md2html" lib="*ICELIB"/>` or `<map pattern="/router/"
  pgm="svcrouter" lib="*ICELIB"/>`. Without `lib` a map runs from the server's application
  library, as before.
- **Hives serve files.** On `<hives><map>`, `lib`, `libl` and `srclib` are no longer used: a page
  called by its file name through a hive runs from the server's application library, never from
  the library list. The same for `applib` and `libl` of `setHive()`. Programs of other
  libraries belong in `<routing>`.
- **The hive table `MAP00` is gone** (hives in the IceBreak menu / the admin's old hive pages).
  Define hives in the webconfig's `<hives>`.

#### Fixed

- **Servers start reliably after a subsystem restart.** The job queue `SVC` could stay held after
  `STRICESBS`, so no server started. It is now held and released in a fixed order, and it works
  the same with `ENDSBS`/`STRSBS` and `ENDICESBS`/`STRICESBS` in any mix. A server job left in the
  job queue from before the restart now ends at once instead of running next to the new one.
- **Ending a server** no longer fails with "Unable to allocate a record in file SJB01".

#### Removed

- The command `RTVICEENV` (and the program `SVC182` and the file `QGPL/ICEENV00` it read): nothing
  in IceBreak used them. Copies in QGPL from earlier installations are left alone.

#### The admin server

- Work with servers: the library list of a server is changed by the admin itself (no `SVC803`),
  and only after a log-on. The old hive pages (on `MAP00`) are gone.
- The admin of this build needs IceBreak build 0804 or later.
