× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi,

in an SQL created table (temporary or not) format and table name are
identical.
In RPG we need different format and file names.
Try to rename the format of the temporary table in the F-Specs i.e.
Rename(Workfile: WorkfileF)

Additionally I'd add a SET OPTION statement to fix the date format to *ISO.
But I don't think that the date is the problem, because dates are always
stored as 4Byte Binary values.

Mit freundlichen Gruessen / Best regards

Birgitta

"Shoot for the moon, even if you miss, you'll land among the stars."
(Les Brown)

-----Ursprungliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]Im Auftrag von Tyler, Matt
Gesendet: Donnerstag, 23. Marz 2006 00:29
An: RPG programming on the AS400 / iSeries
Betreff: GLOBAL TEMPORARY TABLE issues


To all,



We have this process that uses the DECLARE GLOBAL TEMPORARY TABLE
statement to "model" a work file to QTEMP.  The work file is defined
with date fields, packed fields, keyed, etc.   In our program we have
referenced this work file on the F-spec with EXTFILE('QTEMP/WORKFILE')
and USROPN.  After running the SQL statement to create the temporary
table, open the work file in the program and get a record format level
check error (CPF4131).



I know of ways around this issue and I'm not necessarily looking for
other solutions like CRTDUPOBJ or using FETCH instead of native I/O.
Those are options which we are keeping in mind.  We just want to find
the reason this happens.



In the model file if I define a date field I get the level check error.
If I remove the date field or change its data type to something else I
do not receive the level check error.   We are wondering why is a file
created in QTEMP with DECLARE GLOBAL TEMPORARY TABLE and having date
fields would end up causing a level check issue?





Code links:

http://code.midrange.com/index.php?id=4f2d1b6615

http://code.midrange.com/index.php?id=915a0df534



Thanks, Matt



--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.