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
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
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