Il 03/02/2026 10:14, stefan@xxxxxxxxxx ha scritto:
Hi Luca - good to hear about 24/7 🙂
Likely the best approach here might be to use a create alias for every Library/file combo you need to update.
You can create the alias in qtemp ( it will be a ddm-file object ).
Then you will be able to keep your sql-logic almost intact.
This is the same as making alcohol the main course but ..... 😱


Best regards



Stefan

You're the fourth person to mention alias creation.
Now I'd like to understand: said that in my application context, creating an alias doesn't make much sense. In terms of overall performance and code clarity and maintainability to me there's not much difference between a situation like this:

<code>
dcl-s sqlstring varchar(300) inz;

sqlstring ='Insert into ';
if company <> defaultCompany;
sqlstring +=%trim(companyLib) + '.';
endif;
sqlstring +='MYFILE (FIELD01, FIELD02, FIELD03, FIELD04, FIELD05, FIELD06, ' +
'FIELD07, FIELD08, FIELD09, FIELD10, FIELD11, FIELD12, ' +
'FIELD13, FIELD14, FIELD15) ' +
'VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';

Exec SQL Prepare I1 From :sqlstring;

For i = 1 to MaxValue by 1;
Reset MyDS;
MyDS = MyArray.MyRec(i);

EXEC SQL EXECUTE I1 USING :MyDS.F01, :MyDS.F02, :MyDS.F03, :MyDS.F04,
:MyDS.F05, :MyDS.F06, :MyDS.F07, :MyDS.F08,
:MyDS.F09, :MyDS.F10, :MyDS.F11, :MyDS.F12,
:MyDS.F13, :MyDS.F14, :MyDS.F15;

if sqlcode <> 0;
logError(yabadabadoo);
retcode='1';
leave;
elseIf sqlcode = 0;
retcode='0';
endif;
Endfor;

return retcode;
</endcode>

or create and alias in qtemp and manage it. Or am I missing something?

TIA

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