IBM i RPG Lemonade Stand demo (rpg-lemonade) — ibmi-rpg pipeline + greenscreen behavior test
  • Shell 63%
  • RPGLE 37%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-03 22:28:17 +00:00
.vscode feat: Lemonade Stand for the 5250 green screen (ibmi-rpg) 2026-06-30 17:30:39 +02:00
docs feat: Lemonade Stand for the 5250 green screen (ibmi-rpg) 2026-06-30 17:30:39 +02:00
QDDSSRC release: v0.1.2 — conditional color (weather by condition; profit green / loss red) via DDS option indicators 2026-06-30 20:51:41 +02:00
QRPGLESRC release: v0.1.2 — conditional color (weather by condition; profit green / loss red) via DDS option indicators 2026-06-30 20:51:41 +02:00
scripts feat: environment libraries — LIB-targeted compile (CHGCURLIB in-job) + objects.env manifest 2026-07-03 21:25:06 +02:00
.gitignore feat: Lemonade Stand for the 5250 green screen (ibmi-rpg) 2026-06-30 17:30:39 +02:00
CHANGELOG.md release: v0.1.5 (auto-cadence) 2026-07-03 22:28:16 +00:00
extract.sh feat: Lemonade Stand for the 5250 green screen (ibmi-rpg) 2026-06-30 17:30:39 +02:00
README.md docs: branches (trunk/main) + environment-library model in the README 2026-07-04 00:23:08 +02:00
test-1-open-for-business.sh feat: environment libraries — LIB-targeted compile (CHGCURLIB in-job) + objects.env manifest 2026-07-03 21:25:06 +02:00
test-2-cannot-afford.sh feat: environment libraries — LIB-targeted compile (CHGCURLIB in-job) + objects.env manifest 2026-07-03 21:25:06 +02:00
test-3-closing-time.sh feat: environment libraries — LIB-targeted compile (CHGCURLIB in-job) + objects.env manifest 2026-07-03 21:25:06 +02:00
VERSION release: v0.1.5 (auto-cadence) 2026-07-03 22:28:16 +00:00

rpg-lemonade

A playable Lemonade Stand for the IBM i green screen — the classic Apple II / MECC business sim, reimplemented in RPG + DDS and driven over the 5250 by the zelnet client. It is a "crowd-pleaser" showcase for the ibmi-rpg pipeline: compile on a real IBM i (pub400) over zelnet's Host Server client, and test the greenscreen game headless via zelnet --play.

Why Lemonade Stand? It is the one classic that is already shaped like a 5250 app — each day you read the weather, then set glasses-to-make, advertising signs, and price; the program simulates demand and returns a P&L. Pure block-mode, turn-based, character-cell. No engine, just business.

What it is

  • Greenscreen: QDDSSRC/LEMSCR.dspfTITLE splash, PLAY (set glasses / signs / price), RESULT (the day's P&L), ENDGAME (final standing).
  • Program: QRPGLESRC/LEMONADE.rpgle — the game loop plus a documented, seedable economic model (weather + random events drive demand). RNG via CEERAN0, seedable with an entry parameter so the --play behavior test is deterministic.

Build / test / play

  • bash scripts/deploy.sh — compile the DSPF -> RPG DAG on pub400 (warnings-as-errors).
  • bash test-1-open-for-business.sh (plus test-2-cannot-afford.sh and test-3-closing-time.sh) — drive the greenscreen game headless via zelnet --play and assert each scenario (a full day posts a P&L / an over-spend is refused / the stand closes) regardless of the random weather (the behavior gate).
  • bash extract.sh — pull the source members back off the box into Git (the import round-trip).

Branches + environments

  • trunk — the integration trunk (renamed from staging 2026-07-04 to stop colliding with the staging environment). Feature branches land here via make land PROJECT=rpg-lemonade BRANCH=<x>; it is push-protected (only the in-cluster pipeline advances it).
  • main — releases only, advanced by the promote's fast-forward.
  • Environments are IBM i libraries (pub400): SOMEARA1 = dev/CI scratch, SOMEARA2 = staging (trunk builds + behavioral reels + the SAVF package source), SOMEARAB = prod (deploy-only, promoted by integrity-gated CRTDUPOBJ).

Play it interactively: zelnet term pub400.com -> CALL SOMEARAB/LEMONADE (F3 quits) — that's the PROD deploy; CALL SOMEARA2/LEMONADE for staging.

The IBM i objects stay on the box; the release is a provenance tag. See docs/pub400.md.