There is a requirement to have a subset of data available in DB2 tables in production to a test environment. There is no relationship defined in DB2 (so info available in catalog relationship tables). Now we need to find the relationship between the tables using some automation process. So we might...
I need to perform an update as follows... Update LIBNAME.SDFILE Inner Join LIBNAME.DXFILE On SDPRDC = DXPRDC And SDSENO = DXSENO And SDORNO = DXORNO And SDLINE = DXLINE Set DXDNAM = '', DXDAD1 = '', DXDAD2 = '', DXDAD3 = '', DXDAD4 = '', DXDPCD = '', DXINVN = 0 Where SDIECD = 'SO'...
The following sql query in DB2 is giving the exception. What can be the correct query for this in DB2? SQLQuery=update EMP set validityenddate='01-JAN-07' WHERE username='XYZ' Exception: msg=java.sql.SQLException: [DataDirect][ODBC DB2 Wire Protocol driver][UDB DB2 for Windows, UNIX, and...
I am trying to connect to a remote DB on a UNIX server. I am using embedded SQL statements to achieve this task. I have a file that contains DB name, ID & PW that I pass to the connect statement, rather than hardcoding the info to the program (for security reasons). C EstConnect BegSr ...
I'm experiencing a database hang and so far I haven't discovered the root cause of the problem. We are running DB2 v9 fixpak 3a on AIX 5.3. The instance is hanging and we can't kill the DB2 processes so the only way to restore services is rebooting the server. The following is the output from the...
I am new to Db2 on iSeries. I am running some SQL script files using JDBC to create a repository on DB2 for my project. The query is of the form: Create table tbl_name(col1 datatype(size),...... ,coln datatype(size)) DATA CAPTURE NONE; I am getting error on token DATA.. I tried to execute this...
How can we convert a varchar field to Numberic in a SQL Query in db2 400?
I want to know how to set up a SQL procedure that joins a header file and detail file where the status field in header = 'X' then updates this header record after selecting the detail records.
How do I use FORMAT keyword in a non-join logical file? What is the main purpose of that keyword?
I have a 3rd party application that maintains a customer master file (update, insert, delete) and I cannot alter their programs. I would like to put a trigger on the database file to fire an external program on insert and determine if the insert should be performed. If not, I would like to send a...
Hello Guys, In DB2/400 even after we delete record from file, the record exists until we are done with RGZPFM. The deleted record can be identified by a indication field with value "Y" or "N". How to see this indicator field? How to see the DB2/400 RRN (Relative record number)field? I tried...
I have a Cobol program which calls another DB2 program which in return executes a procedure. And this call happens more than thousands time...so EDM Pool getting filled up with pages which shuts down the DB2. Can you suggest what needs to be done to minimize the EDM Pool issue.
I'm trying to extract data from a DB2 table via an SQL query and use IKJEFT01 to create a flat file. However, one of the non-key fields contains characters that are not nulls but non-printable. Whenever IKJEFT01 extracts these characters it changes them to nulls in the flat file. Is there an...
Hello Does anyone know how to select fields in the DB2 Query for report purposes, and yet not have them appear in the sort by window pane. Seem simple enough, but, when I have the field select tab highlighted, and double clik on any field, the field automatically appears in the sort by...
Hello I created metadata over a a "set" of files. My next step is to define a primary over one of the files, and then foreign keys over the other files defined in my metadata relational database. Unfortunately, when I attempt to define my primary key over the main file, I receive...
How can I provide field editing for DB2 WebQuery? For example: phone number(length 10, decimals 0) as (123)456-7890 and Customer Id# (length 6, decimals 0) as 1234-56 . DB2 WebQuery doesn't seem to pay attention to the edit words/edit codes of the PF DDS, so I am trying to do my own...


