× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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.

Thanks again.

-----Original Message-----
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.


tim wrote:
I am trying the following code and getting error RNQ0115. The value in
both
fields is blank. Can someone shed some light as to why?





DDS

CCLONOTE 450 TEXT('CLOSING NOTE')

COLHDG('CLOSING NOTE')

ALIAS(CLOSING_NOTE)

VARLEN(75)





RPG

D mast E DS ExtName(mast)

d cm_b ds likeds(mast )

d cm_a ds likeds(mast )





/free

*inlr = *on;



if cm_b.caltnote <> cm_a.caltnote;



endif;



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.