I would like to place a thread lock around the code below but I'm not sure what the syntax would be in Visual COBOL. Can you help me with the syntax?
IF WS-COMM-FROM-PROGRAM > SPACES
PERFORM VARYING WS-PREV-PROG-ENTRY
FROM 1 BY 1 UNTIL WS-PREV-PROG-ENTRY > NAV-MAX-ENTRIES
IF NAV-PROGRAM-ID (WS-PREV-PROG-ENTRY) =
MOVE SPACES TO WS-COMM-FROM-PROGRAM