Midrange News for the IBM i Community


Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Chicagoland
Display NULL Indicator During Debug in RPG
has no ratings.
Published: 22 Nov 2011
Revised: 21 Mar 2014 - 1224 days ago
Last viewed on: 25 Jul 2017 (4796 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Display NULLIND RPG Debug Published by: Bob Cozzi on 22 Nov 2011 view comments(1)

When a field can be null, it has what's called a "Null Indicator". During debug of an RPG IV program that contains fields with Null Indicators, displaying the field's content does NOT show you the setting for it's null indicator.

The EVAL debug command, however, can be used to display the content of the Null Indicator. It also shows you the field's current contents. Here is the syntax:

Debug . . .  EVAL   _QRNU_NULL_myField

Where myField is the field name whose NULL Indicator is displayed.

and

_QRNU_NULL_  is the null indicator prefix for the field.

_QRNU_NULL_myField would be used to show the value for the null indicator for the field named myField.

The field's contents is also displayed when its Null Indicator (NULLIND) is displayed.

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: Ringer
Premium member *
Comment on: Display NULL Indicator During Debug in RPG
Posted: 3 years 4 months 8 days 5 hours 35 minutes ago

Nice tip! Thanks. 

Chris Ringer