ibm-midrange

javax.naming.NameNotFoundException: Name [jdbc/mydb] is not bound in this Context

匆匆过客 提交于 2019-12-08 09:14:21
问题 I know this question has been asked several times. I found some links here and here as an example of what I found. But I try their solutions and my problem is not solved yet... So I copy what I have: A J2EE project in Eclipse. I built a new .war to install in an application server I created a Tomcat 7 Server in Eclipse and added my .war to it to deploy it locally So phisically in my project I have a .war project and the Servers project that auto-creates when you create a new Server in Eclipse

Force Unicode on Data Transfer utility for iSeries AS400 for TSV tab delimited files

北慕城南 提交于 2019-12-08 08:07:53
问题 I am using Data Transfer utility for IBM i in order to create TSV files from my AS400s and then import them to my SQl Server Data Warehouse. Following this: SO Question about SSIS encoding script i want to stop using conversion in SSIS task and have the data ready from the source. I have tried using vatious codepages in TSV creation (1200 etc.) but 1208 only does the trick in half: It creates UTF8 which then i have to convert to unicode as shown in the other question. What CCSID i have to use

Error SQL0104 when creating a function in System i V7R1

大憨熊 提交于 2019-12-08 08:01:45
问题 I'm creating a SQL function on System i V7R1: CREATE FUNCTION MYSCHEMA.GROUPDIBAS(v_code VARCHAR(50)) RETURNS VARCHAR(2048) LANGUAGE SQL BEGIN DECLARE str VARCHAR(2048); SET str = ''; FOR row AS ( SELECT FIELD2 FROM MYSCHEMA.DIBAS WHERE FIELD1 = v_code ) DO SET str = 'Bubi'; --I removed many statements to make clear the problem doesn't come from them END FOR; RETURN str; END ; I execute it with "Run SQL script" tool, which is part of the iSeries Navigator V7R1. It works on another V7R1 server

How can I calculate the difference in days between two days stored as YYYYMMDD in a query?

≡放荡痞女 提交于 2019-12-08 06:54:25
问题 I am writing a query where I need to calculate the number of days since a date that is stored in the database in the format "YYYYMMDD". Since this is not a Date datatype, I can't use native Date functions. What is the best way (performance-wise, readability-wise, etc.) to perform such a calculation in a SQL query. 回答1: Best? Convert that old table to use real date columns. Next best? Write a database function to convert YYMMDD to a real date. Alan Campin's iDate can help. You'd end up with

Why is Python's .decode('cp037') not working on specific binary array?

别说谁变了你拦得住时间么 提交于 2019-12-08 04:18:16
问题 When printing out DB2 query results I'm getting the following error on column 'F00002' which is a binary array. UnicodeEncodeError: 'ascii' codec can't encode character u'\xe3' in position 2: ordinal not in range(128) I am using the following line: print result[2].decode('cp037') ...just as I do the first two columns where the same code works fine. Why is this not working on the third column and what is the proper decoding/encoding? 回答1: Notice that the error is about encoding to ASCII, not

How Do I Convert a Y2K Date to SQL DATE In SSIS?

南笙酒味 提交于 2019-12-08 03:37:59
问题 I am using SSIS (SQL 2008) to bring data over from an AS400. The date values are stored in the 400 as a 7 digit numeric. Here is the format: "CYYMMDD" C is a "century digit" where 0 = 1900 and 1 = 2000. I have been looking into derived columns and script components. I am very new to SSIS and all the casting required compounded with different cases is making me a dull boy. Also, I am losing leading zeros. I am not sure if that is b/c they are numeric type and I would see them correctly if I

DB2 - How to run an ad hoc select query with a parameter in IBM System i Access for Windows GUI Tool

自作多情 提交于 2019-12-07 16:54:13
问题 I would like to run some ad hoc select statements in the IBM System I Navigator tool for DB2 using a variable that I declare. For example, in the SQL Server world I would easily do this in the SQL Server Management Studio query window like so: DECLARE @VariableName varchar(50); SET @VariableName = 'blah blah'; select * from TableName where Column = @VariableName; How can I do something similar in the IBM System I Navigator tool? 回答1: I ran across this post while searching for the same

SQL differences for DB2 versions

微笑、不失礼 提交于 2019-12-07 14:16:20
问题 We are developing software that generates and executes SQL queries for Oracle and SQL Server using ODBC drivers . We are researching the possibility to expand to DB2 , but I read that there are several versions available. DB2 for LUW , for iSeries and for z/OS. Are there any differences in SQL of SQL/PLSQL functionality in these versions? As a ISV, is it possible to get a development environment for DB2 for iSeries or z/OS 回答1: As many other answers already say, there are differences between

DB2/iSeries SQL clean up CR/LF, tabs etc

╄→гoц情女王★ 提交于 2019-12-07 07:04:58
问题 I need to find and clean up line breaks, carriage returns, tabs and "SUB"-characters in a set of 400k+ string records, but this DB2 environment is taking a toll on me. Thought I could do some search and replacing with the REPLACE() and CHR() functions, but it seems CHR() is not available on this system (Error: CHR in *LIBL type *N not found). Working with \t, \r, \n etc doesn't seem to be working either. The chars can be in the middle of strings or at the end of them. DBMS = DB2 System =

Does git gets installed in IBM/AS400

自作多情 提交于 2019-12-07 04:07:00
问题 I have PHP on running on an AS400. Can Git be also be installed on an AS400? I'd like to use it to maintain version control. 回答1: The YiPs site has instructions on how to get it running in PASE. You can find it here: http://youngiprofessionals.com/wiki/index.php/PASE/OpenSourceBinaries Scroll to the middle of the page or search the page for "Git". UPDATE I've since written this article describing how to install Git on IBM i. 回答2: A friend of mine wrote an unpublished article on installing Git