|
>From: rob@dekko.com >Date: Tue, 18 Sep 2001 10:27:54 -0500 > > D pOBJL0100 S * Inz(%addr(OBJL0100D)) > D pOBJL0200 S * Inz(%addr(OBJL0200D)) > D OBJL0200 DS Based(pOBJL0200) > D OBJL0100D Like(OBJL0100) > D pOBJL0300 S * > D OBJL0300 DS Based(pOBJL0300) > D OBJL0200D Like(OBJL0200) > >But, when we compile this we get > > Msg id Sv Number Seq Message text >*RNF0314 20 7 000200+ Built-in function %ADDR(OBJL0100D) does not have >a value known at compile-time; built-in function is ignored. > >I) Should I try reporting this as a bug? >II) Any suggested workarounds? I) No. The compiler doesn't think %ADDR(based-variable) is a value known at compile time, even if that based-variable's basing pointer is explicitly initialized. But in your case, the address of OBJL0200D is the value of basing pointer pOBJL0300 which is initialized (by default) to *NULL. II) I would code it like this: D OBJLstorage S 32767A D pOBJLstorage S * inz(%addr(OBJLstorage)) D OBJL0100 DS based(pOBJLstorage) D subfields... D OBJL0200 DS based(pOBJLstorage) D subfields... An alternative to declaring such a big chunk of storage is to declare a small one, and check the bytes-received vs bytes-available after you call the API. If you didn't get all the data, use ALLOC to allocate more storage for your basing pointer. (Remembering to DEALLOC your storage later if the pointer isn't still pointing to the small declared storage.) Barbara Morris
As an Amazon Associate we earn from qualifying purchases.
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.