[Migrated content. Thread originally posted on 17 February 2003]
Hello,I would like to combine all my business logic for a module into a single program. There are two ways to do that:
1. a 'what to do' code with each call.
2. entry points.
Either will do, but I perfer entry points. The big advantage with them is that you can tailor paramater passing to each type of call.
In AcuCobol, you get to call entry points of a program if that program is loaded in memory. This is my problem.
How do you specify in the linkage section which entry point gets which parameters? I would the default entry point to have 0 parameters so I can call the program and load it up, allowing access to the alternate entry points. When I try to do this I get linkage runtime errors.
My code looks like
LINKAGE SECTION.
01 P1 unsigned-int.
01 P2 unsigned-int.
01 P2 unsigned-int.
PROCEDURE DIVISION. |
main.
*default initialization routines here.
goback.
entry "a" using P1.
* do stuff.
goback.
entry "B" using P2, P3.
* do stuff
goback.
I can't call my proram or run it from the debugger: i always get linkage errors. Is there any way to do this? Why does my linkage require every parameter to be called with every entry point? This negates the use of entry points.
As an aside: does AcuCobol support the cobol 85 construct of nested subprograms? (multiple identification divisions in a single program?) This is a nice feature of cobol 85, with local variables and such. I can't get nested programs to compile.
Merlin
