Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-26 Thread Igor Osmolovskiy
>> Hello Dan >>>>>> Right, but is there a possibility to avoid creating a new thread? >>>>>> One option proposed by Peter is to launch Pyhton from JBC e.g. But >>>>>> any chance to achieve this for pure Pyhton? >>>>>> >

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-26 Thread Peter Falson
;>>>>>>>>> On Mar 9, 2020, at 10:36 AM, Igor Osmolovskiy >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>  >>>>>>>>> Hello Dan >>&

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-26 Thread Igor Osmolovskiy
22 UTC+1 пользователь DanE написал: >>>>>> >>>>>> That would be because the jsh initiated the thread and the program >>>>>> running under it is a shared object /dll beneath that thread. >>>>>> >>>>>> >>

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-25 Thread Peter Falson
ьник, 9 марта 2020 г., 15:27:22 UTC+1 пользователь DanE написал: >>>>>>>> >>>>>>>> That would be because the jsh initiated the thread and the program >>>>>>>> running under it is a shared object /dll beneath that thr

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-25 Thread Igor Osmolovskiy
; >>>>> That would be because the jsh initiated the thread and the program >>>>> running under it is a shared object /dll beneath that thread. >>>>> >>>>> >>>>> >>>>> Dan Ell​ | jBA

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-25 Thread Peter Falson
15:27:22 UTC+1 пользователь DanE написал: >>>>>> >>>>>> That would be because the jsh initiated the thread and the program >>>>>> running under it is a shared object /dll beneath that thread. >>>>>> >>>>>> >>>

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-25 Thread Igor Osmolovskiy
ct /dll beneath that thread. >>>> >>>> >>>> >>>> Dan Ell​ | jBASE Technical Engineer >>>> jBASE International, Inc. >>>> *813-498-2544* | 866‑582‑8447 >>>> *d...@jbase.com* | www.jbase.com >>>

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-10 Thread Quay Tar
ical Engineer >>> jBASE International, Inc. >>> *813-498-2544* | 866‑582‑8447 >>> *d...@jbase.com* | www.jbase.com >>> 1050 Calle Amanecer, Suite A | San Clemente, CA 92673 >>> *From:* jb...@googlegroups.com *On Behalf Of *Igor >>> Osmolovskiy &

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-10 Thread Igor Osmolovskiy
b...@googlegroups.com *On Behalf Of *Igor >> Osmolovskiy >> *Sent:* Monday, March 9, 2020 6:10 AM >> *To:* jBASE >> *Subject:* Re: Getting the jBase DP (data pointer) of the current >> session when using pure C >> >> >> >> Thank you Peter >

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-09 Thread Peter Falson
-2544 | 866‑582‑8447 >> d...@jbase.com | www.jbase.com >> 1050 Calle Amanecer, Suite A | San Clemente, CA 92673 >> From: jb...@googlegroups.com On Behalf Of Igor >> Osmolovskiy >> Sent: Monday, March 9, 2020 6:10 AM >> To: jBASE >> Subject: Re: Ge

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-09 Thread Igor Osmolovskiy
Suite A | San Clemente, CA 92673 > *From:* jb...@googlegroups.com > *On Behalf Of *Igor Osmolovskiy > *Sent:* Monday, March 9, 2020 6:10 AM > *To:* jBASE > > *Subject:* Re: Getting the jBase DP (data pointer) of the current session > when using pure C > > > &g

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-09 Thread Igor Osmolovskiy
This approach works, i.e. if we use a JBC program to call a Python that would call a C written extension module then DP is just passed and no additional session is being created. But would be great not to use JBC as a starting point понедельник, 9 марта 2020 г., 14:51:40 UTC+1 пользователь

