Assignment of the output tables
The output table OUTTAB
and possibly also ERRORTAB
must be assigned in the SQLScript source code, otherwise there will be syntax errors. This is also necessary if you do not want to perform error processing.
METHOD global_end BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT OPTIONS READ-ONLY.
OUTTAB = SELECT * FROM :INTAB;
ERRORTAB = SELECT '' AS ERROR_TEXT,
'' AS SQL__PROCEDURE__SOURCE__RECORD
FROM DUMMY WHERE DUMMY <> 'X';
ENDMETHOD.
This code corresponds to the initial code of the generated method of an end routine on a BWoH 7.50, although it has been formatted a little more attractively in the example.
- The table
OUTTAB
is filled 1:1 from the INTAB
.
- The table
ERRORTAB
obviously remains empty.
ERRORTAB = SELECT * FROM :ERRORTAB;