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
-1
votes
2 answers

LIKE pattern matching on AS400

I have a table with one column(ID), values are in the format of '123-456-7890'.Now I need to fetch all the rows from the table whose ID values are of the same format. I tried to query as Select * from file where ID like…
HABBIE
  • 21
  • 2
  • 10
-1
votes
1 answer

How can a handle errors from db2_fetch_assoc in PHP?

I have a query to a program that I am running on my iSeries. I understand that sometimes this query will fill occasionally because there are no records to select. Every time the query fails, it logs to php.log as: PHP Warning: db2_fetch_assoc():…
AJ Birone
  • 151
  • 2
  • 9
-1
votes
1 answer

Calculating stock per day

In my report http://pastebin.com/HJJBCueY I would like to add another column named "Stock per day" that will store sum of all stock values per day . For all rows IN 05.06.2013 that column would have value=110221, and for all rows 88777. Thanks
Chris
  • 43
  • 1
  • 3
-2
votes
1 answer

DB2 vs MS-SQL data filter

I'm doing a data migration from DB2 to MS-SQL. And I came across this issue. Whenever I select records like REGN20 > '3' from DB2 side, I get the following result: whereas if I do the same selection from the MS-SQL side, I get the following: REGNO…
Hansa G
  • 11
-2
votes
1 answer

COUNT RESULT +++++++++++ in DB2?

How to count use SQL if the total record is 4155925081. But result count is = ++++++++++++++ I used the SQL select count(*) from table9; Can anyone to help me to figure out why I am getting that result?
mae
  • 47
  • 5
-2
votes
1 answer

I want data for customers for last three months from there deactivation date So I joined two

I want data for customers for last three months from there deactivation date So I joined two tables One table have data like recharge, Report_Month Other table have deactivation date Both table have mobile number column So I have condition in where…
Akshay
  • 33
  • 3
-2
votes
1 answer

Convert XML PATH sample code from SQL Server to DB2

I'm converting the SQL server to db2.. I need a solution for stuff and for xml path Ex Select stuff(select something from table name Where condition For xml path(''),1,1,'') Pls convert this into db2.
-2
votes
2 answers

Why I'm getting unexpected results of VARCHAR comparison?

I'm executing a sentence like this. fld1 VARCHAR(5); Select * from MyTable where fld1 = 'HELLOWORLD'; In the table there is only fld1='HELLO', for some reason the result set give me as result rows that fld1='HELLO'. If fld1 is VARCHAR 5,…
-2
votes
2 answers

Extract complex text pattern using SQL function

I need to extract a text pattern looking like this: NN-NNN-NNNNNNNNN (2digit,minus, 3digits,minus,9digits) from along text field. For example, specific field looks like this: "fsadlk fasldkl jhkjfd khjfasd 11-333-878787618 hfsd uhjkfads" I need…
-3
votes
2 answers

DB2 Query running slow

I am trying to speed up the below query which is running very slow. This is just half of the original query I am using and the other half is a union to another query. Can someone please let me know if they are seeing any obvious red flags in the…
theju112t
  • 37
  • 9
-3
votes
1 answer

DB2 Merge SQL iSeries

I created this function to update or insert a row based on if a row already exist, or not; the error I am getting is VAR1 is not a variable. This is my first time setting up a merge in this fashion on a iSeries and DB2. Hope someone can help,…
johnjump
  • 1
  • 2
-3
votes
1 answer

Create UPDATE from a SELECT-query including subquery retrieving several columns

I have the following SELECT query: SELECT T3.EPSINO AS FaktNr, T3.EPDIVI AS Div, T3.EPSUNO AS Lev, T3.EPPYME AS BetMet, T2.Summa AS Belopp FROM M3EDBPTS.FPLEDG T3 JOIN (SELECT T1.EPCONO, T1.EPSINO, …
Lily
  • 9
  • 6
-3
votes
2 answers

Code is not incrementing locations needed

I have an sqlrpg program which is supposed to generate warehouse locations, 8 positions, in a loop so that we will have rows, aisles,bins, as: but code is only producing the first row below, and is in a 'never ending loop. Now this below code is the…
-4
votes
0 answers

SQL Server migration assistant for db2 table issue

[ssma table view](https://i.stack.imgur.com/3HyxQ.png) I’m trying to use ssma for db2 to convert ibm I db2 file schemas to sql server 2022 schemas then migrate data. I successfully connect to ibm i db2 database. I can drill down to the file schema I…
cmo1agg
  • 1
  • 3
-4
votes
2 answers

How to download and install IBM AS/400 database on window?

My requirement is to download and install db2/400 database on windows but I am unable to find the download option which can install db2/400 database on my window laptop. I can find drivers to connect with the db2/400 database but please help me get…
Ashish Pancholi
  • 4,569
  • 13
  • 50
  • 88
1 2 3
64
65