StatementListMarker inserted - Hello Work example in Micro Focus COBOL Fundamentals course

I am taking the Micro Focus COBOL Fundamentals course (https://www.microfocus.com/en-us/cobol). I have installed the "Learn COBOL" extension into my pre-existing Visual Studio Code installation (using the extensions menu).

Following the video instructions I have created a file called "Hello World.cbl" and typed in the COBOL code suggested. My program runs fine, but it does show an error as shown in the screenshot below.

This suggests to me that something about my Visual Studio Setup is not correct. I had to add .cbl as a file extension because it did complain about that. So I assume there is also something else not correctly applied from the Micro Focus extension installation.

The video at this part of the course suggests that we write this Hello World program to check that our environment is correctly set up, but then it does not provide any assistance in getting it correctly setup if it is not. We were directed to come here with any questions, so I hope this is the correct place to ask this question.

Amazingly Google knows nothing of "StatementListMarker" so I have no hints at all.

Cheers,
Morag

  • 0  

    Hi Morag,

    Do you have any other Visual Studio Code extensions installed besides the Learn COBOL and Micro Focus COBOL extensions? If so, try disabling them temporarily to see if the error disappears.

  • 0 in reply to   

    I do actually, that's why I already had a pre-existing Visual Studio Code installation. I had the IBM Z Open Editor and the Zowe Explorer. I have disabled them both and restarted VSC and the error disappears.

    So, now is there a way to stop them interfering with each other without having to disable them?

    Cheers,
    Morag

  • 0   in reply to 

    There is not a way to prevent them from interfering. Although in this case I don't think there is any interference per se, I think you would get this issue if you did not have our extension installed. I suggest you contact the developers of IBM Z Open Editor, Zowe Explorer regarding this problem, as one of those extensions is what is generating the error.

  • 0 in reply to   

    I use the word "interference" because I am not trying to use the problematic extension at the moment, I am trying to use the Learn COBOL extension and some other extension is somehow (I don't pretend to understand how) getting in the way. 

    The description of the IBM Z Open Editor includes "Provides COBOL .... language servers" so I can imagine that it has a different view of what COBOL should look like than the Micro Focus view and that is likely the result of the error.

    I see that VSC has the concept of "Workspaces" - I see this because there is the choice to disable an extension globally and also to disable an extension for a workspace. Can I run the Learn COBOL extension in a workspace and thus make that workspace different to other extensions?

    Sorry if I am not using the correct terminology. Both my uses of VSC are from education resources. I know not how to use VSC apart from the instructions provided in said education resources which in both cases seem to be sparse, presumably because most of the time its the student's (i.e. me) only need for VSC. That said, there are a HUGE number of extensions in VSC now, that start with the word "Learn", so perhaps that assumption can no longer be made.

    If you're not a VSC expert, I apologise for bugging you further after you have given me an answer that is a valid work-around and I will tick it. If you do know about VSC enough to answer my question about workspaces I would be grateful to learn from your experience.

    Cheers,
    Morag

  • 0   in reply to 

    I see that VSC has the concept of "Workspaces" - I see this because there is the choice to disable an extension globally and also to disable an extension for a workspace. Can I run the Learn COBOL extension in a workspace and thus make that workspace different to other extensions?

    Yes, you can enable / disable extensions for a specific workspace. To do that, click the gear icon next to the extension you want to disable for your workspace and click "Disable (Workspace)". This way you can have a workspace specifically for Micro Focus COBOL where only the Micro Focus COBOL extensions are enabled.