ibm-midrange

If-else statement in DB2/400

半腔热情 提交于 2021-02-20 19:10:53
问题 I am trying to run an SQL that contains if-else statement in AS400 but it doesn't work. I am creating a View using i Series Navigator in order to run it. SELECT IF FIELD1 IS NOT NULL THEN 'AAA' ELSE 'BBB' END IF FROM LIB.TABLE1 The error I am getting is: SQL State: 42601 Vendor Code: -199 Message: [SQL0199] Keyword IS not expected. Valid tokens: , FROM INTO. Cause . . I tried without writing is null but instead SELECT IF FIELD1 ='' THEN 'AAA' ELSE 'BBB' END IF FROM LIB.TABLE1 then I get the

If-else statement in DB2/400

若如初见. 提交于 2021-02-20 19:09:32
问题 I am trying to run an SQL that contains if-else statement in AS400 but it doesn't work. I am creating a View using i Series Navigator in order to run it. SELECT IF FIELD1 IS NOT NULL THEN 'AAA' ELSE 'BBB' END IF FROM LIB.TABLE1 The error I am getting is: SQL State: 42601 Vendor Code: -199 Message: [SQL0199] Keyword IS not expected. Valid tokens: , FROM INTO. Cause . . I tried without writing is null but instead SELECT IF FIELD1 ='' THEN 'AAA' ELSE 'BBB' END IF FROM LIB.TABLE1 then I get the

NetSuite Migrations

可紊 提交于 2021-02-19 05:52:14
问题 Has anyone had much experience with data migration into and out of NetSuite? I have to export DB2 tables into MySQL, manipulate data, and then export ina CSV file. Then take a CSV file of accounts and manipulate the data again for accounts to match up from our old system to new. Anyone tried to do this in MySQL? 回答1: A couple of options: Invest in a data transformation tool that connects to NetSuite and DB2 or MySQL. Look at Dell Boomi, IBM Cast Iron, etc. These tools allow you to connect to

Mail from iSeries with attachment

旧巷老猫 提交于 2021-02-08 20:55:14
问题 Is there a way to send an email from an iSeries terminal, adding an attachment from the IFS? I know how to send a normal email using the SNDDST utility. 回答1: There is two main methods of doing this. The Do-It-Yourselfer will use QtmmSendMail API Otherwise there are several other free and purchased products that you could use. The ones I would recommend are: MAILTOOL - Currently $399. Depending on what you are trying to do, I would recommend SplTool Suite if you want to email out spool files.

Pagination query(SQL) in AS400/DB2

落爺英雄遲暮 提交于 2021-02-08 08:58:22
问题 I have been working on try to create php web-based paging for our tables which have over a million rows. Based on what I have read, I have 3 options retrieve all rows in resultset - not possiblefor me coz of the size retrieve 1000 rows, store in temp table and create an iterator for it and page through it - too many queries - too many inserts!! run a query each time if someone opts page forward or backwards Right now I am trying to get option 3 working. I have the first page showing up as

iSeries Access ODBC Driver with unixodbc on Debian - Invalid UTF-8 characters being returned from iSeries

只谈情不闲聊 提交于 2021-01-29 19:38:36
问题 Using ODBC driver, ibm-iaccess-1.1.0.10-1.0.amd64, on Debian Linux. When I perform a php sql query and validate the response, I see some of the data returned is not valid utf-8. mb_check_encoding returns 'false' and the character on screen in a chrome browser is the diamond question mark character. This happens on a few CHAR field types. if(!mb_check_encoding($row["field"])) { ... exit with utf-8 error } I can work around this by converting from UTF-8 to UTF-8: mb_convert_encoding($row["field

php - convert ebcdic to ascii

懵懂的女人 提交于 2020-12-04 12:59:17
问题 $my_var = "1"; $connection = db2_connect ( "*LOCAL", "ISCSC", "ISCSC" ); $strSql = 'CALL LMTLIB.ARTEST(?)'; $stmt = db2_prepare ( $connection, $strSql ); db2_bind_param($stmt, 1, "my_var", DB2_PARAM_INOUT, DB2_CHAR); $rc = db2_execute ( $stmt ); echo $my_var; When this code block executes, $my_var has the value ¦–¦ The test RPGLE program being called is returning wow When the program is altered, the characters i get back are different... so i know i'm getting back values from the program. The

php - convert ebcdic to ascii

久未见 提交于 2020-12-04 12:59:12
问题 $my_var = "1"; $connection = db2_connect ( "*LOCAL", "ISCSC", "ISCSC" ); $strSql = 'CALL LMTLIB.ARTEST(?)'; $stmt = db2_prepare ( $connection, $strSql ); db2_bind_param($stmt, 1, "my_var", DB2_PARAM_INOUT, DB2_CHAR); $rc = db2_execute ( $stmt ); echo $my_var; When this code block executes, $my_var has the value ¦–¦ The test RPGLE program being called is returning wow When the program is altered, the characters i get back are different... so i know i'm getting back values from the program. The

php - convert ebcdic to ascii

纵然是瞬间 提交于 2020-12-04 12:58:52
问题 $my_var = "1"; $connection = db2_connect ( "*LOCAL", "ISCSC", "ISCSC" ); $strSql = 'CALL LMTLIB.ARTEST(?)'; $stmt = db2_prepare ( $connection, $strSql ); db2_bind_param($stmt, 1, "my_var", DB2_PARAM_INOUT, DB2_CHAR); $rc = db2_execute ( $stmt ); echo $my_var; When this code block executes, $my_var has the value ¦–¦ The test RPGLE program being called is returning wow When the program is altered, the characters i get back are different... so i know i'm getting back values from the program. The

php - convert ebcdic to ascii

為{幸葍}努か 提交于 2020-12-04 12:58:18
问题 $my_var = "1"; $connection = db2_connect ( "*LOCAL", "ISCSC", "ISCSC" ); $strSql = 'CALL LMTLIB.ARTEST(?)'; $stmt = db2_prepare ( $connection, $strSql ); db2_bind_param($stmt, 1, "my_var", DB2_PARAM_INOUT, DB2_CHAR); $rc = db2_execute ( $stmt ); echo $my_var; When this code block executes, $my_var has the value ¦–¦ The test RPGLE program being called is returning wow When the program is altered, the characters i get back are different... so i know i'm getting back values from the program. The