I've got Micro Focus Visual COBOL for Visual Studio 2010. While working on a program, I accidentally compiled it while it had a stand-alone (incomplete) PERFORM command. I was surprised to see that it didn't generate a compile error.
Is that an oversight in the compile logic, or does a stand-alone PERFORM actually do something?
Here's the code I accidentally compiled:
* Here's where we select our sample
IF NOT (M-SEX-CODE = 'F' OR 'M')
GO TO 2000-ENTRY.
****************************************************************
* Go create your user-selected numeric variable INM-NUMVAR
****************************************************************
PERFORM
****************************************************************
* Define the user-selected numeric variable INM-NUMVAR
* It may be a straight numeric variable from T-M (e.g., LOS DAYS)
* or a modified numeric variable (sent-length, 45-yrs life/death)
* or it may be a binary 0-1 (no-yes) var (pct burglars? no-yes)
*****************************************************************
* MOVE M-SERV-DAYS-PRSN-JAIL TO INM-NUMVAR.
MOVE M-SENT-LENGTH-DAYS TO INM-NUMVAR.