IBM Support

RPG Cafe: Fall 2020: Debug the return value for a procedure

News


Abstract

RPG enhancement to add Control keyword DEBUG(*RETVAL), to debug the return value from a procedure.

Content

You are in: RPG Cafe > Debug the return value for a procedure

Short URL: https://ibm.biz/rpgcafe_debug_retval

RPG Cafe: Debug the return value for a procedure

Control keyword DEBUG(*RETVAL)

When DEBUG(*RETVAL) is specified in the Control keywords, you can view or change the value returned from a procedure in the debugger, when you are at the breakpoint for the end of the procedure.

You work with the special variable _QRNU_RETVAL in the debugger.

Details

A debug session with DEBUG(*RETVAL)

  • The programmer is debugging the following procedure.
  • The debug session is stopped at statement 5.
  • The programmer checks the value of EVAL _QRNU_RETVAL.
  • The debugger indicates that the value of _QRNU_RETVAL is 25.
  • The programmer changes EVAL _QRNU_RETVAL to 26.
  • The debugger now indicates that the value of _QRNU_RETVAL is 26.
  • The value returned from the procedure is 26.
          1. DCL-PROC myProc;
          2.    DCL-PI *N INT(10) END-PI;
          3.
          4.    RETURN 25;
          5. END-PROC;
.                                                            .
.                                                            .

PTFs for 7.3 and 7.4, available in November 2020

7.3:

  • ILE RPG compiler: SI74612

7.4:

  • ILE RPG compiler: SI74613
  • ILE RPG compiler, TGTRLS(V7R3M0): SI74614

The ILE RPG compiler PTFs will also be available with the Db2 for i Fix Packs. See Db2 for IBM i 2020 PTF Group Schedule.

RDi support

The next release of RDi will support this enhancement.

Documentation in the IBM Knowledge Center

The ILE RPG Reference and ILE RPG Programmer's Guide in the 7.3 and 7.4 IBM Knowledge Center are updated with full information about this enhancement. Start at the What's New Since 7.3 or What's New Since 7.4 section in the Programmer's Guide for information about the command parameter, and start at the What's New Since 7.3 or What's New Since 7.4 section in the Programmer's Guide for information about the Control keyword.

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SS69QP","label":"Rational Development Studio for i"},"Component":"ILE RPG Compiler","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.3;7.4","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
12 November 2020

UID

ibm16342907