Anyone did find out, how to call inside a copycode with variables another copycode with using the same variables of the first copycode as parameters for the second copycode?
Lets give an example:
CB_A of type copycode
&1& := &1& * 10 INCLUDE CB_B '&1&'
CB_B of type copycode
&1& := &1& + 1
PGM of type program
DEFINE DATA LOCAL 1 MYVALUE (N5) END-DEFINE MYVALUE := 5 INCLUDE CB_A 'MYVALUE' END
I will then get the following error message in the PGM at the INCLUDE:
- E_0890: Invalid source parameter construction. (source “CB_A” ln.6 col.14: “’&1&’” - &n& notation in insert value ‘&1&’ not allowed)
And in the Console I have:
[17:07:51.512] Stowing program ‘TEST/PGM’…failed
[17:07:51.512] error: NAT0890 Invalid source parameter construction.
So what to write there, that Natural complies and is handing downwards operands to other copycodes?
Or is there no solution to this, and it is not possible to handle operands inside of copycode chains, except coding them as text constants directly in the source?