>From: email@example.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" <firstname.lastname@example.org> >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.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.