473,994 Members | 2,075 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Current library on AS/400

On AS/400, is there a way to determine the current library from SQL?
(i.e., CURLIB)

Nov 12 '05 #1
2 4495
Hello.

select current schema from sysibm.sysdummy 1;

Sincerely,
Mark B.

Nov 12 '05 #2
4.****@mail.ru wrote:
Hello.

select current schema from sysibm.sysdummy 1;

Sincerely,
Mark B.


OS/400 current library (CURLIB) and SQL CURRENT SCHEMA are not (by
definition) the same. There may be an "SQL only" way to get CURLIB, but
if not one option might be to write a small external procedure or
function (UDF).

For example a CL program could contain this command:
RTVJOBA CURLIB(&CURLIB)

To register the CL program as a procedure, do something like:
create procedure getcurlib(out curlib char(10))
language CL
no sql
not fenced
external name mylib.curlib

This is just an idea - I have not built or tested it.

--
Karl Hanson
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6484
by: Phil Ten | last post by:
Hello, I am working on a .NET C++ project based on the "Class Library (.NET)" wizard of Visual Studio .NET 2003. I would like to know if my .NET component is running in a ASP.NET page (.apsx file), and if it is the case I would like to execute a specific task based on the current HTTP request.
2
7641
by: Bill Struve | last post by:
Need: Auto-logon to a terminal server, start a program, and, when the user is quits the program, auto-logoff. Done so far: Able to use a fixed username/password in a C# program using AxMSTSCLib and MSTSCLib. Everything in the Need, above, works just great. Problem: All users would be logged on as the fixed username/password, so I can't set specific printers for each user (i.e. change one, change them all). The solution I used for...
6
2598
by: Tiraman | last post by:
Hi, in vb6 we could use the GetObjectContext("Request") of the ASPTypeLibrary.Request in order to get the ServerVariables("XXX") from the asp to the dll . can we do that in aspx and vb dot net dll ? the question is if there is a context switch between aspx to the dot net dll
10
4974
by: JohnR | last post by:
I have a datatable as the datasource to a datagrid. The datagrid has a datagridtablestyle defined. I use the datagridtablestyle to change the order of the columns (so they can be different than the column order of the datatable). I also allow the user to click on a column header to sort the datagrid by that column. I need to identify the row and column in the datatable when the user clicks on a cell in the datagrid. Using the...
35
5550
by: Alex Martelli | last post by:
Having fixed a memory leak (not the leak of a Python reference, some other stuff I wasn't properly freeing in certain cases) in a C-coded extension I maintain, I need a way to test that the leak is indeed fixed. Being in a hurry, I originally used a q&d hack...: if sys.platform in ('linux2', 'darwin'): def _memsize(): """ this function tries to return a measurement of how much memory this process is consuming, in some arbitrary unit...
2
1599
by: ssjassal | last post by:
Is there a way to instruct Python to import modules from standard library even if there is one with the same name in the current working directory? I was trying to import BaseHTTPServer.py from standard library but was prevented by a python file with the same name in current working directory (but there was no __init__.py). Can I use some warning switch to print a warning on stdout? Thanks, Sunpreet.
8
8872
by: news.microsoft.com | last post by:
How do I get the class name for a current instance. For example, if I want to know the Class Name for the current form, how do I get this programatically. Thanks
1
6448
by: Jess Chadwick | last post by:
I am attempting to use the Enterprise Library (Jan 2006) Cryptography block to encrypt a credit card number in my ASP.NET 2.0 Commerce Server application. Everything is configured correctly, as evidenced by the fact that it is running on a production box using the same web.config (but not the same parent web.config). When I call the EncryptSymmetric() method, I get this error: Server Error in '/Store' Application....
1
6759
by: Author | last post by:
It looks like that there is very little resource about the Enterprise Library on the Web. I know it is documented at msdn, but I haven't found a whole lot sample codes. I was trying out the ExceptionHandling block. So I followed the example at http://www.codersource.net/csharp_exception_handling_enterprise_library.aspx When I debug it, I get this:
0
10424
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10238
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11004
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
10172
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8563
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7714
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6512
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6674
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
5267
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.