Spooled files into documents, for IBM i.

Open output management.

Spooldoc turns IBM i spooled files into documents. It watches your output queues and reads each spooled file into JSON with a YAML definition. Lookups add what the page does not print from Db2 for i. Templates in HTML, Word or Excel make PDF, HTML, DOCX or XLSX files, sent by email, webhook or SFTP, or saved to the IFS. The agent proposes the first definition and template from a sample; you check every value. Nothing is installed on the IBM i.

Quick start, with Docker

git clone https://github.com/Strom-Capital/spooldoc.git
cd spooldoc
printf 'BETTER_AUTH_SECRET=%s\nSPOOLDOC_SECRET_KEY=%s\n' \
  "$(openssl rand -base64 32)" \
  "$(openssl rand -base64 32)" > .env
docker compose up -d

Then open http://localhost:3000 and create the first account. See Getting started for the first job.

The job builder shows the sample invoice page with every extracted field highlighted, the YAML definition beside it, and the agent panel on the right.The job builder shows the sample invoice page with every extracted field highlighted, the YAML definition beside it, and the agent panel on the right.

Spooldoc in 90 seconds

Transcript

Your IBM i programs print invoices, pick lists and reports. Spooldoc turns those spooled files into documents. Your programs don't change, and nothing is installed on the IBM i. Spooldoc connects over the host servers and watches your output queues.

A definition, written in YAML, reads each page into data. Fields by label or position, tables of lines, and one document per invoice. It reads plain text spooled files in any code page, and XML printed into a spooled file.

A template lays out that data. It never sees lines and columns. Write it in HTML, or make it in Word or Excel. Each one makes its own file, a PDF, or both, and you see the document as you edit.

From a sample spooled file, the agent proposes the definition and the template. You check every value next to the page.

Each new spooled file becomes a run. Spooldoc reads it, makes the documents, and delivers the files to a download or a folder in the IFS. Every run is in the job log.

Spooldoc. Spooled files into documents, for IBM i. Open source, MIT licensed. spooldoc.com.

Five more minutes: the walkthrough on YouTube.

Programs print as they always have

Your programs on the IBM i (AS/400, iSeries) print to output queues, unchanged. Spooldoc connects through jt400 and runs a job for every new spooled file, by polling or in real time through a data queue. A run reads the file, extracts the page groups, makes a document of each with every template, delivers the files, then holds, moves, deletes or leaves the spooled file. Nothing is installed on the IBM i.

Architecture: programs on the IBM i print to an output queue, optionally with a data queue; Spooldoc's watcher picks up new spooled files by polling or in real time, and a run captures, extracts, renders, delivers and finishes each one; the job builder and the agent write to the same Postgres database; delivered files go to a destinationArchitecture: programs on the IBM i print to an output queue, optionally with a data queue; Spooldoc's watcher picks up new spooled files by polling or in real time, and a run captures, extracts, renders, delivers and finishes each one; the job builder and the agent write to the same Postgres database; delivered files go to a destination

From a sample page to a delivered document

The Home page shows counts of servers, output queues, jobs and runs, a chart of runs per day by status, and two items under Needs attention: a server that cannot be reached and a failed run.The Home page shows counts of servers, output queues, jobs and runs, a chart of runs per day by status, and two items under Needs attention: a server that cannot be reached and a failed run.

Home

Servers, output queues, jobs and runs at a glance, with a chart of runs per day.

The job builder with the extract step open shows the seven pipeline steps across the top, with Lookups between Extract and Render, the sample invoice page with field hits highlighted on the left, and the definition editor on the right.The job builder with the extract step open shows the seven pipeline steps across the top, with Lookups between Extract and Render, the sample invoice page with field hits highlighted on the left, and the definition editor on the right.

Job builder

The sample page with every field it found highlighted, next to the YAML that found it.

The render step of a job with two templates shows the Document template's HTML in an editor on the left and the rendered invoice preview on the right.The render step of a job with two templates shows the Document template's HTML in an editor on the left and the rendered invoice preview on the right.

Templates

An HTML template beside the document it makes, rendered by Carbone as you edit.

A run opened from the job log shows its status, the spooled file, the five steps with their timings, and the five pick list PDFs it delivered.A run opened from the job log shows its status, the spooled file, the five steps with their timings, and the five pick list PDFs it delivered.

Job log

Every run with its steps, their timings and the files it delivered.