The RPG PTFs for the July TR-timed enhancements are available

Barbara Morris <[email protected]> Fri, 24 Jul 2026 08:08:24 -0400
Newsgroups gmane.comp.lang.as400.rpg
Organization IBM
Message-ID <[email protected]>
See the RPG Cafe for details:
https://www.ibm.com/support/pages/node/1106229#announcement

1. Assertion opcodes ASSERT-F (assert the condition is false) and 
ASSERT-T (assert the condition is true).

    assert-t custid <> 0 %msg('The id cannot be zero');

There are 4 "modes" for how they're handled at runtime.
- *EXCP is the default: issue an exception for a failed assertion
- *NONE if you don't want assert opcodes to do anything in production
- *WARN if you want messages about failed assertions in the joblog in 
production but you don't want an exception
- *CALL if you want to use assertions for unit test. The procedure is 
called for every assert opcode with a parameter to say whether it passed 
or failed along with the %msg message and a bunch of other parameters to 
locate the particular assert statement.

2. You can specify a generic message ID for ON-EXCP in the form 'ABC*'
   MONITOR;
      ...
   ON-EXCP 'ABC*';
      ...
    ENDMON;

3. You can use LIKE(*EXT) to define an RPG field like a single field in 
an external file.
   DCL-S salary1 LIKE(*EXT : 'EMPSALARY' : 'MYFILE');
   DCL-S salary2 LIKE(*EXT : 'EMPLOYEE_SALARY' : 'MYFILE') INZ(*EXTDFT);

4. Use %LOOKUPNE to find the first element that is not equal to the 
search argument.

5. Job type and subtype subfields are added to the PSDS.

-- 
Barbara


-- 
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support-FMtJrHiV//lnDLsaKlm4mFaTQe2KTcn/@public.gmane.org for any subscription related questions.

You can help support midrange.com by visiting https://donate.midrange.com and making a contribution.