Sorry, I guess I wasn't clear.  I am not moving from application to system programming; I do both. That's pretty much my job description wherever I go: I am the system architect which means I identify best practices for all cases.  The library list is hands down one of the greatest features of the IBM midrange platform, and using that in the ODBC connection is one of my favorite examples of symbiosis between the IBM i as data server and the rest of the IT infrastructure.

For example, if I can switch between a test sandbox and a production database with just a change of connection string, that means I can fully test my external software and then deploy it without having to change a single line of code.  It's beautiful!

It's funny that you mention application vs. system, though, because a separate project is rationalizing and replicating scheduled jobs between partitions.  That absolutely requires a categorization of jobs as either application or system.  The application jobs need to be synchronized between production, test, replication and HA partitions/machines, but the system jobs are obviously different for each.  It's been an interesting challenge!

But I still want to be able to connect to partition and get to data without having to specify a schema. That may not be possible, and if so, that's just something I take into account for any distributed access projects.



On 4/13/2021 10:22 AM, midrangel@xxxxxxxxxxxxxxxxx wrote:
Joe,

Since you are moving from application to system programming, I question the use case definition that it has to be generic, in fact I'll suggest it's probably inappropriate. The probability of malicious code getting into the system gets too high, and with these types of application where the security granted to the user is quite high, makes it a questionable endeavor.

System programming relies on knowing the system you are connected to and setting it up for that specific situation. It' rare when we have multiple systems that are so similar in usage and workload that they could be considered generic.

Therefore, rather than try to find a generic solution, why not modify the approach and fetch the name of the system from the system or another source, and then concatenate that into the SQL as needed. More complicated, sure, but then you also have the ability to stop malicious code. Also varying the user profiles and authorities between systems will make things more secure as well.

Maybe what you might consider would be a web service or API that has the appropriate security built in to give your application the information it needs without exposing the underlying structure of the system?

The days of write once, push across many systems are quickly fading due to multiple threat vectors that we need to deal with. Our use case definitions need to reflect that.

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Joe Pluta
Sent: Tuesday, April 13, 2021 9:44 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Three part names and library lists

I spent a lot of time recently working with external ODBC connections and library lists in order to follow some best practices with external processes. Basically, these processes can be used in either a test or production environment simply by changing the connection. That's done by removing all schema qualifications from tables, views, procedures, etc. This works wonderfully. Fast forward, and I've just started using three-part naming to reach across partitions. I've done this primarily for system analysis (object statistics and so on) so I haven't had to worry about environments. I just use partition1.qsys2.object_statistics
and I'm fine. But that doesn't play well with the idea of using an unqualified table name for application data. I haven't found any sort of syntax like partition1.*libl.mytable that will work. I'm afraid there may be no such syntax, but I figure if anyone knows, it's the members of this list.

So IS there a way to do a cross-partition unqualified table reference? I don't know, sounds like it might be a technical oxymoron. :)

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com



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