Questions tagged [db2-400]

DB2-400 is IBM's name for the database integrated into the OS/400 operating system for it's AS/400 line of midrange computers. The current name is DB2 for i.

DB2-400, currently known as DB2 for i, is the database embedded into IBM's midrange line of computers running the IBM i operating system. Though related to DB2 UDB for LUW, it runs on a totally different platform, and is on a different release schedule than DB2 UDB for LUW, and thus has some differences in functionality. You can find documentation for DB2 for i in the Database section of the IBM i infocenter.

One of the major differences between DB2 for i and DB2 for LUW is that DB2 for i has a native data access engine called RLA (Record level Access) that allows HLL programmers to access the database without using SQL. This capability was added to preserve compatibility with the RPG and COBOL languages. An SQL precompiler is available for both RPG and COBOL that allows programmers to embed SQL statements directly into their programs.

963 questions
5
votes
1 answer

How can I INSERT data into two tables simultaneously with only one sql script db2?

How would I insert into multiple tables with one sql script in db2 For example, insert a row into T1 DOCK_DOOR and then insert into T2 DOCK_DOOR_LANE multiple times based on the dock_door_sysid from the first table. My first approach was the…
Bobby Mor
  • 77
  • 1
  • 7
5
votes
1 answer

Requester cannot establish the connection. Jetty, Lift /Scala, iSeries DB2/400

I’m working my way through the Lift Application Development Cookbook by Gilberto T. Garcia Jr and have run up against a problem I can’t seem to resolve. I’ve copied the source code Chap06-map-table and I’m trying to modify it to work with my IBM i…
Bob Nicholson
  • 163
  • 11
5
votes
2 answers

Add a column to a DB2/400 table with a specific ordinal position

Is there an SQL command on the AS400/iSeries/System-i/whatever to add a column to a table in a specific ordinal position, or moving an existing column to a different position?
jwl
  • 10,268
  • 14
  • 53
  • 91
5
votes
1 answer

Can I dump a DB2 database on an AS400 to Windows or Linux?

It's been years since I've worked with DB2, but I just inherited a legacy appllication that reads/writes to DB2 via JDBC and it runs on an AS400. I don't have a lot of details yet on the platform or versions, but I am wondering is it generally…
Griff
  • 1,796
  • 3
  • 23
  • 48
4
votes
2 answers

meta data on As400 (IBM i) SQL table QSYS2.SYSTABLES

I am looking at meta data on As400 (IBM i) SQL table QSYS2.SYSTABLES. Table text (description) seems to be encrypted. Any way to read this column? SELECT substr(TABLE_NAME,1,10) TABLE_NAME, TABLE_TEXT FROM QSYS2.SYSTABLES …
4
votes
1 answer

At what point are DB2 declared global temporary tables automatically deleted...?

When are DB2 declared global temporary tables 'cleaned up' and automatically deleted by the system...? This is for DB2 on AS400 v7r3m0, with DBeaver 5.2.5 as the dev client, and MS-Access 2007 for packaged apps for the end-users. Today I started…
spinjector
  • 3,121
  • 3
  • 26
  • 56
4
votes
1 answer

python/sqlachemy/ibmdb2 - sqlAlchemy insert with Db2 for i, AS400?

Trying to use sqlAlchemy with IBM Db2 AS400 (IBM i7.2) database. but get an error while adding objects in the database via sqlAlchemy query. class Client(Base): """ Client Account Schema """ __tablename__ = 'client' client_id =…
teja.vk
  • 83
  • 9
4
votes
1 answer

Is there any print statement in db2 just like oracle

Is there( db2 database) any equivalent of DBMS_OUTPUT in Oracle or PRINT in SQL Server for DB2 or do I need to jump over my head again for this sort of thing? please provide some code also.
raj
  • 51
  • 2
  • 5
4
votes
1 answer

iSeries SQL: current date not allowed when selecting records to create a table

I need to create a materialized query table with records which have an attribute retrieved with a sub query on a second table, in order to get the most recent value of that attribute. This question is very similar to the one discussed…
mlstoppa
  • 97
  • 9
4
votes
4 answers

How to view Journal data of a Table Green screen DB2

How do you view journal data from a specified table? I want to see what happended to a table in a specified time frame. I got info on the table by using the following command: DSPFD FILE(P6PRDBDB00/P6OIDPF) Got the journaled name and library but…
Renier
  • 1,738
  • 3
  • 24
  • 51
4
votes
1 answer

iSeries Datasource Locking

I have a data source set up on my AS400 (iSeries) and when Cognos accesses it through the client access ODBC driver, it locks the files on the AS400. Even if the report closes the files remain locked for a length of time. This causes issues with…
Jeff
  • 329
  • 3
  • 13
3
votes
1 answer

Ruby, DB2/400, ibm_db causing "segmentation fault"

Ok, I'm new to Ruby and I'm trying to figure out how to connect to a DB2 database running on an AS/400 (iSeries, Power i, System i, whatever IBM is calling it these days). Here are my specifics: OS: Windows 7 Pro 64-bit Ruby: 1.9.3p125…
Pablo Vadear
  • 95
  • 1
  • 10
3
votes
1 answer

call program in interactive sql as400

Is there a way to call a program from db2 interactive SQL in as400 (strsql)? this program receives an argument by reference and modify it's content. In CL, you simply call it like this: call myprogram 12345 I need to be able to call it in…
Sfp
  • 539
  • 4
  • 15
3
votes
1 answer

What do hyphens signify in Db2 for i query results?

I want to filter out the rows containing dashes in the following query. The PRMWT column is DECIMAL (9, 3). Query SELECT PPA#, PRMWT FROM FUTMODS.SCPMSTQ WHERE PPA# = '20829161' Result PPA# PRMWT 20829161 53.513 20829161 …
MarredCheese
  • 17,541
  • 8
  • 92
  • 91
3
votes
3 answers

IBM DB2: how to change a view's structure without deleting it and create it again?

IBM DB2: how to change a view's structure without deleting it and create it again? " I have a view in DB2 IBM i-series and I would need to "update"/change it's "query". The only way I know so far is deleting and building it again but in this case I…
Totty.js
  • 15,563
  • 31
  • 103
  • 175
1
2
3
64 65