Tutorials

RPG %INFO, INZ(*LIST) and ALWUPD: what to adopt from the fall TR

· 10 min read · Updated Nov 25, 2026
On this page

The RPG %INFO built-in function is the most useful of the four RPG additions IBM shipped with the fall 2026 Technology Refreshes, and it is also the only one that can break a deployment. It needs a runtime PTF on every system that runs the program, not just the one where you compile it. Compile on a patched dev partition, promote to a production box that hasn’t taken the PTF, and you have a problem that no compile listing will warn you about.

The four additions arrived as PTFs for IBM i 7.5 and 7.6 alongside 7.6 TR3 and 7.5 TR9: %INFO, array initialization from a list of values, an ALWUPD option on CRTBNDRPG, and implicit CCSID conversion for OPTIONS(*STRING) parameters. Here is what each changes in your source, what each needs on which box, and the order I would adopt them in.

Initialize an array from a list: INZ(*LIST) and DIM(*INZ)

This is the one you will use tomorrow. Until now, a fixed set of array values meant one of three workarounds: compile-time data at the bottom of the source, a data structure with unnamed subfields overlaid by an array, or assignments in an initialization routine. The overlay version looks like this:

dcl-ds regionData;
  *n char(4) inz('EAST');
  *n char(4) inz('WEST');
  *n char(4) inz('NRTH');
  *n char(4) inz('SOTH');
  regions char(4) dim(4) pos(1);
end-ds;

With the fall PTF it is one line. IBM’s syntax is INZ(*LIST:value1:value2…), and DIM(*INZ) tells the compiler to count the values for you:

dcl-s regions char(4) dim(*inz) inz(*list : 'EAST' : 'WEST' : 'NRTH' : 'SOTH');

DIM(*INZ) matters more than it looks. The old pattern let the DIM and the value count drift apart when someone added a fifth region and forgot to bump DIM(4). With DIM(*INZ) the dimension comes from the data, so that bug can’t happen.

You can also initialize an array from an enumeration name, which pairs well with the typed enumerations from fall 2025. These two declarations are IBM’s examples:

dcl-enum e3 qualified;
  v1 'a';
  v2 'b';
end-enum;

dcl-s array3 char(10) dim(*inz) inz(e3);                        // DIM(2)
dcl-s array4 packed(5:2) inz(*list : 5.2 : 1.7 : -7.3) dim(*inz); // DIM(3)

IBM’s notes call for a runtime PTF only for %INFO, so INZ(*LIST) needs the compiler PTF on the system where you build and nothing extra where the program runs. Use it in new code now. Rewriting old overlay structures is not worth a regression test on its own, but convert them when you are in the program anyway.

The RPG %INFO built-in function, and why the PSDS wasn’t enough

%INFO returns facts about the running program and the job. IBM’s reason for adding it is blunt: the Program Status Data Structure “is initialized during the *INIT phase of the RPG cycle and some of the information in the PSDS might be out of date.”

Program values are *PGM, *LIB, *OBJ (returned as LIBNAME/PGMNAME), *OBJTYPE (*PGM or *SRVPGM), *MODULE, *STMT and *ACTGRP. *STMT is the statement number the debugger and the joblog use, which makes it handy in log messages. *PGM and *LIB can differ from the PSDS if the program was renamed, moved or recompiled after the PSDS was filled.

Job values are *USER, *JOB (NUMBER/USER/NAME) and *JOBTYPE, plus four that take a second parameter: *JOBCCSID, *JOBDATE, *JOBDATFMT and *JOBDECFMT. Pass *CURRENT for the value right now, or *MODULE for the value the RPG module captured at initialization and still uses for its own conversions. *USER always returns the current user profile, which may not match the PSDS or a field initialized with INZ(*USER) after a profile swap.

The *CURRENT versus *MODULE pair is the clever part. If something runs CHGJOB mid-job, your module may still be converting with the old CCSID or date format. IBM suggests comparing the two to catch it. A sketch of what that looks like (my code, built from IBM’s parameter table, so compile it before you trust it):

dcl-s msg varchar(200);

if %info(*jobccsid : *current) <> %info(*jobccsid : *module);
  msg = 'Job CCSID changed after ' + %info(*obj)
      + ' initialized. Stmt ' + %char(%info(*stmt));
  snd-msg *escape msg;
endif;

Module initialization happens the first time any procedure in the module is called, and when the cycle-main procedure is called unless the previous call ended with *INLR off. A program that returns with *INLR off and stays active all day is exactly where a stale *MODULE value lives.

