Extract lines of code



IBM's Command List programming language & Restructured Extended Executor

Re: Extract lines of code

Postby Pedro » Fri Nov 16, 2018 12:44 am

I am not that familiar with Cobol syntax... but it seems that your example is missing some separators and delimiters. That is, should it have some commas and maybe a semicolon? My advice would be more complete of the example was also more complete.

After you find the REDEFINES, I think you should search for the prior ' 01 ' and search for the delimiter character that follows REDEFINES.

When I have done such searching, I have made a copy of the data, then blanked out quoted strings and comments. Also, names of objects pose a problem. You want avoid processing your search text that occurs out-of-context, for example:
01 MYREDEFINES PIC X(10)


Make a copy, process the copy, then map that to the original file to extract the lines needed. Yeah, it is non-trivial.
Pedro Vera
User avatar
Pedro
 
Posts: 592
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 43 times

Re: Re: Extract lines of code

 

Previous

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post