Hi,
perhaps i am working on a complex task...
my actual source is :
The following is my actual input.
*** *************************************************************** **
+*
*** THE FOLLOWING IS THE SAMPLE CODE **
+*
*** -------------------- **
+*
*** **
+*
*** **
+*
*** ALL COMMENTS,LINE COMMENTS AND LINE SPACES HAS TO BE REMOVED **
+*
*** **
+*
*** **
+*
*** **
+*
*** **
+*
*** *************************************************************** **
+*
+
+
BEGIN EQU *
+
L R1,0(R1) LOAD REGISTER R1 TO R1
+
CLI R3,0(,R1)
BNE R4,2(,R1)
LTR R3,R3 REGISTER R3 > 0?
+
@PUT FFILE,ADR=ZEILE MACRO
+
TKT100 DC x'0300' TG-ID
+
TKT300 DC X'000000' SYSTEMZEIT
+
JSKDAT DS XL4 DATUM FUER JAHRESSCHLUSSKURS
+
+
KURSDA DS XL4 KURS-DATUM 30.06.XXXX
my requirements are:
generate 3 files 1)variable file , 2)code file ,3)macro file
things has to be done:
1) in VARIABLE FILE:
in statement
"KURSDA DS XL4'1000' KURS-DATUM 30.06.XXXX "
i have to move the following values to the variable file...
vairable length datatype value description
+
KURSDA 4 X 1000 KURS-DATUM 30.06.XX
+XX
2)in CODE FILE:
here i have to modify the code:
1)remove line comments
2)remove "EQU *" from the code
3)append statement starting with BNE to the previous statement starting with CLI
4)all statements with DC,DS and EQU should be removed
the final output should look like:
BEGIN
+
L R1,0(R1)
CLI R3,0(,R1) BNE R4,2(,R1)
LTR R3,R3
@PUT FFILE,ADR=ZEILE
3)in MACRO FILE:
and L,CLI,BNE,LTR,DC,DS all are keywords... i need to capture all other than keywords and push to the variable file. foe example: "@PUT FFILE,ADR=ZEILE MACRO "
here @PUT is not a keyword. so that should be pushed to the variable file and the next argument under the column value and the 3rd argument"MACRO" under description..that is,it should look like,
vairable value description
@PUT FFILE,ADR=ZEILE MACRO