Thanks Scott and Simon. I added the inz to each defined DS and that worked.
I ran into one more unforeseen issue in the "journal logging" process. When
using the DSPJRN command to dump a journal to a PF, the joesd field in the
dumped file will change in length based on the journal entries. I had to
created this file first with the largest known size, then run the process.
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Scott Klement
Sent: Saturday, August 30, 2008 3:09 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: comparing varlen field error RNQ0115 question
By default, data structures in RPG are initialized to blanks. Even if
they contain numbers, they are initialized to blanks! A VARLEN field
(which is called VARYING in RPG) contains a two-byte prefix that's used
to keep track of the length of the field. When the first two bytes of
that field are set to blanks (i.e. x'4040') that effectively set the
length of the field to 16448 (16448 decimal = 4040 hex)
Since your field is defined as 450 long, you can't set it's length to
16448 -- and that's why you get the RNX0115.
The fix? change the initial values in your DS to something besides
blanks -- or try putting some data into the DS before doing the comparison.
I am trying the following code and getting error RNQ0115. The value in
fields is blank. Can someone shed some light as to why?
CCLONOTE 450 TEXT('CLOSING NOTE')
D mast E DS ExtName(mast)
d cm_b ds likeds(mast )
d cm_a ds likeds(mast )
*inlr = *on;
if cm_b.caltnote <> cm_a.caltnote;