× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



David,

Unfortunately, you can't use the INZ keyword with any subfield of a based
DS. However, at V6R1, you can simply use the TEMPLATE keyword on a
'template' DS, so they can be INZ'ed, whilst not taking up storage.

In your case (pre-V6R1, I assume), you either need to initialize MyDS
yourself (using INZ on the whole DS or on separate fields), or make
TemplateDS not a pointer-based DS, inz the TemplateDS subfields and specify
INZ(*LIKEDS) for MyDS.

Frankly, if TemplateDS isn't big and it's used a lot and the subfields
should typically be INZ'ed to non-default values (i.e. not t blanks/zeroes),
I'd do the latter:

TemplateDS DS Qualified
Fld1 10A Inz('MYVALUE')
Fld2 10I 0 Inz(43)

myDS DS LIKEDS( templateDS ) Inz(*Likeds)

The amount of storage you 'waste' by making TemplateDS *not* pointer-based
will be made up for by the ease of specifying INZ(*LIKEDS) in all the cases
where you have a MyDS based on TemplateDS.

Once you get to v6r1, use the TEMPLATE keyword and it's all much simpler
anyway.

Rory

On Mon, Mar 15, 2010 at 8:14 AM, David FOXWELL <David.FOXWELL@xxxxxxxxx>wrote:

Hi,

If I have myDS DS LIKEDS( templateDS )

TemplateDS DS Based(template)

do I have to initialise the subfields of myDS manually or is there another
way?

Thanks.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.