引数の説明
関数名 |
引数 |
例
000001 IDENTIFICATION DIVISION. 000002 PROGRAM-ID. C3492. 000003 ENVIRONMENT DIVISION. 000004 CONFIGURATION SECTION. 000005 REPOSITORY. 000006 ENUM ENUM-A AS "MyENUM.ENUMA". 000007 DATA DIVISION. 000008 WORKING-STORAGE SECTION. 000009 01 DATA1 PIC S9(4) COMP-5. 000010 01 OBJA OBJECT REFERENCE ENUM-A. 000011 PROCEDURE DIVISION. 000012 SET OBJA TO FUNCTION ENUM-OR ( ValueA OF ENUM-A DATA1). 000013 END PROGRAM C3492.
000001 IDENTIFICATION DIVISION. 000002 ENUM-ID. ENUM-A AS "MyENUM.ENUMA" INHERITS INT32. 000003 ENVIRONMENT DIVISION. 000004 CONFIGURATION SECTION. 000005 REPOSITORY. 000006 CLASS INT32 AS "System.Int32". 000007 DATA DIVISION. 000008 WORKING-STORAGE SECTION. 000009 01 ValueA VALUE AUTO. 000010 01 ValueB VALUE AUTO. 000011 01 ValueC VALUE AUTO. 000012 01 ValueD VALUE AUTO. 000013 END ENUM ENUM-A.
C3492.cob (12) : JMN3492I-S FUNCTION ENUM-ORの引数である'DATA1'は,ENUM型を参照するオブジェクト参照一意名,またはENUMフィールドでなければなりません.