The %INFO runtime PTF trap

IBM’s warning on the %INFO page: “If you use %INFO() in your program, you need a runtime PTF on any system where you run the program.” The runtime PTF is in 5770-SS1, the operating system, not 5770-WDS, the compiler. Your developers’ partition getting the compiler PTF tells you nothing about production.

Count every place the object lands. IBM’s RPG reference says the runtime PTF must be on any system where the program is restored, so the list is longer than “production”:

SystemWhy it needs the 5770-SS1 runtime PTF
ProductionRuns the program
HA target (MIMIX, iCluster, PowerHA)Runs it after a switchover
DR or cloud backup partitionRuns it after a restore
Customer systems, if you ship softwareRun your objects, on their PTF schedule

If you compile on 7.6 with TGTRLS(V7R5M0) for a 7.5 box, there is a separate compiler PTF for that target, and the 7.5 system needs the 7.5 runtime PTF.

IBM had not published PTF numbers as of November 25; the RPG Cafe still lists them as “to be updated later.” Once it does, add a check to your promotion step. DSPPTF LICPGM(5770SS1) SELECT(SIxxxxx) answers it on one box, and if you already query PTF status with SQL, QSYS2.PTF_INFO filtered on PTF_IDENTIFIER does the same across systems. The weekly routine in keeping up with IBM i security PTFs is a natural place to fold it in.

My rule: no %INFO in code headed for a box where ops hasn’t confirmed the runtime PTF, including the HA target. Until then, the PSDS still works.

OPTIONS(*STRING) with CCSID(*EXACT): delete the %char() wrappers

If you compile with ctl-opt ccsid(*exact), you have hit this. Passing a literal to a parameter defined as pointer value options(*string) failed with RNF7458, “Only the job CCSID is valid for OPTIONS(*STRING).” The fix was wrapping every literal in %char(). Adapted from the IBM Idea that asked for the change:

ctl-opt ccsid(*exact) dftactgrp(*no);

someproc(%char('a'));   // before: needed to avoid RNF7458
someproc('a');          // after the fall PTF: compiles

return;

dcl-proc someproc;
  dcl-pi *n;
    p1 pointer value options(*string);
  end-pi;
end-proc;

IBM now accepts any character, graphic or UCS-2 value and converts it to the job CCSID. That is the catch. The C-style APIs you prototype this way, like open() or system(), still get a job-CCSID string. A UTF-8 IFS path with characters your job CCSID can’t represent won’t survive the trip, with or without %char(). The change removes noise. It does not change what the API receives.

Adopt it when you touch code that has the wrappers. No runtime PTF is called out.

ALWUPD on CRTBNDRPG: a policy decision, not a coding one

Two-step builds (CRTRPGMOD plus CRTPGM) have always had ALWUPD. Someone asked for it on CRTBNDRPG in 2017, and IBM closed the request in 2020 as low priority. It shipped anyway: CRTBNDRPG gets an ALWUPD parameter and a matching Control keyword.

The default is *ACTGRP, which keeps today’s behavior. DFTACTGRP(*YES) programs are created with ALWUPD(*NO), and everything else gets ALWUPD(*YES). Nothing changes unless you opt in:

ctl-opt dftactgrp(*no) alwupd(*no);
CRTBNDRPG PGM(APPLIB/ORDENT) SRCFILE(APPLIB/QRPGLESRC) DFTACTGRP(*NO) ALWUPD(*NO)

Precedence runs the usual RPG way: IBM says a program compiled with ALWUPD(*NO) on the command can still be updated by UPDPGM “unless Control keyword ALWUPD(*YES) is specified.” The source wins. If you want this as a shop rule, enforce it in the build script and check that no source member overrides it.

Who should set it? Any shop where an auditor asks whether the production object matches the compiled source. ALWUPD(*NO) means nobody can rebind a production program with UPDPGM outside your change process. If your deployment depends on UPDPGM to repoint service program references, leave the default. IBM’s notes only mention ALWUPD, not ALWLIBUPD.

The CRTBNDRPG command PTF resets your CHGCMDDFT changes

This one is easy to miss. To add the ALWUPD parameter, IBM ships a PTF for the CRTBNDRPG command itself, and the RPG Cafe says: “When you apply a PTF for a command, the command defaults revert to the shipped values. Any changes previously made with CHGCMDDFT are lost.” On 7.5 the same PTF also touches CRTRPGMOD.

