COBOL集団項目の要素が配列型の場合、Javaプログラム側からは配列として参照されます。
アプリケーション情報入力ファイル
<apfw-app> … <operation name="SAMPLE12"> <parameter direction="IN">WORK-TIME</parameter> <parameter direction="OUT">RESULT-CODE</parameter> </operation> … </apfw-app> |
COBOL登録集
01 WORK-TIME. 02 WORK-OF-DAY OCCURS 365. 03 TIME-DATA PIC X(8) OCCURS 2. 01 RESULT-CODE PIC S9(9) COMP-5. |
クラスに対応するJavaソース
// WORK_OF_DAY.java public class WORK_OF_DAY { public java.lang.String[] time_data; public WORK_OF_DAY () {} public WORK_OF_DAY (String [] time_data) { this. time_data = time_data; } } // WORK_TIME.java public class WORK_TIME { public WORK_OF_DAY [] work_of_day; public WORK_TIME () {} public WORK_TIME (WORK_OF_DAY [] work_of_day) { this. work_of_day = work_of_day; } } |
生成されるbean
// SAMPLE12Bean.java public class SAMPLE12Bean implements com.fujitsu.interstage.apfw.bean.ApfwBean { private int apfw_result; private WORK_TIME work_time; private int result_code; public SAMPLE12Bean() {} public void setApfw_result(int apfw_result) { this.apfw_result = apfw_result; } public int getApfw_result() { return this.apfw_result; } public void setWork_time(WORK_TIME work_time) { this.work_time = work_time; } public WORK_TIME getWork_time() { return this.work_time; } public void setResult_code(int result_code) { this.result_code = result_code; } public int getResult_code() { return this.result_code; } } |