On Nov 16, 9:57 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > len wrote: > > if fieldline.count('COMP.') > 0: > > I take it you're only handling a particular subset of COBOL constructs: thus, > "COMP" is never "COMPUTATIONAL" or "USAGE IS COMPUTATIONAL", and it always > occurs just before the full-stop (can't remember enough COBOL syntax to be > sure if anything else can go afterwards). > > > elif newline[0].isdigit() and 'PIC' in newline: > > Similarly, "PIC" is never "PICTURE" or "PICTURE IS". > > Aargh, I think I have to stop. I'm remembering more than I ever wanted to > about COBOL. Must ... rip ... brain ... out ...
Most of the cobol code originally comes from packages and is relatively consistant. Thanks Len -- http://mail.python.org/mailman/listinfo/python-list