How to swtich from Reporting mode to Structure Mode?

Hello All,
I wrote a IF condition in my code and ended it with “END-IF” statement. But I received following error:
NAT0610 This statement is not permitted in reporting mode.

Please let me know how to switch to structure mode, so that I could run the IF statement.

Best Regards,
Jolly.

I have figured out that we need to write the following command to go to Structure mode:

GLOBALS SM = ON

But where in the code do I need to write it?

If someone could share a code snippet to display this statement?

Regards,
Jolly.

On PC Natural, there is an icon which allows you to toggle back and forth between Report and Structured Modes.

On a mainframe, you can type your SET GLOBALS at a NEXT prompt, or the command line.

I tried to find the option on PC to change the programming mode, but I could not find it. Could you please attach an image showing the symbol location or mention the path under which I could find that option?

Set Structured Mode with the command

GLOBALS SM=T

You may not leave spaces around the equal sign.

Set Reporting Mode with the command

GLOBALS SM=F

Natural commands are entered in the Command prompt found at the bottom left of Natural Studio (the development environment within Natural for Windows).

If you don’t have a Command prompt, press Alt+3 or press View on the menu bar and then check Command Line.

To find the structured mode icon (SM on/off), press View on the menu bar, then Toolbars, then Compiler Options. The SM icon should be the first on the left.