News
Abstract
Information about the PTFs for the ILE RPG enhancement that provides the %INFO built-in function
Content
You are in: RPG Cafe Fall 2026: New built-in function %INFO
Short URL: https://ibm.biz/rpgcafe_fall_2026_bif_info
Fall 2026: New built-in function %INFO
Warning If you use %INFO() in your program, you need a runtime PTF on any system where you run the program. |
Details
Some of the information provided by %INFO is also provided in the PSDS. However, the PSDS is initialized during the *INIT phase of the RPG cycle and some of the information in the PSDS might be out of date.
There are 2 types of information available with %INFO:
Information about the program. (Here, the term "program" refers to both a program and a service program.)
%INFO parameter Result of %INFO Note *PGM The program name %INFO(*PGM) returns the current name of the program. This might be different from the "Program" subfield in the PSDS if the program was renamed or recompiled after the PSDS was initialized. *LIB The library %INFO(*LIB) returns the current library of the program. This might be different from the "Library" subfield in the PSDS if library was renamed or the the program was moved or recompiled after the PSDS was initialized. *OBJ The library qualified program name %INFO(*OBJ) returns the current library-qualified name of the program in the form "LIBNAME/PGMNAME". *OBJTYPE The type of the program Either *PGM or *SRVPGM. *MODULE The module containing the current procedure This value never changes. *STMT The statement number for the RPG statement containing %INFO(*STMT). This is the same as the statement number used in the debugger or the statement number in the joblog if an exception occurs for the statement. *ACTGRP The activation group that the program is running in - If it is "*DFTACTGRP", it is either a DFTACTGRP(*YES) program or it runs in the caller's activation group and it was called by a program running in the default activation group.
- If it is "*UNNAMED", it is most likely running in a *NEW activation group.
Information about the job
Some of the job information has 2 possible values
- The current value for the job
The value that the RPG module obtained during module initialization that is used for calculations related to the job value. For these types of information, you specify a second parameter of either *CURRENT or *MODULE.
If CHGJOB might be used while your program is running, you can compare the *CURRENT and *MODULE values to detect a possible problem with your application. For example, if the job CCSID has been changed, your current module might have a different idea about the job CCSID than a program it is calling.
Module initialization is done during the *INIT phase of the RPG cycle
- The first time any procedure in the module is called
- When the cycle-main procedure is called unless the previous call to the cycle-main procedure ended with *INLR off.
%INFO parameter Extra parameter Result of %INFO Note *USER The current user profile %INFO(*USER) always returns the current user profile. This might be different from the "Current-user-profile" subfield in the PSDS and it might be different from a variable initialized with *USER. *JOB The job in the form NUMBER/USER/NAME This value never changes after the job has started. *JOBTYPE The job type as defined by the QUSRJOBI API. This value never changes after the job has started. It is the same as the "job-type" subfield in the PSDS. *JOBCCSID *CURRENT The current default job CCSID. It differs from the job CCSID if the job CCSID is 65535. When the job CCSID is 65535, the default job CCSID is derived from the job country ID and the job language ID. It is obtained every time %INFO(*JOBCCSID:*CURRENT) is used. *JOBCCSID *MODULE The default job CCSID that RPG is using in the module for CCSID conversions to or from the job CCSID. The RPG module obtains it during the *INIT phase of the module. *JOBDATE *CURRENT The current job date in *ISO format. It is obtained every time %INFO(*JOBDATE:*CURRENT) is used. *JOBDATE *MODULE This is the same as the date represented by UDATE and *DATE. The RPG module obtains it during the *INIT phase of the module. *JOBDATFMT *CURRENT The current job date format followed by the date separator. For example "*MDY/". It is obtained every time %INFO(*JOBDATFMT:*CURRENT) is used. *JOBDATFMT *MODULE The job date format and date separator that RPG is using for date conversions with format *JOBRUN and *LONGJOBRUN. The RPG module obtains it during the *INIT phase of the module. *JOBDECFMT *CURRENT The current job decimal format, "I", "J", or blank, as defined by the CHGJOB command. It is obtained every time %INFO(*JOBDECFMT:*CURRENT) is used. *JOBDECFMT *MODULE The job decimal format that RPG is using for conversions between numeric and character values when DECEDIT(*JOBRUN) is specified in the Control keywords. The RPG module obtains it during the *INIT phase of the module.
.
..
PTFs for 7.5 and 7.6
7.5:
ILE RPG runtime: 5770SS1 (PTF number to be updated later)
Note: You need this PTF on any 7.6 system where you run a program with an assertion operation.
- ILE RPG compiler: 5770WDS (PTF number to be updated later)
7.6:
ILE RPG runtime: 5770SS1 (PTF number to be updated later)
Note: You need this PTF on any 7.6 system where you run a program with an assertion operation.
- ILE RPG compiler: 5770WDS (PTF number to be updated later)
- ILE RPG compiler, TGTRLS(V7R5M0): 5770WDS (PTF number to be updated later)
RDi support
A later update for RDi will support this enhancement.
Documentation
The 7.5 and 7.6 ILE RPG Reference and ILE RPG Programmer's Guide are updated with full information about this enhancement. Start at the "What's new since 7.5", or "What's new since 7.6" section in the Reference.
- What's new since 7.5? https://www.ibm.com/docs/en/ssw_ibm_i_75/rzasl/rpgrelv7r5post.htm
- What's new since 7.6? https://www.ibm.com/docs/en/ssw_ibm_i_76/rzasl/rpgrelv7r6post.htm
Was this topic helpful?
Document Information
Modified date:
27 October 2026
UID
ibm17289831