Where is Using Natural manual

I’m trying to learn more about variable names. I recall seeing somewhere that variables starting with a $ is something like a system variable. Is that true? Several manuals say, “See also Naming Conventions for User-Defined Variables in Using Natural.” buy https://documentation.softwareag.com/ doesn’t show any manual named “Using Natural.” What manual talks about Naming Conventions and where is it?

Hi Lee,

Please refer to the below-provided documentation link.

Rules and Naming Conventions (softwareag.com)

Regards,
Ranjith

What the doc that Ranjith referred to does not mention is that many installations still use the variable naming convention like:

  1. Prefixing user variables with “#” (hash) - in many non-english countries this may instead be $,£ or in Danish Æ, i.e.
    1 #IDX (I4)

  2. Additionally Global variables will often have a G as a prefix as well i.e.
    1 #G-THIS-IS- A-GLOBAL (A1)

  3. As opposed to fields in views from the database, i.e.
    1 CUSTOMER VIEW OF CUSTOMER
    2 CUSTOMER-NUMBER

As I have understood it, this convention was made both for clarity but also for optimizing the compiler, so #variables would not require a look-up in the DDMs.

Finn

1 Like

Yes. This goes back to NATURAL V1 where there were no DEFINE DATAs, only pure REPORT mode where User Defined variables began with “#” to differentiate from Data base variables. Also note Global variables came in and had to begin with “+”. This was loosely followed when V2 came in with GDA’s. Then reinforced with re-invention of AIV’s (which essentially are Global Variable re-incarnated).

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.