RE: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-09 Thread Dan Ell
, CA 92673 From: jbase@googlegroups.com On Behalf Of Igor Osmolovskiy Sent: Monday, March 9, 2020 6:10 AM To: jBASE Subject: Re: Getting the jBase DP (data pointer) of the current session when using pure C Thank you Peter But do you think it is still possible to retrieve a DP for an existing

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-09 Thread Peter Falson
If you want to use python in this mix then I would think you need to call python from jBASE so you can persist the dp. Sent from my iPhone > On Mar 9, 2020, at 6:28 AM, Igor Osmolovskiy wrote: > >  > Thank you Peter > > But do you think it is still possible to retrieve a DP for an existing

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-09 Thread Igor Osmolovskiy
Thank you Peter But do you think it is still possible to retrieve a DP for an existing session? It can be seen that no new session is created when a JBC program is being called in jshell e.g. Therefore a DP initialization is happening somehow for that case Thanks суббота, 7 марта 2020 г.,

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-06 Thread Peter Falson
Whichever method you use to get a dp, it is up to you to store it in a persistent object. Sent from my iPhone > On Mar 6, 2020, at 2:56 PM, Igor Osmolovskiy wrote: > >  > Peter, we are using jBase 5.1 > > I've now tried to use > static DPSTRUCT *dp =

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-06 Thread Peter Falson
That creates a regular jBASE session dp. The null args are more for internal use. Sent from my iPhone > On Mar 6, 2020, at 2:56 PM, Igor Osmolovskiy wrote: > > Peter, thanks for the code sample > > Could you please elaborate on what exactly the next line means >

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-06 Thread Igor Osmolovskiy
Peter, we are using jBase 5.1 I've now tried to use static DPSTRUCT *dp = jbase_getdp_nocreate(NULL,NULL,1,NULL); but it still creates a new session... Would that be possible maybe to give an example of how jbase_getdp_nocreate() could be used please? Its name sounds like intending not to

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-06 Thread Igor Osmolovskiy
Marco, thank you for your shared experience Regarding dp initialization the next was observed: if your starting point is JBC code that will in turn call the C extension, then dp is really initialized automatically. Whereas if you launch C/Python directly then dp is NULL and smth has to be done

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-06 Thread Igor Osmolovskiy
Peter, thanks for the code sample Could you please elaborate on what exactly the next line means jbase_getdpEX(NULL,NULL,1,NULL) Thanks Igor -- -- IMPORTANT: T24/Globus posts are no longer accepted on this forum. To post, send email to jBASE@googlegroups.com To unsubscribe, send email to

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-05 Thread Patrick Payne
Igor I see that you are trying to call into jBASE functions directly from Python, correct? Based on what you are trying to do and required performance jBASE does now offer a Rest Interface which allows you to expose jBASE business rules to any language. If are you trying to build a full

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-04 Thread Jim Idle
I think then that the thing to do is ask Greg Cooper. @Bruce Decker - maybe you can facilitate this? As I use OSX, I don’t have jBASE available without some messing around Hunt Hint. OSX port would be easy. As would a docket image of jBASE :) Jim On Wed, Mar 4, 2020 at 23:05 Igor Osmolovskiy

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-04 Thread Marco Manyevere
Hi, On some earlier release of jBase 5, I once had a need to "divert" a jBC subroutine call to go via my own jBC subroutine with the same name that then called the original (for which I didn't have source). I remember creating a C function to achieve that. The C function was declared like below.

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-04 Thread Quay Tar
Haven't found my "working" example yet (might've been on a docker I blew away). I did find some WIP code but some of the includes it uses are not distributed. Maybe this will help you get further until I find something concrete: #include "Python.h" #include int ParseArguments(char*

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-04 Thread Peter Falson
What version of jBASE do you have? Sent from my iPhone > On Mar 4, 2020, at 10:55 AM, Igor Osmolovskiy wrote: > >  > Thanks Peter, would be really helpful! > > I've tried two ways > 1. ctypes library. I managed to call a JBC function but it requires quite a > lot work as the explicit

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-04 Thread Igor Osmolovskiy
Thanks Peter, would be really helpful! I've tried two ways 1. ctypes library. I managed to call a JBC function but it requires quite a lot work as the explicit variable types are required in this case. So all the transformations from PythonObj to a C type is required for each argument. Also in

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-04 Thread Peter Falson
We have some examples of python calling a subroutine and vice versa. I will dig around. Sent from my iPhone > On Mar 4, 2020, at 7:05 AM, Igor Osmolovskiy wrote: > >  > Hello > pls see my response to Jim with the code sample > > вторник, 3 марта 2020 г., 21:06:27 UTC+1 пользователь pfalson

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-04 Thread Igor Osmolovskiy
Hello pls see my response to Jim with the code sample вторник, 3 марта 2020 г., 21:06:27 UTC+1 пользователь pfalson написал: > > Can you post some code? > > Sent from my iPhone > > On Mar 3, 2020, at 11:19 AM, Igor Osmolovskiy > wrote: > >  > Dear all > > I need the jBase DP (data pointer) to

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-04 Thread Igor Osmolovskiy
I've simplified the code a bit in my previous reply to give an idea. Actually dp is defined as a static variable in a separate class and its value is returned by a dedicated class function. среда, 4 марта 2020 г., 8:11:30 UTC+1 пользователь Jim Idle написал: > > Wow - it has been a long time

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-04 Thread Igor Osmolovskiy
Hello Jim, Thanks for your participation in the discussion :) > Are writing a pure C program and wish to call in to subroutines etc? Yes, that's the idea. Actually the final goal is wider, namely to write a Python extension in C that would call JBC functions. Basically I managed to do it but

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-03 Thread Jim Idle
Wow - it has been a long time since that code ;) However, what you ask is possible I believe. It depends on your context. Are writing a pure C program and wish to call in to subroutines etc? Probably the best place to start is to generate the C code for a very small jBC program: lufc.b CRT

Re: Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-03 Thread Peter Falson
Can you post some code? Sent from my iPhone > On Mar 3, 2020, at 11:19 AM, Igor Osmolovskiy wrote: > >  > Dear all > > I need the jBase DP (data pointer) to be initialized. I've actually managed > to initialize it by calling the jbase_getdp(). But in both cases the new > child session is

Getting the jBase DP (data pointer) of the current session when using pure C

2020-03-03 Thread Igor Osmolovskiy
Dear all I need the jBase DP (data pointer) to be initialized. I've actually managed to initialize it by calling the jbase_getdp(). But in both cases the new child session is created in jshell (and gets removed automatically after the code has been executed). So I am wondering: is there a