NAT0367 Invalid reference of Natural system function.

Hello all!

The following subprogram throws a NAT0367 during compilation. Why? I think this is valid syntax.

define data parameter
1 #parameter
  2 #a (A) dynamic by value optional
end-define
*
if #parameter.#a specified
and *LENGTH(#parameter.#a) > 0  /* NAT0367 here
  ignore
end-if
end

NAT6.2.3@Win

regards

Matthias

Hi Matthias,

The syntax is valid in my NAT 6.3.9.

Time for an upgrade? :wink:

Cheers,

Graeme

Under 6.3.7.0 it’s the first clause that’s the problem, although the second clause is indicated.

It works with

IF #A SPECIFIED

Of course, this is still a compiler bug.

OK, thank you for testing. Here at my company we’re still on 6.1.1 .But it’s planned to upgrade to 6.3.9 in December or January. At home I’m on 6.2.

So we got 7 “compiler bugs” to test, when we are on 6.3.

… this thread plus
http://tech.forums.softwareag.com/viewtopic.php?t=22518
http://tech.forums.softwareag.com/viewtopic.php?t=22414
http://tech.forums.softwareag.com/viewtopic.php?t=22279
http://tech.forums.softwareag.com/viewtopic.php?t=14136
http://tech.forums.softwareag.com/viewtopic.php?t=7059
… plus a module under solaris that causes a coredump

Here it is. This code causes a coredump at runtime on nat611@solaris.

define data local
01 #t    (T)     /* it works if you delete this line
01 #a24  (A24)
01 #b156 (B156)
01 #b20  (B20)
end-define
callnat 'USR4011N' 0 #b156 #a24 #b20
display #b20
end

Let’s see, if nat639@solaris does a better job.

NAT0367 works on 6.3.9 PL 0 @ Solaris. That USR4011N doesn’t. It’s still coredumping. I’ll open an empower incident for it…

Just a random thought …
Q) Have you tried passing the Function-code as an (I4) variable, rather than as a constant ?
eg. CALLNAT ‘USR4011N’ #I4 #B156 #A24 #B20

→ coredump

Answer from SAG: “This problem has been fixed and will be released in Natural 6.3.10.”