>From: rob@dekko.com
>Date: Thu, 10 Jan 2002 16:56:54 -0500
>
>     fARRAYFILE IF   E           K DISK    RENAME(ARRAYFILE:ARRAYREC)
>     f                                     INFDS(HIYA)
>     d MyArray         s                   like(ary1) dim(3)
>     d                                     based(pMyArray)
>     d pMyArray        s               *   inz(%addr(ary1))

Rob, as Rod guessed, you can't count on ARY1, ARY2 and ARY3 being
contiguous.  To ensure they are contiguous, define an externally-described
data structure:

     d               e ds                  extname(ARRAYFILE)

>From: "Richard B Baird" <rbaird@esourceconsulting.com>
>Date: Fri, 11 Jan 2002 08:23:02 -0500
> ...
>the technique I was told about involved having the fields described ONLY
in
>an external data structure 'D' spec.  I assume that the %addr technique
>still works if the data is actually described by the "I"nput specs
>generated by an input file?

Richard, you need a data structure for sure, whether or not you have
I specs or O specs.  (Either an externally-described DS, or a pgm-described
one that just lists the fields without the types.)

Just remember that I and O specs are really descriptions of move operations
between the I/O buffer and the fields.  They're also be used for
definitions,
if there isn't an explicit definition, but the definition isn't identical
to
the I spec.  For example, if you have a zoned (5,2) on an I spec, the
compiler
will define a packed (5,2) for you.

Barbara Morris



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.