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

In reply to Re^2: please help me to resolve the Line comments and appending issue by suno
in thread please help me to resolve the Line comments and appending issue by suno

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.