ibm-midrange

how to connect a bluemix app to on-premise db/as400?

坚强是说给别人听的谎言 提交于 2019-12-02 16:29:04
问题 trying to connect a bluemix app (java liberty profile) to our on-premise db/as400 using a secure gateway. Denying or allowing all connection, doesn't change the error message. It seems that the request from the app doesn't reach the secure gateway client (and I don't see messages on sgw client that mentions the connection refused). How can i resolve that? This the code: DB_SERVERNAME=jdbc:as400://xxx-xx-xxx-x.integration.ibmcloud.com:15XXX/dbname try { Driver driver = new com.ibm.as400.access

Insert a comma in address field before number of house

会有一股神秘感。 提交于 2019-12-02 16:21:05
问题 I have a table with a lot of address field that have no comma between street name and house number. Something like: "VIA MILANO 123" "VIA MILANO A123" "VIA 11 MILANO AA123" What I need is a SQL that insert the comma before the last group that contain numbers... like: "VIA MILANO, 123" "VIA MILANO, A123" "VIA 11 MILANO, AA123" I found something on net but a lot of thinks is not work on IBM DB". Can anybody help me please ? I have more than 100000 recs in the file to solve. Thanks in advance

Choose AS400 query records directly from Excel

…衆ロ難τιáo~ 提交于 2019-12-02 13:41:15
问题 I've been searching the internet for hours trying to figure out if the following is even possible: To choose the AS400 query records directly from Excel. I haven't found any solution or description of how this could be achieved, which makes me guess that it's simply not possible. However, I haven't seen anyone confirm that it is impossible. So my question is: Is this possible? And if it is, could you point me in the right direction in order for me to start learning how to do it? I know its

php_ibm_db2.dll extension for PHP7 on Windows? [closed]

老子叫甜甜 提交于 2019-12-02 13:01:09
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 8 months ago . I'm having a hard time finding a php_ibm_db2.dll extension for PHP7 on Windows. The most recent version on https://pecl.php.net/package/ibm_db2 is from April 2016, so naturally it doesn't work. I've tried downloading a trial of Zend Server 9.1 and using the bundled php_ibm_db2.dll file in a non Zend Server WAMP

How to send a SQL query to database in PHP without waiting for result

风格不统一 提交于 2019-12-02 08:54:36
Working with DB2 and PHP, my ADDs and DROPs take a long time to finish (30 seconds per ADD and DROP). I am curious if there is a way to send my ADDs and DROPs to the database without having PHP wait for a response? I'm fairly certain that most php db controls don't have async methods (too bad). Presuming that you just need to do DB statements that don't interact with the end user you could use pcntl_fork . If you need something else, a solution like this may be more useful. A simple solution is cron to schedule your tasks http://articles.sitepoint.com/article/introducing-cron Schedule all the

Choose AS400 query records directly from Excel

不想你离开。 提交于 2019-12-02 04:50:41
I've been searching the internet for hours trying to figure out if the following is even possible: To choose the AS400 query records directly from Excel. I haven't found any solution or description of how this could be achieved, which makes me guess that it's simply not possible. However, I haven't seen anyone confirm that it is impossible. So my question is: Is this possible? And if it is, could you point me in the right direction in order for me to start learning how to do it? I know its possible to run a query from Excel, and then adding parameters via SQL statements, but in my case, this

ISDATE equivalent of DB2

坚强是说给别人听的谎言 提交于 2019-12-02 04:33:47
问题 I have a table which contains date in character format . I want to check the format of date . Please let me know how i can do this in DB2. I know there is a function ISDATE but its not working in DB2. I am on AS400 using db2 as date base .. Please help me out 回答1: Actually, it looks like DB2 for the AS/400 may not have the ISDATE() function (I can't find anything in the V6R1 reference - or, interestingly, the LUW reference either). So your problem appears to be that the function does not

Paramertize Fetch First n Rows Only in DB2

纵饮孤独 提交于 2019-12-02 00:47:38
I'm trying to do the following: select * from table fetch first @param rows only @param is an int. DB2 would not have it. I've heard of concatenating it with || , but I can't seem to get that to work. Anyone have experience with this? (PS I saw a similar question ) but didn't understand his approach using ':1'. You could try the following: select t.* from (select r.*, row_number() over() as row_num from table r) as t where row_num <= @param rocket Try this, where V_NBR is your passed in parameter for the number of rows you want: FETCH FIRST ' || DIGITS ( V_NBR ) || ' ROWS ONLY ' 来源: https:/

odbc_prepare gives Fatal error: Allowed memory size exhausted

三世轮回 提交于 2019-12-01 23:43:14
I have a Debian server (64 bits) and I want to connect it to a AS400's database through PHP. I have installed the IBM i Access for Linux and unixodbc. I have followed this tutorial: https://www.albertopicado.es/conexion-odbc-con-base-de-datos-db2-en-un-servidor-ibm-iseries/ although it's in spanish you can see the proccess I have followed. The thing is that I can make a simple connection like: $server= 'DRIVER={DRIVER_NAME};DATABASE=DATABASENAME;SYSTEM=IP;HOSTNAME=IP;PORT=NUMBER_OF_THE_PORT;PROTOCOL=TCPIP;'; $as400= odbc_connect($server, "username", "password"); $as400 ? echo "ok" : echo "ko";

ISDATE equivalent of DB2

僤鯓⒐⒋嵵緔 提交于 2019-12-01 22:59:36
I have a table which contains date in character format . I want to check the format of date . Please let me know how i can do this in DB2. I know there is a function ISDATE but its not working in DB2. I am on AS400 using db2 as date base .. Please help me out Clockwork-Muse Actually, it looks like DB2 for the AS/400 may not have the ISDATE() function (I can't find anything in the V6R1 reference - or, interestingly, the LUW reference either). So your problem appears to be that the function does not exist. The root of the problem, of course, is that attempting to translate an invalid date causes