C*EXEC SQL
C* declare FAKTURS1cursorPack cursor for
C* select * from FAKTURS1 join AUKOPF on FAABNR = AKBELE
C* where FASTAT = 5 and FALSNR = :FAKTUDUR_LSNr
C* and AKBKZ = :FAKTUDUR_BKz and AKCOU = :FAKTUDUR_Couz
C* and AKFRB = :FAKTUDUR_Funr and AKMRB = :FAKTUDUR_Musr
C* and AKSRB = :FAKTUDUR_Star and AKVAL = :FAKTUDUR_Valu
C* order by FAPACK
C*END-EXEC

C*EXEC SQL
C* OPEN FAKTURS1cursorPack
C*END-EXEC

C*EXEC SQL
C* fetch next from FAKTURS1cursorPack into :FAKTURS1sql :SqlAnzeiger1,
C* :AUKOPFsql :SqlAnzeiger2
C*END-EXEC

Das Zielfeld ist eine Datenstruktur im Aufbau des Datensatzes.