Page 1 of 1

How to call LANSA recursively

Posted: Tue Oct 03, 2017 7:28 pm
by kevinbarber
Hello

I am currently experiencing a problem where LANSA is being called recursively and falling over.

I have a JDE program where the RPG has been modified to call a LANSA program to do some validation.
This has been working fine for years.

However, I now want to call the JDE program from another LANSA program, however, when the original LANSA program gets called it falls over.
(see job log and program dumps attached)

Please could you advise how this can be solved/worked around?

Regards
Kevin

Re: How to call LANSA recursively

Posted: Wed Oct 04, 2017 3:05 pm
by atostaine
did you see decimal data error?

Re: How to call LANSA recursively

Posted: Wed Oct 04, 2017 9:55 pm
by kevinbarber
Hello

Yes I did see that, although I thought it might be a side effect of the main "recursive" error.

Regards
Kevin

Re: How to call LANSA recursively

Posted: Thu Oct 05, 2017 6:34 am
by atostaine
There is probably something going on with activation groups or? JDE probably does a lot of interesting stuff there.

The new LANSA program calls JDE, then JDE tries to call LANSA but the Lansa environment is still in the call stack. Are you calling LANSA with the LANSA command? You might have to try and figure out how to call the LANSA function direct.

Art