|
Hi, James:
Do you really need to create an object (e.g. *USRSPC) to store your data? In
OPM MI, you can easily declare a "space" in the program, e.g.:
DCL SPCPTR XPTR AUTO;
DCL SPC XDATA BAS(XPTR);
DCL DD INCR BIN( 4) AUTO BDRY(4) ;
. . .
MODASA XPTR, INCR; /* extend size of space ... */
And of course you can pass a space pointer that points into this space, just
as you might do with passing a pointer into the *USRSPC...
Or, perhaps you should consider using the ILE heap (which can also be used
by OPM programs)? e.g.:
CRTHS HEAPID, ?X;
ALCHSS ?HEAP, HEAPID, Y;
This approach lets you easily suballocate using ALCHSS, rather than having
to manage the space yourself (as you would with a *USRSPC). Also, at
end-of-job (or end of activation group), OS/400 cleans up and deletes the
heap automatically.
HTH,
Regards,
Mark S. Waterbury
----- Original Message -----
> From: "James H H Lampert" <jamesl@xxxxxxxxxxx>
> To: <mi400@xxxxxxxxxxxx>
> Sent: Friday, December 16, 2005 7:50 PM
> Subject: [MI400] Refresh my memory: is there some sort of unstructured
object that's cheap to create, and can automatically expand?
>
> I'm looking to stick something in QTEMP to accumulate a
> bunch of data, and pass it from OPM MI to ILE C, and I
> have this vague memory that there's some sort of object
> that would be perfect for the job. Something that would
> automatically expand as needed to fit the data, without
> any need to explicitly expand it, and that would be cheap
> to create. I'd only require FIFO access.
>
> Am I thinking of something legitimate that I'd forgotten
> the name of, and can't find? Or am I just going
> prematurely senile?
>
> --
> JHHL
>
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.