Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to call OO cobol from legacy cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
namitjai

New User


Joined: 12 Feb 2008
Posts: 41
Location: Bangalore

PostPosted: Thu Feb 12, 2009 5:18 pm    Post subject:
Reply with quote

Hi,

I am able to call Java methods from OO cobol program. But I am not able to get hold of the way in order to call OO cobol program from procedural cobol program(legacy cobol program). Can anybody please help me over this.

Thanks,
NAMIT JAIN
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Feb 12, 2009 9:17 pm    Post subject:
Reply with quote

Hello,

What have you tried? What happened?

Is there a problem with compiling, link editing, or run-time?

If you explain where things are going wrong, someone may be able to offer a suggestion.

For starters, i'd be tempted to write the famous "hello world" program in OO cobol and invoke it from some procedural stub (the only thing the stub would do is disply that it was calling the "hello world" module and another display saying it had successfully returned from the "hello world" module). The "output" would be only the 3 display statements. Once this is working, expand to the real requirement.
Back to top
View user's profile Send private message
namitjai

New User


Joined: 12 Feb 2008
Posts: 41
Location: Bangalore

PostPosted: Fri Feb 13, 2009 11:56 am    Post subject:
Reply with quote

I am able to invoke "Hello world" program from my OO cobol program ,but I want to invoke that OO cobol program from a procedural OO cobol program(My requirement is to create a OO cobol wrapper which can be invoked from the legacy cobol applications(procedural cobol programs). This is to enable interaction between Legacy cobol application and Java programs) Now when I am trying to link edit the Sample procedural cobol program I am getting error as :

IEW2456E 9207 SYMBOL GetJVMPtr UNRESOLVED. MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.
IEW2456E 9207 SYMBOL GetEnvPtr UNRESOLVED. MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.
IEW2456E 9207 SYMBOL GetClassObject UNRESOLVED. MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.


Can you please tell me what mistake I am probably making.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Feb 13, 2009 12:05 pm    Post subject:
Reply with quote

Hello,

Suggest you work with your system support people. It sounds like one or more load libraries are not available to your process.

You may need new inclusions in the compile/link jcl as well as the execute jcl.

Your support people should be able to tell you where the needed modules reside and incorporate them into the standard comp;ile/link jcl.

Good luck icon_smile.gif
Back to top
View user's profile Send private message
namitjai

New User


Joined: 12 Feb 2008
Posts: 41
Location: Bangalore

PostPosted: Fri Feb 13, 2009 12:15 pm    Post subject:
Reply with quote

I am including given below two libraries in my link edit part of OO cobol program(OOSAMP) :
INCLUDE '/usr/lpp/java/J1.4/bin/classic/libjvm.x'
INCLUDE '/usr/lpp/cobol/lib/igzcjava.x'


and its working fine as I checked its connectivity with the JAVA methods which are residing in USS. But its giving me the error(Which I mentioned in above post) in the link edit part of sample legacy cobol program(BCHDRVR) in which I am making a static call to the OOSAMP from BCHDRVR. I included these two files in the link edit step of BCHDRVR also.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri Feb 13, 2009 12:59 pm    Post subject:
Reply with quote

namitjai,
why are you making the non-oo to oo CALL static?
Back to top
View user's profile Send private message
namitjai

New User


Joined: 12 Feb 2008
Posts: 41
Location: Bangalore

PostPosted: Fri Feb 13, 2009 1:03 pm    Post subject:
Reply with quote

Because My OO cobol is a dll and My non-oo cobol is a nondll and according to a document we can make call from a non-dll to a dll by:

Put the COBOL DLL programs that you want to call from the COBOL non-DLL programs in the load module that contains the main program. Use static calls from the COBOL non-DLL programs to call the COBOL DLL programs.

The COBOL DLL programs in the load module that contains the main program can call COBOL DLL programs in other DLLs.


Can yoy please let me know if there is any other way to call a OO cobol from my non-oo cobol program.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Feb 13, 2009 8:53 pm    Post subject:
Reply with quote

Hello,

If you use static calls, you will have to find a way for those modules to be available to the linkedit.

Suggest you make contact with whoever provided the directions to use static calls.

As an experiment, what happens if you try dynamic calls?
Back to top
View user's profile Send private message
namitjai

New User


Joined: 12 Feb 2008
Posts: 41
Location: Bangalore

PostPosted: Mon Feb 16, 2009 11:53 am    Post subject:
Reply with quote

I tried using Dynamic calls but compiler shows error saying DLL application cannot be called using Dynamic call...However I am able to resolve my compiler issue by giving following compiler options in my JCL;
Compile step: PARM='RENT'
LInk Step: PARM='RENT,LIST,LET,MAP,XREF,CASE(MIXED),DYNAM(DLL),
// RMODE(ANY)'

Thanks for your help.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Feb 16, 2009 9:50 pm    Post subject: Reply to: How to call OO cobol from legacy cobol
Reply with quote

Good to hear it is working - thank you for posting your resolution icon_smile.gif

d
Back to top
View user's profile Send private message
namitjai

New User


Joined: 12 Feb 2008
Posts: 41
Location: Bangalore

PostPosted: Wed Feb 18, 2009 11:07 am    Post subject:
Reply with quote

Hi,

I missed the link for the reply posted for my last post. I posted my problem in continuation of this post ..is it possible to get that link again? If not than can you please let me know solution for my problem once again:

Problem:
I wanted to know the code snippet for handling String array in my OO cobol program(in Z/OS). String array I am getting from my java method residing in USS.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us