COBOL2002 言語 拡張仕様編
IDENTIFICATION DIVISION . PROGRAM-ID. MAINPROG. ENVIRONMENT DIVISION. CONFIGURATION SECTION. SPECIAL-NAMES. DYNAMIC LENGTH STRUCTURE C-STRING IS C-STATIC-STRUCTURE . DATA DIVISION. WORKING-STORAGE SECTION. 01 DYNADATA PIC X DYNAMIC LENGTH C-STRING LIMIT 30 . PROCEDURE DIVISION . MOVE 'abcde' TO DYNADATA. *> DYNADATAには'abcde'+終端文字(X'00')が格納される CALL 'SUBPROG' USING DYNADATA.
IDENTIFICATION DIVISION . PROGRAM-ID. SUBPROG. ENVIRONMENT DIVISION. CONFIGURATION SECTION. SPECIAL-NAMES. DYNAMIC LENGTH STRUCTURE C-STRING IS C-STATIC-STRUCTURE . DATA DIVISION. LINKAGE SECTION. 01 DYNADATA2 PIC X DYNAMIC LENGTH C-STRING LIMIT 30 . PROCEDURE DIVISION USING DYNADATA2 . DISPLAY DYNADATA2. *> 'abcde'を表示する
All Rights Reserved. Copyright (C) 2003, 2013, Hitachi, Ltd.