|
In your example the entries "overlay(#ds)" and "overlay(#ds:*next)" are superfluous. *Next is what the compiler does anyway when you simply list a series of fields without from/to positioning. It may also be worth pointing out that no field name needs to be used in order to have an initial value, although they are needed in your example as you have defined the field length via LIKE. Had you just defined a length (i.e. 4) then the field names can be omitted. If you don't want the array to be the first entry in a DS, but rather just be part of it, you can use a group field to achieve the same thing. So your example can be written as: d #ds ds d v1 like(#array) inz('Val1') d v2 like(#array) inz('Val2') d v3 like(#array) inz('Val3') d #array 4 dim(3) overlay(#ds) Or like this if part of DS: d #ds ds d anyoldfield like(myfield) d group d v1 like(#array) inz('Val1') d overlay(group) d v2 like(#array) inz('Val2') d overlay(group: *Next) d v3 like(#array) inz('Val3') d overlay(group: *Next) d #array 4 dim(3) overlay(group) Just a question - why make your field names so hard to read by placing a # in front of all of them? Jon Paris Partner400 www.Partner400.com www.RPGWorld.com
As an Amazon Associate we earn from qualifying purchases.
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.