ibm-midrange

Why am I getting “Data conversion or data mapping error. SQLCODE=-802” on a simple DB2 select statement?

跟風遠走 提交于 2020-01-03 16:49:28
问题 I am accessing DB2 information on an IBM i (AS400) with PHP. With this code: $query = "SELECT * FROM QS36F.MYTABLE WHERE MYFIELD=120006"; $result = db2_prepare($conn, $query); db2_execute($result); $i=0; while($row = db2_fetch_assoc($result) or die(db2_stmt_errormsg())){ $i++; print "Row " . $i . " successful<br />"; } I get: SELECT * FROM QS36F.MYTABLE WHERE MYFIELD=120006 Row 1 successful Row 2 successful Row 3 successful Row 4 successful Data conversion or data mapping error. SQLCODE=-802

Monitor and handle MSGW messages on a job on an IBM i-series (AS/400) from Java

风格不统一 提交于 2020-01-03 05:31:11
问题 Does anyone know how one can automatically reply to messages with status MSGW that block a job on an IBM i-series (AS/400)? I'm using the jt400/jtopen library to access a program on an AS/400 from Java. I'm using the com.ibm.as400.access.ProgramCall class, which works fine, unless the program fails for some reason. As with almost any program, failures will happen sometimes, but unfortunately, in this case, it does not result in a status message or an exception. Instead, the calling thread

SQL concatenate text fields from different records in the same file

时光毁灭记忆、已成空白 提交于 2020-01-01 11:54:09
问题 Were talking about data in a file on an iSeries here using DB2. File structure is as such: Item Textline Text 12755 1 this item 12755 2 is no longer 12755 3 for sale abc123 1 please use abc123 2 another code xyz987 1 obsolete The result im trying to get is Item Text 12755 this item is no longer for sale abc123 please use another code xyz987 obsolete So it is grouped by Item code and the text lines are added up regardless of how many there are. I tried it in query first by joining the file to

FTP Jar file from share path on windows to IFS location in AS400?

陌路散爱 提交于 2019-12-25 15:55:09
问题 I am looking for an approach / design through which i want to automate the process of FTP from windows location to IFS location present on AS400 environment when ever there is a new file added to windows path. Below is the approach I thought, Please refine it if needed. We have an option WRKJOBSCDE through which we can run a CL program in a scheduled threshold of 1hr. To write a CL program which invokes a script(pyton/shell) to talk to windows location( say X:drive having its IP as xx.xxx.xx

Connecting to remote DB2 on i5/os through a php client on a windows machine using pdo_ibm or ibm_db2 php extensions

ⅰ亾dé卋堺 提交于 2019-12-25 08:36:36
问题 I want to use Doctrine2 ORM in my php application. For DB2, Doctrine2 supports only pdo_ibm and ibm_db2 drivers. I installed a local instance of DB2 (DB2 Express-C) and conneceted with pdo_ibm and ibm_db2 successfully and even using the local db2 instance my doctrine2 installation works fine and is functional, but my real aim is to connect to a remote DB2 instance running on a i5/os. Remote connections to this (remote) DB2 works only using odbc and PDO_ODBC but fails with pdo_ibm and ibm_db2

Bluemix Secure Gateway AS 400 DB2 Connection refused Issue

╄→尐↘猪︶ㄣ 提交于 2019-12-25 07:47:08
问题 I have configured Bluemix Secure gateway client to connect to DB2 on AS 400 using a Windows machine. I am able to run the Db2 connection successfully from the application on Windows machine where Secure gateway client is running. But when I run the same application on Bluemix with modifying the code to depict Secure Gateway client destination details, I get 'Connection Refused' error. I had gone through how to connect a bluemix app to on-premise db/as400? , which mentions about Secure gateway

Convert YYYYMMDD to Excel dd/mm/yy

十年热恋 提交于 2019-12-25 07:34:46
问题 In this post Gert Grenander makes a suggestion to format the date field to 'yyyy-mm-dd hh:mm:ss'. How would I convert from 'YYYYMMDD' to 'dd/mm/yy' in my SQL call using the same method? 回答1: select date2, digits(date2), (substr(digits(date2),7,2) concat '/' concat substr(digits(date2),5,2) concat '/' concat substr(digits(date2),3,2) ) as mmddyy from datesample gives: Signed CHAR data type DIGITS ( DATE2 ) MMDDYY ---------- ---------------- -------- 20130711 20130711 11/07/13 You'll need to

how can I typecast NewProxyConnection into AS400JDBCConnection

有些话、适合烂在心里 提交于 2019-12-25 03:57:11
问题 I am new to Spring . I am using ComboPooledDataSource for connection pooling in Spring. I am using the AS400 for making the connection. My problem is that when I am using this connection and try to typecast this AS400JDBCConnection as400Conn = (AS400JDBCConnection)conn; It gives the ClassCastCastException because the connection object returned by the ComboPooledDataSource is of type NewProxyConnection how can I typecast it into AS400JDBCConnection. 回答1: Spring does support unwrapping the

Convert to Text Format In Excel

女生的网名这么多〃 提交于 2019-12-24 23:23:41
问题 I'm extracting some data from AS400 using excel macro. In the AS400, this particular column (Ref), shows 20100729000078154 but when I extracted it to excel, it will be 2.01007E+16. I need to hv 20100729000078154 as my final output. This is the macro that I used to extract the info from AS400 :- Sub Extract() Dim StrSQl As String FromA = Format(Sheet1.Range("B3")) FromB = Format(Sheet1.Range("B4")) FromC = Format(Sheet1.Range("B5")) FromD = Format(Sheet1.Range("B6")) StrSQl = "select Cno,Itno

SQL0802 - Data Conversion or Data Mapping Error

早过忘川 提交于 2019-12-24 14:34:04
问题 I'm am trying to write a query that calculates some numbers on the servers side, rather than after the data is pulled. I keep getting the SQL0802 error. I have tried a regular Sum as well as Double and float commands. I think the return is to long. I'm using SQL Squirrel so I went and removed the decimal place restriction to see if that would fix the problem. It is the "Gross Margin" calculation that is throwing it off. The rest of the calculations work fine. I appreciate any help i can get.