7000-020-LOOP-SOURCE. * ......setup for space check before and after data.... MOVE START-POS TO VARIABLE-START-POS. SUBTRACT +1 FROM VARIABLE-START-POS. COMPUTE VARIABLE-END-POS = VARIABLE-START-POS + LENGTH-OF-LABEL + 1. IF SOURCE-DATA(START-POS:LENGTH-OF-LABEL) = ARG-LABEL(AT1-SUB), (1:LENGTH-OF-LABEL) AND SOURCE-DATA(VARIABLE-START-POS:1) = '.' MOVE SPACE TO SOURCE-DATA(VARIABLE-START-POS:1) END-IF IF SOURCE-DATA(START-POS:LENGTH-OF-LABEL) = ARG-LABEL(AT1-SUB), (1:LENGTH-OF-LABEL) AND SOURCE-DATA(VARIABLE-START-POS:1) = SPACES AND SOURCE-DATA(VARIABLE-END-POS:1) = SPACES MOVE SOURCE-NAME TO IMP-MODULE-NAME MOVE SOURCE-DATA(START-POS:LENGTH-OF-LABEL) TO IMP-MODULE-COMP, GENERIC-DESC-HOLD-AREA MOVE ARG-PROJECT(AT1-SUB) TO IMP-MODULE-PROJECT MOVE ARG-TYPE(AT1-SUB) TO IMP-MODULE-TYPE PERFORM VARYING TT-SUB FROM +1 BY +1 UNTIL TT-SUB > GENERIC-DESC-VIRTUAL-AT-END IF GENERIC-DESC-NAME(TT-SUB) = GENERIC-DESC-HOLD-AREA MOVE GENERIC-DESC-DESC(TT-SUB) TO IMP-MODULE-COMP-DESC PERFORM 7000-030-CHECK-ON-MODEL THRU 7000-030-EXIT END-IF END-PERFORM PERFORM 9000-EDIT-IMP THRU 9000-EXIT ADD +1 TO HIT-COUNT WRITE IMP-RECORD MOVE SPACES TO IMP-RECORD ADD +1 TO START-POS * MOVE 'F' TO FOUND-SW * MOVE +72 TO START-POS ELSE ADD +1 TO START-POS. 7000-020-EXIT. EXIT.
Hide code
Visustin flow chart for COBOL