H DFTNAME(UPD0051) DATEDIT(*YMD/) F******** 商品マスターの登録 *************************** F***************************************************************** D DSPHEAD_ PR 4A D SHCODE 10A VALUE D DSPDTA01_ PR 4A D SHCODE 10A VALUE D ENDOPT_ PR 4A D UPD_SHOHIN PR 1S 0 D OPT 1S 0 VALUE D INDATA 1024A VALUE D SHCODE S 10A IMPORT D INDATA S 1024A IMPORT D ANS S 1A IMPORT D ADDREC S 5S 0 IMPORT D CHGREC S 5S 0 IMPORT D DLTREC S 5S 0 IMPORT D FKEY S 4A D CF03 S 4A INZ('CF03') D CF10 S 4A INZ('CF10') D CF12 S 4A INZ('CF12') D CF23 S 4A INZ('CF23') D ADD S 1S 0 INZ(1) SAVE-データ D CHG S 1S 0 INZ(2) SAVE-データ D DLT S 1S 0 INZ(3) SAVE-データ D UPD S 1S 0 INZ(4) SAVE-データ D RES S 1S 0 SAVE-データ C*----------------------------------------------------+ C START TAG | C EVAL FKEY = DSPHEAD_(SHCODE) | C*----------------------------------------------------+ C SETOFF 919299 C*( CF03 )- 終了 C FKEY IFEQ CF03 C SETON LR C LR EXSR LRRTN C LR RETURN C GOTO START C END C*----------------------------------------------------+ C DSPLY TAG | C EVAL FKEY = DSPDTA01_(SHCODE) | C*----------------------------------------------------+ C SETOFF 919299 C*( CF03 )- 終了 C FKEY IFEQ CF03 C SETON LR C LR EXSR LRRTN C LR RETURN C GOTO DSPLY C END C*-( CF12 )- 前画面 C FKEY IFEQ CF12 C GOTO START C END C* ( 入力内容のチェック ) C EXSR CHECK C 99 GOTO DSPLY C*-( CF10 ) 更新 C FKEY IFEQ CF10 C EVAL RES = UPD_SHOHIN(UPD:INDATA) C IF RES = ADD C EVAL ADDREC = ADDREC + 1 C ELSE C IF RES = CHG C EVAL CHGREC = CHGREC + 1 C END C END C GOTO START C END C*-( CF23 ) 削除 C FKEY IFEQ CF23 C EVAL RES = UPD_SHOHIN(DLT:INDATA) C IF RES = DLT C EVAL DLTREC = DLTREC + 1 C END C GOTO START C END C*-( 実行キー ) C GOTO DSPLY C****************************************************** C CHECK BEGSR C****************************************************** C ENDCHK ENDSR C****************************************************** C LRRTN BEGSR C****************************************************** C MOVE 'Y' ANS C*----------------------------------------------------+ C DSPEND TAG | C EVAL FKEY = ENDOPT_ | C*----------------------------------------------------+ C*( CF03 )- 終了 C FKEY IFEQ CF03 C RETURN C END ENDRTN C*-( CF12 )- 前画面 C FKEY IFEQ CF12 C SETOFF LR C END ENDRTN C*-( 実行キー ) C RETURN C ENDSR