Calling an entry point Cobol source from an Easytrieve



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

Calling an entry point Cobol source from an Easytrieve

Postby Kiranth29 » Sat Jun 09, 2012 12:58 am

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
Kiranth29
 
Posts: 5
Joined: Thu May 24, 2012 9:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Calling an entry point Cobol source from an Easytrieve

Postby dick scherrer » Sat Jun 09, 2012 1:23 am

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?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Calling an entry point Cobol source from an Easytrieve

Postby BillyBoyo » Sat Jun 09, 2012 3:53 am

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Calling an entry point Cobol source from an Easytrieve

Postby Kiranth29 » Sat Jun 09, 2012 3:48 pm

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.
Kiranth29
 
Posts: 5
Joined: Thu May 24, 2012 9:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Calling an entry point Cobol source from an Easytrieve

Postby Kiranth29 » Sat Jun 09, 2012 3:51 pm

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.
Kiranth29
 
Posts: 5
Joined: Thu May 24, 2012 9:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Calling an entry point Cobol source from an Easytrieve

Postby dick scherrer » Sat Jun 09, 2012 8:19 pm

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 . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Calling an entry point Cobol source from an Easytrieve

Postby Kiranth29 » Sat Jun 09, 2012 10:08 pm

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.
Kiranth29
 
Posts: 5
Joined: Thu May 24, 2012 9:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Calling an entry point Cobol source from an Easytrieve

Postby dick scherrer » Sat Jun 09, 2012 10:12 pm

You're welcome - good luck :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Calling an entry point Cobol source from an Easytrieve

Postby BillyBoyo » Sun Jun 10, 2012 1:54 am

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post