|
Rob,
Did you try it the way I am? Using DDS as the model file source
and run the test program? I did create the table below and used it in my
test with success, but DDL is not in our future as a tool so the file
must remain as DDS source.
I do not need to use DECLARE GLOBAL TEMPORARY TABLE, but if I
use that command I just need DECLARE GLOBAL TEMPORARY TABLE to define
the temp table exactly like the model file created with DDS.
I question why the format ids are the same for the model file
(DDS) and the temp file when I *do not* specify a date field. I created
another version of the test file with date as the only field and it
works like a charm. I did another test with date before other fields
(again in DDS only) and it fails with CPF4131. The DECLARE GLOBAL
TEMPORARY TABLE works fine with a table defining any other data type
that is not a date, time or timestamp (I did not try DBCS types either).
Our work around to this is to use the good old CRTDUPOBJ,
DECLARE GLOBAL TEMPORARY TABLE seemed like a nice way to not have to
code in QCMDEXC functionality.
Thanks, Matt
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Thursday, March 23, 2006 11:22 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: GLOBAL TEMPORARY TABLE issues
I'd recompile the program against the file created with the GLOBAL...
> CREATE TABLE QTEMP/MATT (
MYCHAR CHAR (5 ) NOT NULL WITH DEFAULT,
MYDATE DATE NOT NULL WITH DEFAULT,
MYDEC DEC (7 , 2) NOT NULL WITH DEFAULT)
Table MATT created in QTEMP.
> DECLARE GLOBAL TEMPORARY TABLE DUH AS (
SELECT * FROM QTEMP/MATT) WITH DATA
Table DUH created in QTEMP.
One line RPGLE program
FDUH IP E DISK RENAME(DUH:DUHR)
Compiles fine.
Executes fine. No level check.
> CALL DUHPGM
V5R4
PTF Group Level
SF99540 6024
SF99539 5
SF99504 1
...
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.