|
Hello Rob, You're trying to initialize a pointer to the address of a datastructure whose address is based on that very same pointer. You need to involve some actual storage to make it work: Define a variable f.x.: D RcvVar s 4096a Then initialize all three pointers to the address of that storage location: D pOBJL0100 S * Inz(%addr(RcvVar)) D pOBJL0200 S * Inz(%addr(RcvVar)) D pOBJL0300 S * Inz(%addr(RcvVar)) Best regards, Carsten Flensburg ----- Original Message ----- From: <rpg400-l-admin@midrange.com> To: <rpg400-l@midrange.com> Sent: Tuesday, September 18, 2001 5:27 PM Subject: Stacking data structures > > > > Because of the many possible formats you can use on some of the list API's > we thought of stacking data structures. Below is a sample: > > * OBJL0100 - QUSLOBJ - List Objects - Object names > D pOBJL0100 S * Inz(%addr(OBJL0100D)) > Ptr object list > D OBJL0100 DS Based(pOBJL0100) > D OLObjNam 10A > Object name > D OLObjLib 10A > Object library > D OLObjTyp 10A > Object type > > * OBJL0200 - QUSLOBJ - List Objects - Text description and extended > attribute > D pOBJL0200 S * Inz(%addr(OBJL0200D)) > Ptr object list > D OBJL0200 DS Based(pOBJL0200) > D OBJL0100D Like(OBJL0100) > D OLObjSts 1A > Object status > D OLExtAtr 10A > Extended attribute > D OLTxtDsc 50A > Text description > D OLDefAtr 10A > User defined atr > D OLRes1 7A > Reserved > > * OBJL0300 - QUSLOBJ - List Objects - Basic object information > D pOBJL0300 S * > D OBJL0300 DS Based(pOBJL0300) > D OBJL0200D Like(OBJL0200) > D OLAuxSP 10I 0 > Aux storage pool > D OLObjOwn 10A > Object owner > D OLObjDom 2A > Object domain > D OLCrtDat 8A > Create date/time > D OLChgDat 8A > Change date/time > D OLStorage 10A > Storage > D OLCmprSts 1A > Compression status > D OLAlwChg 1A > Allow program change > D OLAudVal 10A > Auditing value > D OLRes2 9A > Reserved > > 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. > *RNF0314 20 14 000900+ Built-in function %ADDR(OBJL0200D) does not have > a value > known at compile-time; built-in function is > ignored. > > So we tried to cheat and changed a few lines: > D pOBJL0300 S * > became > D pOBJL0300 S * Inz(%addr(OBJL0300P)) > Ptr object list > and we added > D OBJL0300P S 1A > and got the same results. > > I) Should I try reporting this as a bug? > II) Any suggested workarounds? > > > Rob Berendt > > ================== > A smart person learns from their mistakes, > but a wise person learns from OTHER peoples mistakes. > > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.