Page 1 of 1

Calling an entry point Cobol source from an Easytrieve

PostPosted: Sat Jun 09, 2012 12:58 am
by Kiranth29
Hi,

I want to call an entry point cobol source from an Ezt. I have specified the load of the Cobol (which contains the entry point) in the steplib. It is throwing me an error saying that load is not present. The CALL statement I've used looks like this: CALL LOADTB USING LS-VARIABLE where LOADTB is an entry point.

Could someone assist me on this.

Thanks in advance.

Regards,
Kiran

Re: Calling an entry point Cobol source from an Easytrieve

PostPosted: Sat Jun 09, 2012 1:23 am
by dick scherrer
Hello and welcome to the forum,

If the load module is not found, it is either misspelled or the step is not looking in the proper loadlib.

What library contains the load module?

Where is this named in your jcl?

Re: Calling an entry point Cobol source from an Easytrieve

PostPosted: Sat Jun 09, 2012 3:53 am
by BillyBoyo
The Program-ID is an entry-point. You can specify an ENTRY statement in a Cobol program. Is that what you have done? Why?

If you want to call the ENTRY-point, you will have to make an ALIAS associating the name to the loadmodule. You do this with the linkeditor/binder.

Easytrieve always does a dynamic load, so it has to find something with the name that is called.

Re: Calling an entry point Cobol source from an Easytrieve

PostPosted: Sat Jun 09, 2012 3:48 pm
by Kiranth29
Hi Billy,

Yes, the ENTRY statement is specified in a Cobol program. Its an existing Cobol so I want to use the same. The Cobol name is ABCD but the ENTRY statement is LOADTB as I specified above.

If I understood your second statement correctly, are you saying to linkedit the Cobol ABCD with alias name of LOADTB because I'm using LOADTB in the Call statement in the Ezt ? Please confirm me if my understanding is correct. Thanks for your assistance.

Re: Calling an entry point Cobol source from an Easytrieve

PostPosted: Sat Jun 09, 2012 3:51 pm
by Kiranth29
Hi Dick,

The loadlib is specified in the STEPLIB of the JCL. Moreover the load name is same as the Cobol source name. But I'm specifying the Entry point name in the Ezt, so something is going wrong while calling the Entry point in the Cobol. Please advise me to come out of this problem. Thanks.

Re: Calling an entry point Cobol source from an Easytrieve

PostPosted: Sat Jun 09, 2012 8:19 pm
by dick scherrer
Hello,

BillyB has already explained how to get around your "missing module". Until there is a matching name in the loadlib, the call will fail.

My clients have all done away with COBOL code that has multiple entry points . . .

Re: Calling an entry point Cobol source from an Easytrieve

PostPosted: Sat Jun 09, 2012 10:08 pm
by Kiranth29
Hello Dick,

I will give a try by renaming the load by the Entry point name and I will try to call the same from the Ezt. Will keep you posted about it. Thanks again.

Re: Calling an entry point Cobol source from an Easytrieve

PostPosted: Sat Jun 09, 2012 10:12 pm
by dick scherrer
You're welcome - good luck :)

d

Re: Calling an entry point Cobol source from an Easytrieve

PostPosted: Sun Jun 10, 2012 1:54 am
by BillyBoyo
If you just do that, it's going to use the main entry point, not the alternate one.

Your best move is as Dick has suggested, get rid of the entry point and have it as a seperate module or the same module with control-information passed to it to decide what processing to do.

If that is not possible, your second best is the ALIAS remembering to specify the ENTRY you want.

Also bear in mind next time the main loadmodule is relinked, you have to redo the ALIAS.