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
 

 

Using DLL in a call from rexx to C

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Using DLL in a call from rexx to C
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

Site Director


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

PostPosted: Thu Oct 04, 2007 4:56 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Thu Oct 04, 2007 7:59 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Thu Oct 04, 2007 11:35 am    Post subject:
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    Post subject: Reply to: Using DLL in a call from rexx to C
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    Post subject:
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

Site Director


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

PostPosted: Wed Oct 17, 2007 7:00 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts I want to retire TRX and use only Rex... Abhinav Sharma CLIST & REXX 4 Sat Jul 29, 2017 2:53 am
No new posts Iterative use of a REXX script causin... bryonyh CLIST & REXX 4 Fri Jul 28, 2017 12:52 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am


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