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
18
votes
3 answers

GETDATE() method for DB2

I have been trying for a while now to get a similar method to GETDATE() in DB2 for i. So far I have found the following: current date current timestamp current time Would it be possible for me to: select specific, columns from table where…
DeanMWake
  • 893
  • 3
  • 19
  • 38
17
votes
1 answer

HikariPool-1 - Connection marked as broken because of SQLSTATE(08S01), ErrorCode(-99999)

HikariPool-1 - Connection marked as broken because of SQLSTATE(08S01), ErrorCode(-99999) java.sql.SQLNonTransientConnectionException: Communication link failure. (Read timed out) I kept getting this problem, when creating a table with data, which…
Anders Metnik
  • 6,096
  • 7
  • 40
  • 79
16
votes
6 answers

DB2 400 drop column

I want to drop a column called id which is an auto incrementing PK. The SQL: alter table "CO88GT"."XGLCTL" drop column id cascade; And I get: Error: [SQL0952] Processing of the SQL statement ended. Reason code 10. SQLState: 57014 ErrorCode:…
Quaternion
  • 10,380
  • 6
  • 51
  • 102
13
votes
2 answers

C# ADO.NET IBM DB2 named parameters with same name throws Not enough parameters specified Exception

I have a fairly agnostic ADO.NET application that connects to a number of databases and is able to extract the necessary information to run. I have hit a snag with DB2 and how it handles named parameters, particularly when I reuse a named parameter…
Brent
  • 141
  • 5
11
votes
2 answers

SequenceInformation missing

I'm working with a Spring boot Application connecting to an AS400 Database using the com.ibm.db2.jcc.DB2Driver driver with Spring Data JPA. I use the org.hibernate.dialect.DB2Dialect dialect. When I start the Application, I get the Error Could not…
Urr4
  • 611
  • 9
  • 26
10
votes
6 answers

How do I programmatically run a complex query on an as400?

I'm new at working on an as400 and I have a query the joins across 4 tables. The query itself is fine, it runs in STRSQL and displays the results. What I am in struggling with is getting the query to be able to run programmatically (it will…
Jared
  • 101
  • 1
  • 1
  • 4
7
votes
2 answers

AS/400 'SELECT 1' Equivalent

I'm trying to help a friend troubleshoot connection problems with an AS/400. He'd like to run a query against the AS/400 that will always return a record, (similar to a SELECT 1 against MSSQL). He's attempted running SELECT 1 but without luck ...…
cookbr
  • 125
  • 2
  • 9
7
votes
3 answers

What's the correct way to check sql found condition in ILE RPG?

When working with embedded SQL in RPG, you often end up with a cursor and a dow-loop for processing all rows in your result. The condition in the loop is somehow dependent on SQLCOD and/or SQLSTT, some globally available variables in an…
kratenko
  • 7,354
  • 4
  • 36
  • 61
7
votes
2 answers

Add a field description to a DB2/400 file

I have a set of files in a library on an AS/400/iSeries/System-I/whatever-IBM-wants-me-to-call-it-these-days which I do not have DDS for (created in SQL I gather) but to which I would like to add field descriptions. I cannot find a way to do this…
jwl
  • 10,268
  • 14
  • 53
  • 91
7
votes
2 answers

How do I iterate over a set of records in RPG(LE) with embedded SQL?

How do I iterate over a set of records in RPG(LE) with embedded SQL?
nearly_lunchtime
6
votes
2 answers

How to "Reset" the UDF DETERMINISTIC reponses?

IN DB2 V5R4, When you modify the functionality of a DETERMINISTIC UDF It returns the cached response for a while... There are any way to reset the cached responses? Thanks in advance.
Pedro Vaquero
  • 89
  • 1
  • 10
6
votes
1 answer

How do I access AS/400 using SQLAlchemy?

Short version: Please tell me how to connect to AS/400s via SQLAlchemy. Long version My ultimate goal is to join data from SQL Server and AS/400 to be displayed in a Flask Python application. My approach has been to get the data from each database…
MarredCheese
  • 17,541
  • 8
  • 92
  • 91
6
votes
4 answers

IBM DB2: Generate list of dates between two dates

I need a query which will output a list of dates between two given dates. For example, if my start date is 23/02/2016 and end date is 02/03/2016, I am expecting the following…
Goutam
  • 113
  • 1
  • 1
  • 7
6
votes
1 answer

How can we View the DB2 Procedure and How can we execute the DB2 Procedure and just see the output of the procedure using DB2

How can we View the DB2 Procedure (I mean what logic they have written ) and How can we execute the DB2 Procedure and just see the output of the procedure using DB2
Someone
  • 10,405
  • 23
  • 67
  • 100
5
votes
2 answers

How to make connection in python to connect as400 and call any as400 programs with parameter

Anyone knows How to make connection in python to connect as400 iseries system and call any as400 programs with parameter. For example how to create library by connecting as400 through python. I want to call " CRTLIB LIB(TEST) " from python script. I…
MagicBox
  • 63
  • 1
  • 1
  • 6
1
2 3
64 65