as400

Distributed Transaction from .NET to DB2

I have a problem where in I have to call into the AS400 db2 to call a series of insert/update stored procedures from my .net and then update a few SQL2005 tables if everything in the AS400 db goes ahead fine. The driver I am using does not have distributed transactions so I was wondering if you can use any of IBMs iSeries Drivers for DB2...

Sub select issue

Hi, I'm trying to do a subselect in SQL on an AS400 and getting a "Data conversion or data mapping error" - I'm pretty sure its to do with the way SQL is handling dates in the subselect (specifically it's changing the format by adding commas into a decimal field and it's getting confused when it does the next select) - could someone conf...

Has anyone here tried using the iSeries Python port?

I found http://www.iseriespython.com/, which is a version of Python for the iSeries apparently including some system specific data access classes. I am keen to try this out, but will have to get approval at work to do so. My questions are: Does the port work well, or are there limits to what the interpreter can handle compared with stan...

Procedure pointers in RPGLE (PROCPTR)

Can anyone provide any interesting usage examples of these? ...

Lilian Date function in SQL Server 2008

I am working with an AS400 database and SQLServer 2008. I would like a way to convert a date in say, MM-DD-YYYY into lilian format and back in T-SQL. Anyone know of any? Even if I convert the data that I had in the AS400 into SQLServer 2008 I believe I will still need the same function. ...

Is there a way to release a saturated connection pool?

Hi, I'm working with open esb on a glassfish server. We have a connection pool that works with an as400 Database. Every couple of days we get this error: Error in allocating a connection. Cause: In-use connections equal max- pool-size and expired max-wait-time. Cannot allocate more connections The best way to relief the cp is to resta...

How can you enable transactions with IBM.Data.DB2.iSeries for stored procedures

I am trying to write a client which executes a series of DB2 iSeries Stored procedures in DB2. I am using the IBM.Data.DB2.iSeries provider and need all my calls to be within a .NET transaction. Seems like everything is ignored and data being committed.Any pointers... ...

Why does DB2 CHAR() function return '24:00:00' for a time field that is 00:00:00?

I'm querying DB2 on i (AS/400). A plain SELECT statement on a column with datatype of TIME returns 00:00:00, but when I use the CHAR() function it returns '24:00:00'. I understand that 24:00:00 is a valid time, but why would CHAR() return 24 when the native TIME returs 00? ...

What should be my standard choice of integer type in RPGLE?

When I want an integer in an RPGLE program, what data type should I choose? I'm talking about an integer that doesn't correspond to any field in the database, just a normal general purpose integer - kind of the equivalent of an int in Java. ...

Subversion for iSeries

Hi, We need info about Subversion for iSeries (OpenSource version). Has anyone used it for production systems? Thanks, Sam ...

AS400 / DB2 cross-library query problem

Hi - I'm querying an Iseries from ODBC in my app and am trying to perform a query that returns results from 2 tables. I need to join the tables but the tables are in different libraries. I don't want to use library identifiers in my query as my libraries change as I move from dev>qa>prod. However, I am certain that these tables will only...

Can I avoid stating the library name in a SQL query to an AS400?

Gurus, Is there anyway that I can setup my DSN to avoid having the say "LIBRARY.TABLE" in my SQL statements? Our test and production environments differ in that the test AS400 does not have "TABLE" in the same library as production. I don't want to have to change code in moving from test to production. That defeats the purpose. Chri...

Copy SQL Stored Procedures between DataSources/Schemas?

Hi Friends, I've created SQL stored procedures in our development schema and its working fine. Now we are in the task of moving our development codes to production one. How do I copy those stored procedures from one schema to another schema? Do I need to re-compile whole procedures on targeted schema? Or Is there any way register those p...

What's the equivalent of Oracle's to_char in AS400 DB2 SQL syntax?

I'm trying to display a DATE field fetched from a DB2 instance. In Oracle I'd use something like: to_char(v_date, 'YYYY-MM-DD') What's the equivalent in AS400 DB2? ...

C#: Convert AS/400 date into DateTime

Dates in DB2 AS/400 are an integer, containing the number of days since sometime around the turn of the 20th century. Question 1: Does anyone know the IBM DB2/AS400 "zero" date? e.g.: 12/30/1899 12/31/1899 1/1/1900 Question 2: Given an "AS/400" date (e.g. 40010) how can you convert that to a CLR DateTime? DateTime d = new DateTime(...

Uanble to connect to AS400

When I am trying to connect to AS400 using C#.NET, it's giving me error: IBMDA400 is not registered on local Machine Can anyone please explain me about this? ...

AS400 Java Java program completed with exit code 1

Every attempt to run a java program on our AS400 (I5 OS VR4, JVM 1.4.2) result in the same error message: Java program completed with exit code 1 Any suggestions? ...

DB2 AS400 Java function always returns same value

Hello, I am writing a user defined function to DB2 on AS/400 in Java and the strangest thing happen.. I am always getting the same result from the function even when i am changing it, even if i am dropping it and create it again and even when i specify NOT DETERMINISTIC.. Does any one have ever encountered a behavior like that? ...

Add a field description to a DB2/400 file

I have a set of files in a library on an AS/400/iSeries/System-I/iSeries/whatever-IBM-wants-me-to-call-it-these-days which I do not have DDS for (created in SQL I gather) but to which I would like to add field descriptions. I cannot find a way to do this on the 400. Does anyone know how I can add field description? Is directly updat...

Create a Spooled File from Java with a specified Job name on iSeries

Is there a way to specifiy the JOB name when creating a spooled file? So that my created s.f. doesn't have the default "QPRTJOB". My method that creates a spooled file with the default QPRTJOB job: public static SpooledFile createSpoolFile( com.ibm.as400.access.AS400 as, PrinterFile pPrinterFile, OutputQueue outq, String ...