× 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'm trying to work with tables in a library not in my library list and am
trying to figure out a way to soft-code the library in my embedded SQL
statement.  I don't plan on touching multiple libraries and I don't like
hard coding.   I'm trying to do something like this:

C/exec SQL
C+        Update :library/file set name = :new_name, address = :new_address
where key = :new_key with NC
C/end-exec

I know I can grab CURRENT SCHEMA from the special register, SET CURRENT
SCHEMA to the new library, and SET CURRENT SCHEMA back to the original
library list, or I can run the 'system' procedure to  OVRDBF and DLTOVR.  I
can use dynamic SQL and eliminate the library problem but I don't know if
the SQE is smart enough to reuse the access plan (I'm still on V5R3; I know
V5R4 does some cooler stuff).  I've considered abandoning SQL and setting up
logical files in my library list with hard-coded qualified PFILE's.

I'm using *SYS naming and "key" is the file's primary key.

Is there a way to handle this using embedded SQL or do I need to look at
another approach?

Thanks,
reeve

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.