Friends,
Could you please help me in writing a code snippet of the below requirement:
The COBOL program need to read an Input file ( Input file contains a COBOL program) and output file should write the following
Program_id Copybook/ DCLGEN
For Example :
INPUT FILE CONTAINS :
IDENTIFICATION DIVISION.
PROGRAM ID. SAMPLE01.
---------------------
--------------
COPY <XYZ123>
COPY <ABC123>
--------
----
EXEC SQL
INCLUDE <PQRST>
END-SQL
---------
-------
OUTPUT SHOULD BE
OUTPUT
PROGRAM-ID COPYBOOK
SAMPLE01 XYZ123
SAMPLE01 ABC123
SAMPLE01 PQRST
Please advice.