IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Using DLL in a call from rexx to C


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rameshvs
Currently Banned

New User


Joined: 10 Aug 2007
Posts: 30
Location: atlanta

PostPosted: Thu Oct 04, 2007 4:41 am
Reply with quote

Hi All,

I have a question for which am sure I am missing something. I have a C++ module which I am calling from REXX using LINKMVS and passing parameters. It works fine if I dont inlcude any external functions from C++. I mean if I include an external function from a DLL (of c programs) the program is not able to identify and dumping at run time. On the other hand if I execute a program directly from a JOB it works very well. Please suggest me as to what could be the missing link. I mean is it the way I am binding the DLL or something else wrong.

I tried the above C++ routine with TSO CALL command also but am having the same issue. So I think TSO is not able to identify the DLL.

Can you please help me out with this.

Thanks
Ramesh.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Oct 04, 2007 4:56 am
Reply with quote

Hello,

Is this
Quote:
the program is not able to identify
presenting a "modoule not found" error/abend?

If you are permitted, try to issue ISRDDN and see of the library is visable to your tso session.

I'm not familiar with tso/ispf/dll interfaces, so another means may be necessary (other than in the list of datasets tso "sees") for the session.

If it needs to be visable to the session, i suspect it will have to be added to the list of datasets your logon allocates.

When you have success running this in a "job" does the joblib/steplib have an execution library named that is not in your tso darasets?

With luck, i've not completely misunderstood. . . .
Back to top
View user's profile Send private message
rameshvs
Currently Banned

New User


Joined: 10 Aug 2007
Posts: 30
Location: atlanta

PostPosted: Thu Oct 04, 2007 5:26 am
Reply with quote

Yes Dick,

I am getting the program not found abend. But I am not able to solve by concatenating to the ISPLLIB.
Here is the detail.

I have REXX, R1 from which I am calling C++ program C1 using LINKMVS. To call C1 through LINKMVS I have to concatenate the load library(dataset LOAD) that has C1 load to ISPLLIB using LIBDEF. So I am able to do all these and am calling.

Now in the C1 program there is a reference to an external function F1 that is bound into DLL D1. The system abend is specifying that the program is not able to fing DLL D1 though it is present in the same LOAD dataset.

So system is able to find the load module for C1 from LOAD dataset why are we havivng issue with the DLL.

Please let me know if I am not clear, I will try and give more detailed explanation.

Thanks
Ramesh.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Oct 04, 2007 7:59 am
Reply with quote

Hello Ramesh,

I believe you are clear. I also believe i'm "in over my head" icon_smile.gif

Is is possible that another dd using the same library needs to be allocated in the tso session?

Is the dataset with the dll part of the joblib/steplib in the batch job?

Is there another dd in the batch job that names this library?
Back to top
View user's profile Send private message
rameshvs
Currently Banned

New User


Joined: 10 Aug 2007
Posts: 30
Location: atlanta

PostPosted: Thu Oct 04, 2007 8:16 am
Reply with quote

Yes Dick,

May be some other dataset but how should it be allocated and what should it be allocated to.

Yeah with the JCL, actually since everything is in the same load library which is part of the STEPLIB there is not problem.

I dont have a separate library in batch JCL to find the DDL's.

I am not getting a clue on how to get this resolved.

Thanks
Ramesh
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Oct 04, 2007 11:35 am
Reply with quote

Hi Ramesh,

I don't know if this will help - it is a COBOL reference for OO applications on the mainframe.

http://publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp?topic=/com.ibm.entcobol4.doc/tpooo08.htm

Maybe there will be something that can help.

I'll keep looking for something more useful.
Back to top
View user's profile Send private message
SPACHFR

New User


Joined: 07 Mar 2006
Posts: 5
Location: France

PostPosted: Tue Oct 16, 2007 7:17 pm
Reply with quote

Hi,

Did you link your DLL and C programme when you have created the C LOAD ?

I am worked on a same structure program.

C source
C DLL (externals functions)
Rexx with LINKMVS to call the C pgm

compile C pgm to have a OBJ
Pre Link and LInk the C OBJ with the DLL

add STEPLIB in your JLC that use the rexx to provide where are your DLL and C LOAD.

(sorry for my English.....)
Back to top
View user's profile Send private message
rameshvs
Currently Banned

New User


Joined: 10 Aug 2007
Posts: 30
Location: atlanta

PostPosted: Wed Oct 17, 2007 5:46 am
Reply with quote

Thanks for the responses.

I got it fixed in a way may not be ideal though but it seems to work. Here is what I have done insted of dynamically binding the DLL I have bound it Statis by including the objects specifically in the include statement.

This I have to do because I am not running my REXX from a JCL but running it in the foreground.

Once again thanks for the responses.
Ramesh.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Oct 17, 2007 7:00 am
Reply with quote

Hello,

Thank you for letting us know you have it working.

If you talk with your system support people, they may be able to modify your signon procedure to include the needed dataset(s) at the end of your library allocation.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top