Natural error NAT0384 Explicit format specification required

Hi

I am trying to stow a program . i am getting the below error

NAT0384 Explicit format specification required.

From the explanation of the NAT error i got to know that ,

The FS parameter has been set with a SET GLOBALS statement or GLOBALS
command to indicate that no default format/length is to be used.
Therefore the format/length of all user-defined variables must be
explicitly specified.

So can you please tell me how can i get rid of this error.

Hi

Even i have checked the FS parameter of globals .It is ON.

Hi Ramya,

This is an error you can get in non-structured mode (reporting mode) Natural.

A little history: under Natural v1.2 which was what I first learned Natural on, when you didn’t explicitly define a variable, it’s default format & length upon first use was (N7).

Fast forward to today - if you have Natural in reporting mode and have GLOBALS FS=OFF, you can get away with the same old default format & length without defining the variable explicitly:

RESET #I(P10)
*
#J := 10
*
FOR #I = 1 TO #J
WRITE #I
LOOP
END

In the example above, #J takes the default of N7.

Your Natural admin, for good reason, does not permit this to occur. With GLOBALS FS=ON, you MUST explicitly define your variable… it will not assume a default… else you will get the error you are reporting here.

One thing could be happening if you aren’t aware you have any undeclared variables… perhaps your reference on the line with the error is a mis-spelling of one of your defined variables?

As a best practice, you should be using structured mode and defining all your variables in the DEFINE DATA block, but I understand that this is not always possible with old code written in “reporting mode” language, or version 1.1 or 1.2.

Please check the spelling of your variable name where this error is occurring, and make sure it is defined upon first use with the actual format & length.