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



Joe, Sorry, I am aware that you personally do both types of development, I was referring to the type of development, maybe in an unartfully way.

Question; you say you don't want to specify a schema, yet all the IBM services, DB2 services, etc. are all in the same place system to system. If the connection is the only thing that changes. Use the Watches example supplied by IBM as our test case, it looks like:

select session_id, origin, origin_job, start_timestamp, user_id, status,
watch_session_type, job_run_priority, watched_message_count, watched_lic_log_count,
watched_pal_count, watch_program_library, watch_program, watch_program_call_start,
watch_program_call_end, time_limit, time_interval
from qsys2.watch_info order by session_id;

The schema is QSYS2, which is specified, but then again it always will be that across systems. There is not a system definition in the mix, so I'm not sure what your dilemma is.



-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Joe Pluta
Sent: Tuesday, April 13, 2021 10:43 AM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Subject: Re: Three part names and library lists

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


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