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



Hi Doug

I think you might be out of luck.

But first try setting the precompile parameter to maybe *LVL1 or *LVL2 - look at the help to see what they do. The precompiler doesn't always resolve references like LIKEDS and especially in multiple layers like this.

Also, your d1_ds, etc., can be define with either LIKEREC or use ExtName as you are doing for the 3 you define separately. Then you might not need to define those external 3.

But I don't guarantee any of this will work!!

Good luck!

Vern

On 2/2/2017 10:01 AM, Englander, Douglas wrote:
I am trying to perform a FETCH into a DS, with that data structure being defined smaller DSs, each DS being the fields in a table that the SQL SELECT selects from.

Does anyone know if it is possible to do something like this:

D JL0099 E DS ExtName(JBTJL0099 : *ALL)
D JL0110 E DS ExtName(JBTJL0110 : *ALL)
D JL0120 E DS ExtName(JBTJL0120 : *ALL)

dcl-ds DS_ALL dim(100) qualified;
d1_ds likeds(jl0099);
d2_ds likeds(jl0110);
d3_ds likeds(jl0120);
end-ds;


then:

exec sql fetch from [cursor] for 100 rows into :ds_all

The SQL is a join of 4 tables, but I can't get this to compile. I get the "SQL0312 Variable DS_ALL not defined or not usable" error. Can you fetch into a DS of DSs?

Thank you,

Doug



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.