× 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.



;(
Kill me now....
If the interface is asking for a Bin(2), then you MUST use 5i0 for the data
type and length in RPG IV. If you use the "B" data-type you're being a dick.
[tic]

-Bob Cozzi
www.RPGxTools.com
RPG xTools - Enjoy programming again.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of rick baird
Sent: Thursday, December 15, 2005 11:35 AM
To: RPG programming on the AS400 / iSeries
Subject: if binaryfld = -1 error.

Hey all,

I have a weird thing happening.   I'm comparing the null map of a
trigger buffer field to -1, and i'm getting:

"The target for a numeric operation is too small to hold the result "

relevant code:

* null byte array (23 fields)

d $nuller         s              2b 0 based($nullOffset) dim(23)
d $nullOffset     s               *   Inz(*Null)

* trigger buffer

d InBuffer        DS         32767
d  TgFile                       10
d  TgLibr                       10
d  TgMemb                       10
d  TgEvent                       1
d  TgTime                        1
d  TgLockLvl                     1
d  TgFiller1                     3
d  TgCCSID                      10u 0
d  TgFiller2                     8
d  TgOldOffset                  10u 0
d  TgOldLength                  10u 0
d  TgONulOfs                    10u 0
d  TgONulLen                    10u 0
d  TgNewOffset                  10u 0
d  TgNewLength                  10u 0
d  TgNewNulOfs                  10u 0
d  TgNewNulLen                  10u 0
d  TgFiller3                    16

.....

c                   eval      $nullOffset = %addr(InBuffer) + TgNewNulOfs

c                   if        $nuller(2) = -1
c                   eval      @RecNew.LVL2 = 0
c                   end

I get my error when it hits the above "IF" statement.

In debug, the value of $nuller(2) is -56

what up?   is there some sort of intermediate variable being created
to resolve $nuller(2) so it can be compared?

thanks,

Rick


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.