H DFTNAME(RUNSQLCMD) DATEDIT(*YMD/) F********** RUN SQL COMMAND ************************************** FSTR5000 IF E DISK USROPN F***************************************************************** D MSGID DS D SQL 1 3 D SQLCD 3 7 0 D SPCBIN DS D CMPBIN 1 4B 0 D CMPCHR 1 4 +C*----------------------------------------------------+ C* パラーメータの受取り C*----------------------------------------------------+ C *ENTRY PLIST | C PARM STRING | C PARM MSGID | C PARM MSGDTA 80 | C PARM RESULT 4 | C*----------------------------------------------------+ C/EXEC SQL WHENEVER SQLERROR GO TO ERROR C/END-EXEC C/EXEC SQL C+ EXECUTE IMMEDIATE :STRING C/END-EXEC C* C Z-ADD SQLER6 CMPBIN C MOVE CMPCHR MSGID C MOVE 'SQL' SQL C MOVEL SQLERM MSGDTA C MOVE 'CMOK' RESULT C GOTO END C ERROR TAG C Z-SUB SQLCOD SQLCD C MOVE 'SQL' SQL C MOVEL SQLERM MSGDTA C MOVE 'ERR_' RESULT C END TAG C SETON LR C RETURN C****************************************************** C *INZSR BEGSR C****************************************************** C* 初期 CYCLE のみの実行 CSR GOTO INZEND CSR OPEN STR5000 99 CSR READ STR5000 50 CSR CLOSE STR5000 99 CSR INZEND ENDSR