ibm-midrange

How can I insert additional libraries to my jdbc/DB2 connection?

天大地大妈咪最大 提交于 2019-12-24 12:50:17
问题 I'm writing a little java program to write data in a AS/400 DB2 table via jdbc (db2jcc.jar version 1.0.581) and a trigger is associated to the INSERT operation. This trigger works on various tables associated with libraries different from that (jdta73p10) which contains my table (f4104). Follows the code I use to establish connection and read data that perfectly runs. import java.sql.*; import com.ibm.db2.jcc.*; public class ProvaNUMEAN13 { public static void main(String[] args) throws

Library List is not being used in remote PHP DB2 connection to IBM i

前提是你 提交于 2019-12-24 10:56:08
问题 I've successfully connected to a remote IBM i DB2 database (AS400) from my local Windows PC via PHP. I'm using the IBM Data Server Client in conjunction with the db2_* functions in PHP. The problem I'm having is that despite my library list being set properly, it is not being used for unqualified table names. Instead it uses the current user name as the library. However, when I qualify the table names everything works like a charm. I've confirmed that my library list is actually changing when

very large fields in As400 ISeries database

拜拜、爱过 提交于 2019-12-24 09:35:42
问题 I would like to save a large XML string (possibly longer than 32K or 64K) into an AS400 file field. Either DDS or SQL files would be OK. Example of SQL file below. CREATE TABLE MYLIB/PRODUCT (PRODCODE DEC (5 ) NOT NULL WITH DEFAULT, PRODDESC CHAR (30 ) NOT NULL WITH DEFAULT, LONGDESC CLOB (70K ) ALLOCATE(1000) NOT NULL WITH DEFAULT) We would use RPGLE to read and write to fields. The goal is to then pull out data via ODBC connection on a client side. AS400 character fields seem to have 32K

DB2 SQL Case Insensitive

眉间皱痕 提交于 2019-12-24 09:29:08
问题 I'm executing the below DB2 SQL via SQL Server (so needs to be in DB2 SQL): exec (' select TRIM (vhitno) AS "Item", TRIM (mmitds) AS "Description", TRIM (SUBSTRING (vhitno,12,4)) AS "Size", vhalqt AS "Available" from m3fdbtest.oagrln left outer join m3fdbtest.mdeohe on vhcono = uwcono and vhcuno = uwcuno and vhagno = uwagno and vhitno = uwobv1 left outer join m3fdbtest.mitmas ON vhcono = mmcono AND vhitno = mmitno where uwcono = 1 and uwstdt >= ? and uwlvdt <= ? and uwcuno = ''JBHE0001'' and

How do i call an AS400 program from command prompt of windows?

廉价感情. 提交于 2019-12-24 09:05:19
问题 I am trying to call a program using command prompt using command "QUOTE RCMD CALL PGM(LIB/MyPGM)" I am getting this error : How to perform this action ? 回答1: Syntactically, your command is correct. The error occurred while the server was trying to call the program. The text for message CEE9901 is: Message . . . . : Application error. &1 unmonitored by &2 at statement &5, instruction &3. Cause . . . . . : The application ended abnormally because an exception occurred and was not handled. The

Linked server INSERT, UPDATE and DELETE fails with “Unknown provider error”

牧云@^-^@ 提交于 2019-12-24 08:09:43
问题 Suddenly INSERT, UPDATE and DELETE fails for a certain file (a table in a remote system which I believe is an AS/400). The linked server that we make use of is set up in SQL Server, and it's using an ODBC data source (DSN). The Data source is an "ODBC-data source for iSeries Access for Windows". Only one single table has this problem. We can make inserts and updates in other tables using the same linked server, without any errors, and SELECTs still work for the problematic table. We get these

IBM .NET Data Provider Connection String issue with Library List

偶尔善良 提交于 2019-12-24 02:25:17
问题 I am trying to use the DB2 .Net Data Provider in a C# program rather than relying on ODBC. The connection string below works, but only for one library (say my libraries are test1 and test2). Data Source=xxx.xxx.xxx.xxx;User Id=testuser;Password=testpassword; Naming=SQL;Default Collection=test1; If I add "Library List=test1, test2;" (I have tried several variations of that) to the connection string, it does not allow me access additional libraries, only what is defined in defaultcollection. I

Using LINQ with IBM i

允我心安 提交于 2019-12-24 00:29:47
问题 Has anyone been able to use LINQ with the IBM i? That is without having to write a custom provider? 回答1: I haven't worked with IBM i directly, but IBM has a page that outlines the limitations of using LINQ to Entities with their product outlined here: http://www.ibm.com/developerworks/wikis/display/DB2/IBM+Data+Server+LINQ+Entity+Framework+Limitations Note that there is no (official) support for any other platform but SQL Server when using LINQ-to-SQL, so you won't be able to use it for

IBM DB2 for i error messages using short column names in errors

只谈情不闲聊 提交于 2019-12-23 20:19:02
问题 Note this question is specific to "IBM DB2 for i", the IBM i operating system's version of DB2. The below screenshot shows a purposely erroneous INSERT statement that produces an SQL error of SQL0407. My question... Is there a DB2, JDBC, or other setting I can alter so the long column names are used in the error vs. the cryptic short ones? Note I used the long column names in the INSERT statement. 回答1: Carol Ramler, DB2 for i Senior Software Engineer at IBM , responded with this: In this

howto connect to as400 with PHP

扶醉桌前 提交于 2019-12-23 17:16:51
问题 I am trying to connect my AS400 with V5R3 with PHP using this code : <?php $server="Driver={Client Access ODBC Driver (32-bit)};System=xxx.xxx.xxx.xxx; Uid=user;Pwd=password;"; #the name of the iSeries $user="user"; #a valid username that will connect to the DB $pass="password"; #a password for the username $conn=odbc_connect($server,$user,$pass); #you may have to remove quotes #Check Connection if ($conn == false) { echo "Not able to connect to database...<br>"; } #Query the Database into a