-
Definiere die Datei
a) innerhalb der Prozedur mit USROPN und mach immer einen Open/Close
b) definiere die Prozedur mit CONTAINS SQL, damit Dateizugriffe im selben Thread laufen
c) verwende am besten gleich SQL in der Prozedur
-
Vielen, vielen Dank!!! Das war der entscheidende Hinweis
-
 Zitat von Fuerchau
Definiere die Datei
a) innerhalb der Prozedur mit USROPN und mach immer einen Open/Close
b) definiere die Prozedur mit CONTAINS SQL, damit Dateizugriffe im selben Thread laufen
c) verwende am besten gleich SQL in der Prozedur
Wir haben hier eine RPGLE-Prozedur in der direkt SQL verwendet wird. Damit die Prozedur läuft mussten wir diese mit READS SQL DATA anstatt, wie von Ihnen empfohlen, mit CONTAINS SQL DATA definieren.
Laufen die Datenzugriffe mit READS SQL DATA ebenfalls im selben Thead wie der Aufrufer??? Denn dieses wollten wir ja mit CONTAINS SQL DATA erreichen. - Was auch funktionierte -
-
Contains SQL oder Reads SQL hat eigentlich nichts damit zu tun, ob die Anwendung im gleichen oder einem anderen Thread läuft.
Hier ist die Definition aus der aktuellen SQL Referenz:
READS SQL DATA
Specifies that the function can execute statements with a data access classification of READS SQL DATA, CONTAINS SQL, or NO SQL. The function cannot execute SQL statements that modify data.
CONTAINS SQL
Specifies that the function can execute only SQL statements with a data access classification of CONTAINS SQL or NO SQL. The function cannot execute any SQL statements that read or modify data.
Du solltest Dir stattdessen die Option FENCED/NOT FENCED anschauen:
Hier ebenfalls ein Auszug aus der aktuellen SQL Referenz:
FENCED or NOT FENCED
Specifies whether the SQL function runs in an environment that is isolated from the database manager environment. FENCED is the default.
FENCED
The function will run in a separate thread.
FENCED functions cannot keep SQL cursors open across individual calls to the function. However, the cursors in one thread are independent of the cursors in any other threads which reduces the possibility of cursor name conflicts.
NOT FENCED
The function may run in the same thread as the invoking SQL statement.
NOT FENCED functions can keep SQL cursors open across individual calls to the function. Since cursors can be kept open, the cursor position will also be preserved between calls to the function. However, cursor names may conflict since the UDF is now running in the same thread as the invoking SQL statement and other NOT FENCED UDFs.
NOT FENCED functions usually perform better than FENCED functions.
Birgitta
-
MODIFIES SQL DATA The function can execute any SQL statement except those statements that are not supported in any function.
Scheint wohl dann eher die richtige Definition zu sein.
Similar Threads
-
By MatthiasK in forum NEWSboard Programmierung
Antworten: 2
Letzter Beitrag: 08-02-07, 16:23
-
By Marsman in forum NEWSboard Programmierung
Antworten: 8
Letzter Beitrag: 27-09-06, 12:32
-
By KM in forum IBM i Hauptforum
Antworten: 2
Letzter Beitrag: 04-08-06, 10:34
-
By QSECOFR-1 in forum IBM i Hauptforum
Antworten: 1
Letzter Beitrag: 03-08-06, 18:06
-
By Bratmaxxe in forum NEWSboard Programmierung
Antworten: 4
Letzter Beitrag: 29-06-06, 10:29
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- You may not post attachments
- You may not edit your posts
-
Foren-Regeln
|
Erweiterte Foren Suche
Google Foren Suche
Forum & Artikel Update eMail
AS/400 / IBM i
Server Expert Gruppen
Unternehmens IT
|
Kategorien online Artikel
- Big Data, Analytics, BI, MIS
- Cloud, Social Media, Devices
- DMS, Archivierung, Druck
- ERP + Add-ons, Business Software
- Hochverfügbarkeit
- Human Resources, Personal
- IBM Announcements
- IT-Karikaturen
- Leitartikel
- Load`n`go
- Messen, Veranstaltungen
- NEWSolutions Dossiers
- Programmierung
- Security
- Software Development + Change Mgmt.
- Solutions & Provider
- Speicher – Storage
- Strategische Berichte
- Systemmanagement
- Tools, Hot-Tips
Auf dem Laufenden bleiben
|
Bookmarks