When the based variable's basing pointer is pointer based...
- From: "Chris Pando" <chris.pando@xxxxxxxxx>
- Date: 13 Jan 2006 07:57:19 -0800
.... you can't use debug to display it.
I have a data structure which is pointer based (the data is in the
heap):
d recordDS ds Based(ds@)
d parent@ *
d objLen 10i 0
d objDat 10i 0
d objSiz 10i 0
d objVar 1a
ds@ is a pointer based variable:
d ds@ s * Based(ds@@)
ds@@ contains a pointer to a position within a user space.
The user space contains pointers to linked list entries in the heap.
I use qsort to resequence the pointers within the user space, and
then I read the sorted linked list by incrementing through the user
space.
The program, amazingly enough, didn't work the first time, so
I threw it into debug, and executed:
eval recordDS
which got me an error message, that the data was not available.
I got around this by defining a debug data structure:
d debugDS s 1024a Based(debug@)
When I execute:
eval debug@ = ds@
then:
eval debugDS
the contents of recordDS are displayed.
Chris
--
.
- Follow-Ups:
- Re: When the based variable's basing pointer is pointer based...
- From: Lou
- Re: When the based variable's basing pointer is pointer based...
- From: Barbara Morris
- Re: When the based variable's basing pointer is pointer based...
- Prev by Date: Re: Program Locations??
- Next by Date: Loading a timestamp field with CPYFRMIMPF
- Previous by thread: Blocage appel de programme RPG avec jt400 sur AS400
- Next by thread: Re: When the based variable's basing pointer is pointer based...
- Index(es):
Relevant Pages
|