×
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.
Check out the discussion of LIKEDS:
http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzajp/rzajphoststrucirpg.htm
The SQL precompiler does not accommodate compound, qualified data
structures. (It only supports single level qualification.)
Brian.
-----Original Message-----
From: Englander, Douglas
Sent: Thursday, February 02, 2017 4:01 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Embedded SQL into a DS of multiple DS
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.