Plenty of shops changed CRTBNDRPG in QSYS to default DFTACTGRP(*NO), DBGVIEW(*SOURCE) or a TGTRLS. After this PTF those quietly go back to IBM’s defaults. A program that relied on the changed DFTACTGRP default now gets DFTACTGRP(*YES) unless its source says otherwise. If the source uses ACTGRP or BNDDIR, which DFTACTGRP(*YES) does not allow, the compile fails. If not, it compiles into the default activation group and, under the new ALWUPD(*ACTGRP) rule, also comes out as ALWUPD(*NO).

Before ops applies the PTF, write down every CHGCMDDFT you have made to CRTBNDRPG and CRTRPGMOD and keep them in a CL program you re-run afterward. Better: move those settings into ctl-opt in the source or into your build tool’s compile options, where a PTF can’t touch them. If you keep a duplicate of CRTBNDRPG in a library ahead of QSYS, it was copied before the PTF and won’t show the new ALWUPD parameter until you copy it again.

What to adopt first

FeaturePTF where you compilePTF where it runsWhen to use it
INZ(*LIST), DIM(*INZ)5770-WDS compilerNone called outNew code, now
OPTIONS(*STRING) conversion5770-WDS compilerNone called outWhen you touch code with %char() wrappers
ALWUPD on CRTBNDRPG5770-WDS compiler and commandNone called outWhen change control asks for it
%INFO5770-WDS compiler5770-SS1 runtime, every boxAfter ops confirms the runtime PTF everywhere

Two practical notes. IBM says RDi support comes in “a later update for RDi,” so until then the editor may not recognize syntax that compiles fine. If that pushes your team toward VS Code, RDi vs VS Code for IBM i covers the trade-offs. And these arrive as compiler and OS PTFs, separate from the Technology Refresh PTF group, so where the cover letters allow it you can take them on a different schedule from the Licensed Internal Code change. The reasoning for holding the TR group itself is in when to install IBM i 7.6 TR3.

If you are using AI to document older RPG while you adopt these, the IBM i AI Field Guide has 35 IBM i-specific prompts and templates for that work. Expect any general model to know nothing about %INFO or INZ(*LIST) yet, so paste IBM’s syntax into the prompt.

Bottom line

Use INZ(*LIST) and DIM(*INZ) in new code as soon as the compiler PTF is on your development partition. Strip the %char() wrappers when you pass through CCSID(*EXACT) code. Treat ALWUPD as a change-control decision, and save your CHGCMDDFT settings before the command PTF wipes them.

Hold %INFO until the 5770-SS1 runtime PTF is confirmed on production, the HA target and any DR system. It is the best of the four, and the only one that can fail after a clean compile and promotion.

Frequently Asked Questions

What does the RPG %INFO built-in function return?

Program details (*PGM, *LIB, *OBJ, *OBJTYPE, *MODULE, *STMT, *ACTGRP) and job details (*USER, *JOB, *JOBTYPE, plus *JOBCCSID, *JOBDATE, *JOBDATFMT and *JOBDECFMT with a second parameter of *CURRENT or *MODULE). Unlike the PSDS, which is filled at *INIT, %INFO reads the value when the statement runs.

Do I need a PTF on production to use %INFO?

Yes. IBM says a program that uses %INFO needs the ILE RPG runtime PTF (5770-SS1) on any system where it runs. That includes HA targets and DR systems where the program is restored. The other three fall additions only call for PTFs on the system where you compile.

How do I initialize an RPG array with a list of values?

Use INZ(*LIST) with the values separated by colons, for example dcl-s array int(10) dim(3) inz(*list : 1 : 2 : 3). Add DIM(*INZ) and the compiler sets the dimension from the number of values. You can also initialize an array from an enumeration name.

What does ALWUPD(*NO) do on CRTBNDRPG?

It creates a program that UPDPGM cannot change. The new CRTBNDRPG parameter defaults to *ACTGRP: DFTACTGRP(*YES) programs get ALWUPD(*NO) and everything else gets ALWUPD(*YES). A Control keyword ALWUPD(*YES) in the source overrides ALWUPD(*NO) on the command.

Grant M.

Developer with IBM i and full-stack experience. Covers AI tools and automation for software developers at PromptedDev, with a focus on real workflows, honest comparisons, and legacy system modernization.

Get the Field Guide →

Free IBM i prompts

Get 10 free IBM i documentation prompts.

RPG IV and CL documentation prompts that work, plus one practical email a week on AI for IBM i shops.

No spam. Unsubscribe any time.