× 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.



Just realized that my the code I gave was my "last ditch attempt" in regard to the overlay.
I had originally tried: Overlay( Cat: 2 )
and then: Overlay( ds_CGR.Cat: 2 )



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Kurt Anderson
Sent: Tuesday, March 23, 2010 11:04 AM
To: 'RPG programming on the IBM i / System i'
Subject: Overlay a subfield in a DS defined with LikeDS

We have a file layout (industry standard) and certain positions have different meanings for different types of data. I was hoping to be able to create the basic DS as a template, and the fields that can be changed would have a generic fieldname - then when I create the DS defined like the template, I would overlay the subfields based on the data being processed (i.e. based on the subprocedure). However the WDSCi Verifier doesn't like it (so I presume the compiler would have issue as well).

For example:
D ds_CGR DS LikeDS( dsTmpl_CGR_01 )
D Test 1p 0 Overlay( ds_Tmpl_CGR_01.Cat: 2 )

Has anyone else ever had need to either overlay or add a subfield after doing a LikeDS?

Or is it possible and I'm not doing something correctly here? I recall doing this sort of thing (well adding extra fields) at the end of a DS that used ExtName.

Thoughts?

-Kurt Anderson
Sr. Programmer/Analyst
CustomCall Data Systems

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.