Skip to main content

When adding a short sleep to a test program I made a simple syntax error.

Visual Cobol compiles with no error but Server Express flags an error.

Question is if the Visual Cobol compiler is smart or just confused?

identification division.
program-id. demo1.

environment division.
configuration section.

data division.
working-storage section.

procedure division.
   call "sleep" using by value 5 size 4
   on exception
      display "first sleep failed"
         upon syserr
   end-call

   call "sleep" using by value 5 length 4
   on exception
      display "second sleep failed"
         upon syserr
   end-call
   goback.

end program demo1.

As explained, compiles in Visual Cobol, throws this error in Server Express

17 call "sleep" using by value 5 length 4
* 13-S****************************************** **
** User-name required
21 end-call
* 564-S************ **
** A scope-delimiter did not have a matching verb and was discarded.

Since it's very low impact, a support case feels excessive.

Enjoy,

Robert

When adding a short sleep to a test program I made a simple syntax error.

Visual Cobol compiles with no error but Server Express flags an error.

Question is if the Visual Cobol compiler is smart or just confused?

identification division.
program-id. demo1.

environment division.
configuration section.

data division.
working-storage section.

procedure division.
   call "sleep" using by value 5 size 4
   on exception
      display "first sleep failed"
         upon syserr
   end-call

   call "sleep" using by value 5 length 4
   on exception
      display "second sleep failed"
         upon syserr
   end-call
   goback.

end program demo1.

As explained, compiles in Visual Cobol, throws this error in Server Express

17 call "sleep" using by value 5 length 4
* 13-S****************************************** **
** User-name required
21 end-call
* 564-S************ **
** A scope-delimiter did not have a matching verb and was discarded.

Since it's very low impact, a support case feels excessive.

Enjoy,

Robert

According to the syntax diagram in the Language Reference guide this is a bug in Visual COBOL and should be reported to Micro Focus Customer Care so that we can have it fixed.

The BY VALUE clause with LENGTH specified should only be allowed when you are specifying an identifier after it. It should not be interchangable with SIZE which is used when a literal is passed.

Server Express handled this correctly.


According to the syntax diagram in the Language Reference guide this is a bug in Visual COBOL and should be reported to Micro Focus Customer Care so that we can have it fixed.

The BY VALUE clause with LENGTH specified should only be allowed when you are specifying an identifier after it. It should not be interchangable with SIZE which is used when a literal is passed.

Server Express handled this correctly.

OK, I suspected as much. Having just closed a high impact support case I guess adding a low impact one won't cause me much effort on my side. I'll create an incident for this.

/Robert