|
Hi, > D MyDs EUDS EXTNAME(APPF#1) DIM(100) > > Keyword is not allowed for a data-structure definition; keyword is ignored. There are a few things to consider: a) the 'U' that you have defined in column 23 tells the compiler that you want this to be a DATA AREA. You can't have an array of data areas! b) You can only use DIM() on a QUALIFIED data structure. (Or on a simple array) so you have to add the QUALIFIED keyword. c) In order to create arrays from data structures, you need to be on a recent release of OS/400. On my V5R2 system, I could do the following: D MyDs e ds extname(APPF#1) D qualified D dim(100) To access the data in this data area I'd do something like this: a = MyDs(X).myField; On an older release, you'd have to make it a multiple occurrance data structure instead of an array. On those releases, you could do this: D MyDs e ds extname(APPF#1) D occurs(100) With a MODS, you have to access the data in the following way: %occur(MyDs) = x; a = myfield; In either case, it cannot be a data area data structure. Good Luck
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.