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



I recently ran into an RDI 9.1 verifier issue with code that's been in place for a year. But looking at the code, it looks like I forgot to add "Qualified" to the data structure. Yet, the code compiles and is working (I confirmed the data as a result of the code is as expected).

I ran a few tests and it looks like a DS defined globally can be referenced as if it were qualified.

// Global
dcl-ds ds_Test;
Field ind;
end-ds;

// Code in procedure
If not ds_Test.Field;
ds_Test.Field = *On;
EndIf;

But if I move the global DS definition to be local as well, the code in the procedure no longer compiles.

Does this seem odd to anyone else? I looking at the data structure help and didn't see any reference to this. I'm also wondering if it's a compiler bug that this kind of reference to the DS fails when the DS is defined locally vs globally.

I'm a big fan of qualified data structures for many reasons, one of them being a means to self-document which DS a subfield being referenced is a part of. So I can see optionally using this in some really old code where I don't have the time to deal with the repercussions of adding the Qualified keyword to a DS, but I want my code to be as readable as possible.

Kurt Anderson
Sr. Programmer/Analyst - Application Development, Service Delivery Platform
[cid:image002.jpg@01CD16F9.25D27630]
web: www.customcall.com<http://www.customcall.com/> | email: kurt.anderson@xxxxxxxxxxxx<mailto:kurt.anderson@xxxxxxxxxxxx>

A Division of Enghouse Systems Ltd.<http://www.enghouse.com/> (TSX:ESL)


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.