Skip to content

Get PCML from the compiler

Applies to version 0.1

slay400 reads PCML; it does not write it. The usual source of a PCML file is the ILE RPG compiler itself: pass it PGMINFO(*PCML) and it writes one next to your program, built from your procedure’s parameter list.

# requires: ibmi
CRTBNDRPG PGM(DEMOLIB/ORDSTATUS) SRCSTMF('ordstatus.rpgle') PGMINFO(*PCML) INFOSTMF('ordstatus.pcml')

PGM names the program object to create, SRCSTMF its source, and INFOSTMF where to write the PCML. The compiler derives one <program> with one <data> element per parameter, in order, with the type and length it compiled; it does not know which way data should flow for your API (see /docs/concepts/two-contracts/), only the call contract.

This step needs a real IBM i and is not run by this site’s automated checks; its exact output is not recorded here yet (open item, tracked in the kickoff that added this page).

Copy the PCML file next to where your repository expects it, under apis/<NAME>/<NAME>.pcml, and run slay400 init: see /docs/tutorials/your-first-api/.