2.4.1.12.5 Examples

In the first example, the SQL directives are in the in-stream SYSIN file, the results will be stored in the SYSREC00 file.

m_FileAssign -d ,CATLG SYSREC00 ${DATA}/FBACKE.LST.CUMUL
m_FileAssign -i SYSIN
SELECT * FROM PJ01DB2.TABTEST2;
_end
m_ExecSQL -o SYSREC00

In the second example, the SQL directives are the file TOW132C.sysin and the results will be printed.

m_OutputAssign -c “*” SYSPRINT 
m_FileAssign -d SHR SYSIN ${SYSIN}/SYSIN/TOW132C.sysin 
m_ExecSQL

Note:

The DB2 commands are not translated. The user has to verify these commands according to the target data base software.