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

2020-03-26 Thread Igor Osmolovskiy
Yep. This part works pretty well :)

четверг, 26 марта 2020 г., 13:49:01 UTC пользователь pfalson написал:
>
> Right. What I’m suggesting is that any python programs would need to pass 
> on the dp pointer down the chain. 
>
> Sent from my iPhone
>
> On Mar 26, 2020, at 6:09 AM, Igor Osmolovskiy  > wrote:
>
> 
> Let's imagine we are in jshell, thus 1 session has been created already. 
> Then
> 1. if we launch jBasic that calls .py there will be still 1 session (i.e. 
> the same one)
> 2. if we launch python that calls .py the second session will be created
>
> in both cases the same C extension with jbase_getdpEX inside is used
>
> среда, 25 марта 2020 г., 19:28:17 UTC пользователь pfalson написал:
>
>> Still not entirely sure why though. If python is the starting point and 
>> you get a dp from jbase_getdpEX (you cant avoid at least one session) you 
>> could pass the dp down the chain. 
>>
>> Sent from my iPhone
>>
>> On Mar 25, 2020, at 10:15 AM, Igor Osmolovskiy  wrote:
>>
>> 
>> Right. If a jBASE routine is the starting point - no new session is 
>> created.
>>
>> But if python is the starting point then looks like we cannot avoid an 
>> additional session
>>
>> среда, 25 марта 2020 г., 14:25:33 UTC пользователь pfalson написал:
>>
>>> Not following. If your starting point is jsh or LOGTO or a jBASE program 
>>> you should be able to call a python routine and convert the dp to a pylong 
>>> and pass it down for reuse.
>>>
>>> Sent from my iPhone
>>>
>>> On Mar 25, 2020, at 7:14 AM, Igor Osmolovskiy  wrote:
>>>
>>> 
>>> Thanks Peter for your help
>>>
>>> Coming back to the initial question whether a DP could be initialized 
>>> without a new session - looks like it is not possible. 
>>> When we compile and catalog a JBC routine then a dll will be placed into 
>>> bin. And when that JBC routine is called then it is actually called as a 
>>> dll rather than executable (which can be removed even). So the same address 
>>> space is used.
>>> On the contrary when we call python then it is always a separate 
>>> executable with its own address space..
>>>
>>> вторник, 10 марта 2020 г., 19:03:45 UTC пользователь pfalson написал:
>>>
>>>> https://github.com/pickmultivalue/jPython  
>>>>
>>>> On Tue, Mar 10, 2020 at 7:11 AM Igor Osmolovskiy  
>>>> wrote:
>>>>
>>>>> Would be interesting to have a look
>>>>> Thanks!
>>>>>
>>>>> понедельник, 9 марта 2020 г., 19:31:07 UTC+1 пользователь pfalson 
>>>>> написал:
>>>>>>
>>>>>> Your only choices are start from jsh/jbc call python, call jbc etc or 
>>>>>> start with python call jbc. 
>>>>>>
>>>>>> Either way the dp needs to be carried around. 
>>>>>>
>>>>>> I can post an example of calling python (it needs jBASE 5).
>>>>>>
>>>>>> Sent from my iPhone
>>>>>>
>>>>>> On Mar 9, 2020, at 10:36 AM, Igor Osmolovskiy  
>>>>>> wrote:
>>>>>>
>>>>>> 
>>>>>> 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?
>>>>>>
>>>>>> понедельник, 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 thread.
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>> Dan Ell​  | jBASE Technical 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
>>>>>>> *Sent:* Monday, March 9, 2020 6:10 AM
>>>>>>> *To:* jBASE 
>>>>>>> *Subject:* Re: Getting the jBase DP (data pointer) of the current 
>>>>>

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

2020-03-26 Thread Peter Falson
Right. What I’m suggesting is that any python programs would need to pass on 
the dp pointer down the chain. 

Sent from my iPhone

> On Mar 26, 2020, at 6:09 AM, Igor Osmolovskiy  wrote:
> 
> 
> Let's imagine we are in jshell, thus 1 session has been created already. Then
> 1. if we launch jBasic that calls .py there will be still 1 session (i.e. the 
> same one)
> 2. if we launch python that calls .py the second session will be created
> 
> in both cases the same C extension with jbase_getdpEX inside is used
> 
> среда, 25 марта 2020 г., 19:28:17 UTC пользователь pfalson написал:
>> Still not entirely sure why though. If python is the starting point and you 
>> get a dp from jbase_getdpEX (you cant avoid at least one session) you could 
>> pass the dp down the chain. 
>> 
>> Sent from my iPhone
>> 
>>>> On Mar 25, 2020, at 10:15 AM, Igor Osmolovskiy  wrote:
>>>> 
>>> 
>>> Right. If a jBASE routine is the starting point - no new session is created.
>>> 
>>> But if python is the starting point then looks like we cannot avoid an 
>>> additional session
>>> 
>>> среда, 25 марта 2020 г., 14:25:33 UTC пользователь pfalson написал:
>>>> Not following. If your starting point is jsh or LOGTO or a jBASE program 
>>>> you should be able to call a python routine and convert the dp to a pylong 
>>>> and pass it down for reuse.
>>>> 
>>>> Sent from my iPhone
>>>> 
>>>>>> On Mar 25, 2020, at 7:14 AM, Igor Osmolovskiy  wrote:
>>>>>> 
>>>>> 
>>>>> Thanks Peter for your help
>>>>> 
>>>>> Coming back to the initial question whether a DP could be initialized 
>>>>> without a new session - looks like it is not possible.
>>>>> When we compile and catalog a JBC routine then a dll will be placed into 
>>>>> bin. And when that JBC routine is called then it is actually called as a 
>>>>> dll rather than executable (which can be removed even). So the same 
>>>>> address space is used.
>>>>> On the contrary when we call python then it is always a separate 
>>>>> executable with its own address space..
>>>>> 
>>>>> вторник, 10 марта 2020 г., 19:03:45 UTC пользователь pfalson написал:
>>>>>> https://github.com/pickmultivalue/jPython  
>>>>>> 
>>>>>>> On Tue, Mar 10, 2020 at 7:11 AM Igor Osmolovskiy  
>>>>>>> wrote:
>>>>>>> Would be interesting to have a look
>>>>>>> Thanks!
>>>>>>> 
>>>>>>> понедельник, 9 марта 2020 г., 19:31:07 UTC+1 пользователь pfalson 
>>>>>>> написал:
>>>>>>>> 
>>>>>>>> Your only choices are start from jsh/jbc call python, call jbc etc or 
>>>>>>>> start with python call jbc. 
>>>>>>>> 
>>>>>>>> Either way the dp needs to be carried around. 
>>>>>>>> 
>>>>>>>> I can post an example of calling python (it needs jBASE 5).
>>>>>>>> 
>>>>>>>> Sent from my iPhone
>>>>>>>> 
>>>>>>>>>> On Mar 9, 2020, at 10:36 AM, Igor Osmolovskiy  
>>>>>>>>>> wrote:
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 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?
>>>>>>>>> 
>>>>>>>>> понедельник, 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 thread.
>>>>>>>>>> 
>>>>>>>>>>  
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> Dan Ell​  | jBASE Technical Engineer
>>>>>>>>>> jBASE International, Inc.
>>>>>>>>>> 813-498-2544 |   866‑582‑8447
>>>>

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

2020-03-26 Thread Igor Osmolovskiy
Let's imagine we are in jshell, thus 1 session has been created already. 
Then
1. if we launch jBasic that calls .py there will be still 1 session (i.e. 
the same one)
2. if we launch python that calls .py the second session will be created

in both cases the same C extension with jbase_getdpEX inside is used

среда, 25 марта 2020 г., 19:28:17 UTC пользователь pfalson написал:

> Still not entirely sure why though. If python is the starting point and 
> you get a dp from jbase_getdpEX (you cant avoid at least one session) you 
> could pass the dp down the chain. 
>
> Sent from my iPhone
>
> On Mar 25, 2020, at 10:15 AM, Igor Osmolovskiy  > wrote:
>
> 
> Right. If a jBASE routine is the starting point - no new session is 
> created.
>
> But if python is the starting point then looks like we cannot avoid an 
> additional session
>
> среда, 25 марта 2020 г., 14:25:33 UTC пользователь pfalson написал:
>
>> Not following. If your starting point is jsh or LOGTO or a jBASE program 
>> you should be able to call a python routine and convert the dp to a pylong 
>> and pass it down for reuse.
>>
>> Sent from my iPhone
>>
>> On Mar 25, 2020, at 7:14 AM, Igor Osmolovskiy  wrote:
>>
>> 
>> Thanks Peter for your help
>>
>> Coming back to the initial question whether a DP could be initialized 
>> without a new session - looks like it is not possible. 
>> When we compile and catalog a JBC routine then a dll will be placed into 
>> bin. And when that JBC routine is called then it is actually called as a 
>> dll rather than executable (which can be removed even). So the same address 
>> space is used.
>> On the contrary when we call python then it is always a separate 
>> executable with its own address space..
>>
>> вторник, 10 марта 2020 г., 19:03:45 UTC пользователь pfalson написал:
>>
>>> https://github.com/pickmultivalue/jPython  
>>>
>>> On Tue, Mar 10, 2020 at 7:11 AM Igor Osmolovskiy  
>>> wrote:
>>>
>>>> Would be interesting to have a look
>>>> Thanks!
>>>>
>>>> понедельник, 9 марта 2020 г., 19:31:07 UTC+1 пользователь pfalson 
>>>> написал:
>>>>>
>>>>> Your only choices are start from jsh/jbc call python, call jbc etc or 
>>>>> start with python call jbc. 
>>>>>
>>>>> Either way the dp needs to be carried around. 
>>>>>
>>>>> I can post an example of calling python (it needs jBASE 5).
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>> On Mar 9, 2020, at 10:36 AM, Igor Osmolovskiy  
>>>>> wrote:
>>>>>
>>>>> 
>>>>> 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?
>>>>>
>>>>> понедельник, 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 thread.
>>>>>>
>>>>>>  
>>>>>>
>>>>>> Dan Ell​  | jBASE Technical 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
>>>>>> *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 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
>>>>>>
>>>>>>
>>>>>>

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

2020-03-25 Thread Peter Falson
Still not entirely sure why though. If python is the starting point and you get 
a dp from jbase_getdpEX (you cant avoid at least one session) you could pass 
the dp down the chain. 

Sent from my iPhone

> On Mar 25, 2020, at 10:15 AM, Igor Osmolovskiy  wrote:
> 
> 
> Right. If a jBASE routine is the starting point - no new session is created.
> 
> But if python is the starting point then looks like we cannot avoid an 
> additional session
> 
> среда, 25 марта 2020 г., 14:25:33 UTC пользователь pfalson написал:
>> Not following. If your starting point is jsh or LOGTO or a jBASE program you 
>> should be able to call a python routine and convert the dp to a pylong and 
>> pass it down for reuse.
>> 
>> Sent from my iPhone
>> 
>>>> On Mar 25, 2020, at 7:14 AM, Igor Osmolovskiy  wrote:
>>>> 
>>> 
>>> Thanks Peter for your help
>>> 
>>> Coming back to the initial question whether a DP could be initialized 
>>> without a new session - looks like it is not possible.
>>> When we compile and catalog a JBC routine then a dll will be placed into 
>>> bin. And when that JBC routine is called then it is actually called as a 
>>> dll rather than executable (which can be removed even). So the same address 
>>> space is used.
>>> On the contrary when we call python then it is always a separate executable 
>>> with its own address space..
>>> 
>>> вторник, 10 марта 2020 г., 19:03:45 UTC пользователь pfalson написал:
>>>> https://github.com/pickmultivalue/jPython  
>>>> 
>>>>> On Tue, Mar 10, 2020 at 7:11 AM Igor Osmolovskiy  wrote:
>>>>> Would be interesting to have a look
>>>>> Thanks!
>>>>> 
>>>>> понедельник, 9 марта 2020 г., 19:31:07 UTC+1 пользователь pfalson написал:
>>>>>> 
>>>>>> Your only choices are start from jsh/jbc call python, call jbc etc or 
>>>>>> start with python call jbc. 
>>>>>> 
>>>>>> Either way the dp needs to be carried around. 
>>>>>> 
>>>>>> I can post an example of calling python (it needs jBASE 5).
>>>>>> 
>>>>>> Sent from my iPhone
>>>>>> 
>>>>>>>> On Mar 9, 2020, at 10:36 AM, Igor Osmolovskiy  wrote:
>>>>>>>> 
>>>>>>> 
>>>>>>> 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?
>>>>>>> 
>>>>>>> понедельник, 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 thread.
>>>>>>>> 
>>>>>>>>  
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Dan Ell​| jBASE Technical 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
>>>>>>>> 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 
>>>>>>>> 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
>>>>>>>> 
>>>>>>>> 

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

2020-03-25 Thread Igor Osmolovskiy
Right. If a jBASE routine is the starting point - no new session is created.

But if python is the starting point then looks like we cannot avoid an 
additional session

среда, 25 марта 2020 г., 14:25:33 UTC пользователь pfalson написал:

> Not following. If your starting point is jsh or LOGTO or a jBASE program 
> you should be able to call a python routine and convert the dp to a pylong 
> and pass it down for reuse.
>
> Sent from my iPhone
>
> On Mar 25, 2020, at 7:14 AM, Igor Osmolovskiy  > wrote:
>
> 
> Thanks Peter for your help
>
> Coming back to the initial question whether a DP could be initialized 
> without a new session - looks like it is not possible. 
> When we compile and catalog a JBC routine then a dll will be placed into 
> bin. And when that JBC routine is called then it is actually called as a 
> dll rather than executable (which can be removed even). So the same address 
> space is used.
> On the contrary when we call python then it is always a separate 
> executable with its own address space..
>
> вторник, 10 марта 2020 г., 19:03:45 UTC пользователь pfalson написал:
>
>> https://github.com/pickmultivalue/jPython  
>>
>> On Tue, Mar 10, 2020 at 7:11 AM Igor Osmolovskiy  
>> wrote:
>>
>>> Would be interesting to have a look
>>> Thanks!
>>>
>>> понедельник, 9 марта 2020 г., 19:31:07 UTC+1 пользователь pfalson 
>>> написал:
>>>>
>>>> Your only choices are start from jsh/jbc call python, call jbc etc or 
>>>> start with python call jbc. 
>>>>
>>>> Either way the dp needs to be carried around. 
>>>>
>>>> I can post an example of calling python (it needs jBASE 5).
>>>>
>>>> Sent from my iPhone
>>>>
>>>> On Mar 9, 2020, at 10:36 AM, Igor Osmolovskiy  wrote:
>>>>
>>>> 
>>>> 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?
>>>>
>>>> понедельник, 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 thread.
>>>>>
>>>>>  
>>>>>
>>>>> Dan Ell​  | jBASE Technical 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
>>>>> *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 
>>>>> 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 г., 1:13:48 UTC+1 пользователь pfalson написал:
>>>>>
>>>>> 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 
>>>>> > jbase_getdpEX(NULL,NULL,1,NULL) 
>>>>> > 
>>>>> > Thanks 
>>>>> > Igor 
>>>>> > 
>>>>> > -- 
>>>>> > -- 
>>>>> > IMPORTANT: T24/Globus posts are no longer accepted on this forum. 
>>>>> > 
>>>>> > To post, send email to jb...@googlegroups.com 
>>>>> > To unsubscribe, send ema

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

2020-03-25 Thread Peter Falson
Not following. If your starting point is jsh or LOGTO or a jBASE program you 
should be able to call a python routine and convert the dp to a pylong and pass 
it down for reuse.

Sent from my iPhone

> On Mar 25, 2020, at 7:14 AM, Igor Osmolovskiy  wrote:
> 
> 
> Thanks Peter for your help
> 
> Coming back to the initial question whether a DP could be initialized without 
> a new session - looks like it is not possible.
> When we compile and catalog a JBC routine then a dll will be placed into bin. 
> And when that JBC routine is called then it is actually called as a dll 
> rather than executable (which can be removed even). So the same address space 
> is used.
> On the contrary when we call python then it is always a separate executable 
> with its own address space..
> 
> вторник, 10 марта 2020 г., 19:03:45 UTC пользователь pfalson написал:
>> https://github.com/pickmultivalue/jPython  
>> 
>>> On Tue, Mar 10, 2020 at 7:11 AM Igor Osmolovskiy  wrote:
>>> Would be interesting to have a look
>>> Thanks!
>>> 
>>> понедельник, 9 марта 2020 г., 19:31:07 UTC+1 пользователь pfalson написал:
>>>> 
>>>> Your only choices are start from jsh/jbc call python, call jbc etc or 
>>>> start with python call jbc. 
>>>> 
>>>> Either way the dp needs to be carried around. 
>>>> 
>>>> I can post an example of calling python (it needs jBASE 5).
>>>> 
>>>> Sent from my iPhone
>>>> 
>>>>>> On Mar 9, 2020, at 10:36 AM, Igor Osmolovskiy  wrote:
>>>>>> 
>>>>> 
>>>>> 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?
>>>>> 
>>>>> понедельник, 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 thread.
>>>>>> 
>>>>>>  
>>>>>> 
>>>>>> 
>>>>>> Dan Ell​  | jBASE Technical 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
>>>>>> 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 
>>>>>> 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 г., 1:13:48 UTC+1 пользователь pfalson написал:
>>>>>> 
>>>>>> 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 
>>>>>> > jbase_getdpEX(NULL,NULL,1,NULL) 
>>>>>> > 
>>>>>> > Thanks 
>>>>>> > Igor 
>>>>>> > 
>>>>>> > -- 
>>>>>> > -- 
>>>>>> > IMPORTANT: T24/Globus posts are no longer accepted on this forum. 
>>>>>> > 
>>>>>> > To post, send email to jb...@googlegroups.com 
>>>>>> > To unsubscribe, send email to jbase-un...@googlegroups.com 

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

2020-03-25 Thread Igor Osmolovskiy
Thanks Peter for your help

Coming back to the initial question whether a DP could be initialized 
without a new session - looks like it is not possible. 
When we compile and catalog a JBC routine then a dll will be placed into 
bin. And when that JBC routine is called then it is actually called as a 
dll rather than executable (which can be removed even). So the same address 
space is used.
On the contrary when we call python then it is always a separate executable 
with its own address space..

вторник, 10 марта 2020 г., 19:03:45 UTC пользователь pfalson написал:

> https://github.com/pickmultivalue/jPython  
>
> On Tue, Mar 10, 2020 at 7:11 AM Igor Osmolovskiy  > wrote:
>
>> Would be interesting to have a look
>> Thanks!
>>
>> понедельник, 9 марта 2020 г., 19:31:07 UTC+1 пользователь pfalson написал:
>>>
>>> Your only choices are start from jsh/jbc call python, call jbc etc or 
>>> start with python call jbc. 
>>>
>>> Either way the dp needs to be carried around. 
>>>
>>> I can post an example of calling python (it needs jBASE 5).
>>>
>>> Sent from my iPhone
>>>
>>> On Mar 9, 2020, at 10:36 AM, Igor Osmolovskiy  wrote:
>>>
>>> 
>>> 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?
>>>
>>> понедельник, 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 thread.
>>>>
>>>>  
>>>>
>>>> Dan Ell​  | jBASE Technical 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
>>>> *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 
>>>> 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 г., 1:13:48 UTC+1 пользователь pfalson написал:
>>>>
>>>> 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 
>>>> > jbase_getdpEX(NULL,NULL,1,NULL) 
>>>> > 
>>>> > Thanks 
>>>> > Igor 
>>>> > 
>>>> > -- 
>>>> > -- 
>>>> > IMPORTANT: T24/Globus posts are no longer accepted on this forum. 
>>>> > 
>>>> > To post, send email to jb...@googlegroups.com 
>>>> > To unsubscribe, send email to jbase-un...@googlegroups.com 
>>>> > For more options, visit this group at 
>>>> http://groups.google.com/group/jBASE?hl=en 
>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2FjBASE%3Fhl%3Den=02%7C01%7Cdane%40jbase.com%7C2735ab848de94763c06908d7c42dccb7%7Cbfd62fcabd384e07a0785e9943d1f9c0%7C0%7C0%7C637193573316590034=VRW0p3%2FwtOLrTqVmRe8kA%2FaqG0qtFUkCXyVZG4yTrtU%3D=0>
>>>>  
>>>> > 
>>>> > --- 
>>>> > You received this message because you are subscribed to the Google 
>>>> Groups "jBASE" group. 
>>>> > To unsubscribe from this group and stop receiving emails from it, 
>>>> send an email to jb...@googlegroups.com. 
>>>> > To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgi

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

2020-03-10 Thread Quay Tar
https://github.com/pickmultivalue/jPython

On Tue, Mar 10, 2020 at 7:11 AM Igor Osmolovskiy  wrote:

> Would be interesting to have a look
> Thanks!
>
> понедельник, 9 марта 2020 г., 19:31:07 UTC+1 пользователь pfalson написал:
>>
>> Your only choices are start from jsh/jbc call python, call jbc etc or
>> start with python call jbc.
>>
>> Either way the dp needs to be carried around.
>>
>> I can post an example of calling python (it needs jBASE 5).
>>
>> Sent from my iPhone
>>
>> On Mar 9, 2020, at 10:36 AM, Igor Osmolovskiy  wrote:
>>
>> 
>> 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?
>>
>> понедельник, 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 thread.
>>>
>>>
>>>
>>> Dan Ell​  | jBASE Technical 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
>>> *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
>>> 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 г., 1:13:48 UTC+1 пользователь pfalson написал:
>>>
>>> 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
>>> > jbase_getdpEX(NULL,NULL,1,NULL)
>>> >
>>> > Thanks
>>> > Igor
>>> >
>>> > --
>>> > --
>>> > IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>> >
>>> > To post, send email to jb...@googlegroups.com
>>> > To unsubscribe, send email to jbase-un...@googlegroups.com
>>> > For more options, visit this group at
>>> http://groups.google.com/group/jBASE?hl=en
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2FjBASE%3Fhl%3Den=02%7C01%7Cdane%40jbase.com%7C2735ab848de94763c06908d7c42dccb7%7Cbfd62fcabd384e07a0785e9943d1f9c0%7C0%7C0%7C637193573316590034=VRW0p3%2FwtOLrTqVmRe8kA%2FaqG0qtFUkCXyVZG4yTrtU%3D=0>
>>> >
>>> > ---
>>> > You received this message because you are subscribed to the Google
>>> Groups "jBASE" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jb...@googlegroups.com.
>>> > To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jbase/050fac31-e1aa-46e0-99bd-59d6f8dcdea7%40googlegroups.com
>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fjbase%2F050fac31-e1aa-46e0-99bd-59d6f8dcdea7%2540googlegroups.com=02%7C01%7Cdane%40jbase.com%7C2735ab848de94763c06908d7c42dccb7%7Cbfd62fcabd384e07a0785e9943d1f9c0%7C0%7C0%7C637193573316590034=vlTrFwviCbBUQ%2BM1gJtK%2BEYHCIhO9T%2B4Lcl9z%2FFifV4%3D=0>.
>>>
>>>
>>> --
>>> --
>>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>>
>>> To post, send email to jb...@googlegroups.com
>>> To unsubscribe, send email to jbase-un...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/jBASE?hl=en
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2FjBASE%3Fhl%3Den=02%7C01%7Cdane%40jbase.com%7C2735ab848de94763c06908d7c42dccb7%7Cbfd62fcabd384e07a0785e9943d1f9c0%7C0%7C

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

2020-03-10 Thread Igor Osmolovskiy
Would be interesting to have a look
Thanks!

понедельник, 9 марта 2020 г., 19:31:07 UTC+1 пользователь pfalson написал:
>
> Your only choices are start from jsh/jbc call python, call jbc etc or 
> start with python call jbc. 
>
> Either way the dp needs to be carried around. 
>
> I can post an example of calling python (it needs jBASE 5).
>
> Sent from my iPhone
>
> On Mar 9, 2020, at 10:36 AM, Igor Osmolovskiy  > wrote:
>
> 
> 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?
>
> понедельник, 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 thread.
>>
>>  
>>
>> Dan Ell​  | jBASE Technical 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
>> *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 
>> 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 г., 1:13:48 UTC+1 пользователь pfalson написал:
>>
>> 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 
>> > jbase_getdpEX(NULL,NULL,1,NULL) 
>> > 
>> > Thanks 
>> > Igor 
>> > 
>> > -- 
>> > -- 
>> > IMPORTANT: T24/Globus posts are no longer accepted on this forum. 
>> > 
>> > To post, send email to jb...@googlegroups.com 
>> > To unsubscribe, send email to jbase-un...@googlegroups.com 
>> > For more options, visit this group at 
>> http://groups.google.com/group/jBASE?hl=en 
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2FjBASE%3Fhl%3Den=02%7C01%7Cdane%40jbase.com%7C2735ab848de94763c06908d7c42dccb7%7Cbfd62fcabd384e07a0785e9943d1f9c0%7C0%7C0%7C637193573316590034=VRW0p3%2FwtOLrTqVmRe8kA%2FaqG0qtFUkCXyVZG4yTrtU%3D=0>
>>  
>> > 
>> > --- 
>> > You received this message because you are subscribed to the Google 
>> Groups "jBASE" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an email to jb...@googlegroups.com. 
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jbase/050fac31-e1aa-46e0-99bd-59d6f8dcdea7%40googlegroups.com
>>  
>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fjbase%2F050fac31-e1aa-46e0-99bd-59d6f8dcdea7%2540googlegroups.com=02%7C01%7Cdane%40jbase.com%7C2735ab848de94763c06908d7c42dccb7%7Cbfd62fcabd384e07a0785e9943d1f9c0%7C0%7C0%7C637193573316590034=vlTrFwviCbBUQ%2BM1gJtK%2BEYHCIhO9T%2B4Lcl9z%2FFifV4%3D=0>.
>>  
>>
>>
>> -- 
>> -- 
>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>  
>> To post, send email to jb...@googlegroups.com
>> To unsubscribe, send email to jbase-un...@googlegroups.com
>> For more options, visit this group at 
>> http://groups.google.com/group/jBASE?hl=en 
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2FjBASE%3Fhl%3Den=02%7C01%7Cdane%40jbase.com%7C2735ab848de94763c06908d7c42dccb7%7Cbfd62fcabd384e07a0785e9943d1f9c0%7C0%7C0%7C637193573316600023=C0g7WVU0MT7Rzp90HiQkjwmyNdIa7WS2U5UznTBzWvU%3D=0>
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "jBASE" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jb...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/

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

2020-03-09 Thread Peter Falson
Your only choices are start from jsh/jbc call python, call jbc etc or start 
with python call jbc. 

Either way the dp needs to be carried around. 

I can post an example of calling python (it needs jBASE 5).

Sent from my iPhone

> On Mar 9, 2020, at 10:36 AM, Igor Osmolovskiy  wrote:
> 
> 
> 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?
> 
> понедельник, 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 thread.
>> 
>>  
>> 
>> 
>> Dan Ell​  | jBASE Technical 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
>> 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 
>> 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 г., 1:13:48 UTC+1 пользователь pfalson написал:
>> 
>> 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 
>> > jbase_getdpEX(NULL,NULL,1,NULL) 
>> > 
>> > Thanks 
>> > Igor 
>> > 
>> > -- 
>> > -- 
>> > IMPORTANT: T24/Globus posts are no longer accepted on this forum. 
>> > 
>> > To post, send email to jb...@googlegroups.com 
>> > To unsubscribe, send email to jbase-un...@googlegroups.com 
>> > For more options, visit this group at 
>> > http://groups.google.com/group/jBASE?hl=en 
>> > 
>> > --- 
>> > You received this message because you are subscribed to the Google Groups 
>> > "jBASE" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send an 
>> > email to jb...@googlegroups.com. 
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/jbase/050fac31-e1aa-46e0-99bd-59d6f8dcdea7%40googlegroups.com.
>> 
>> -- 
>> -- 
>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>  
>> To post, send email to jb...@googlegroups.com
>> To unsubscribe, send email to jbase-un...@googlegroups.com
>> For more options, visit this group at 
>> http://groups.google.com/group/jBASE?hl=en
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "jBASE" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jb...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jbase/3308135a-4d22-4124-88c0-d5b693d9ed2d%40googlegroups.com.
>> 
> 
> -- 
> -- 
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>  
> To post, send email to jBASE@googlegroups.com
> To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbase+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/4d42aaec-5bed-4546-a748-4ccdc51a563e%40googlegroups.com.

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/70861CBC-AA46-4B2F-A6AC-147448AC770D%40gmail.com.


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

2020-03-09 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?

понедельник, 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 thread.
>
>  
>
> Dan Ell​  | jBASE Technical 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
> *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 
> 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 г., 1:13:48 UTC+1 пользователь pfalson написал:
>
> 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 
> > jbase_getdpEX(NULL,NULL,1,NULL) 
> > 
> > Thanks 
> > Igor 
> > 
> > -- 
> > -- 
> > IMPORTANT: T24/Globus posts are no longer accepted on this forum. 
> > 
> > To post, send email to jb...@googlegroups.com 
> > To unsubscribe, send email to jbase-un...@googlegroups.com 
> > For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en 
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2FjBASE%3Fhl%3Den=02%7C01%7Cdane%40jbase.com%7C2735ab848de94763c06908d7c42dccb7%7Cbfd62fcabd384e07a0785e9943d1f9c0%7C0%7C0%7C637193573316590034=VRW0p3%2FwtOLrTqVmRe8kA%2FaqG0qtFUkCXyVZG4yTrtU%3D=0>
>  
> > 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups "jBASE" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to jb...@googlegroups.com. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/050fac31-e1aa-46e0-99bd-59d6f8dcdea7%40googlegroups.com
>  
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fjbase%2F050fac31-e1aa-46e0-99bd-59d6f8dcdea7%2540googlegroups.com=02%7C01%7Cdane%40jbase.com%7C2735ab848de94763c06908d7c42dccb7%7Cbfd62fcabd384e07a0785e9943d1f9c0%7C0%7C0%7C637193573316590034=vlTrFwviCbBUQ%2BM1gJtK%2BEYHCIhO9T%2B4Lcl9z%2FFifV4%3D=0>.
>  
>
>
> -- 
> -- 
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>  
> To post, send email to jb...@googlegroups.com 
> To unsubscribe, send email to jbase-un...@googlegroups.com 
> For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en 
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2FjBASE%3Fhl%3Den=02%7C01%7Cdane%40jbase.com%7C2735ab848de94763c06908d7c42dccb7%7Cbfd62fcabd384e07a0785e9943d1f9c0%7C0%7C0%7C637193573316600023=C0g7WVU0MT7Rzp90HiQkjwmyNdIa7WS2U5UznTBzWvU%3D=0>
>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jb...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/3308135a-4d22-4124-88c0-d5b693d9ed2d%40googlegroups.com
>  
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fjbase%2F3308135a-4d22-4124-88c0-d5b693d9ed2d%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter=02%7C01%7Cdane%40jbase.com%7C2735ab848de94763c06908d7c42dccb7%7Cbfd62fcabd384e07a0785e9943d1f9c0%7C0%7C0%7C637193573316610020=HgYP5YlsaNvbsC6vEI8vgbLTfTWChbcoAyiM2h83QR4%3D=0>
> .
>

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/4d42aaec-5bed-4546-a748-4ccdc51a563e%40googlegroups.com.


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 пользователь pfalson написал:
>
> 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 
> 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 г., 1:13:48 UTC+1 пользователь pfalson написал:
>>
>> 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 
>> > jbase_getdpEX(NULL,NULL,1,NULL) 
>> > 
>> > Thanks 
>> > Igor 
>> > 
>> > -- 
>> > -- 
>> > IMPORTANT: T24/Globus posts are no longer accepted on this forum. 
>> > 
>> > To post, send email to jb...@googlegroups.com 
>> > To unsubscribe, send email to jbase-un...@googlegroups.com 
>> > For more options, visit this group at 
>> http://groups.google.com/group/jBASE?hl=en 
>> > 
>> > --- 
>> > You received this message because you are subscribed to the Google 
>> Groups "jBASE" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an email to jb...@googlegroups.com. 
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jbase/050fac31-e1aa-46e0-99bd-59d6f8dcdea7%40googlegroups.com.
>>  
>>
>>
> -- 
> -- 
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>  
> To post, send email to jb...@googlegroups.com 
> To unsubscribe, send email to jbase-un...@googlegroups.com 
> For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en
>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jb...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/3308135a-4d22-4124-88c0-d5b693d9ed2d%40googlegroups.com
>  
> 
> .
>
>

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/ab505f7e-35ba-47be-8452-70d52787c994%40googlegroups.com.


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

2020-03-09 Thread Dan Ell
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 | jBASE Technical 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: 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 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 г., 1:13:48 UTC+1 пользователь pfalson написал:
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
> jbase_getdpEX(NULL,NULL,1,NULL)
>
> Thanks
> Igor
>
> --
> --
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>
> To post, send email to jb...@googlegroups.com
> To unsubscribe, send email to jbase-un...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2FjBASE%3Fhl%3Den=02%7C01%7Cdane%40jbase.com%7C2735ab848de94763c06908d7c42dccb7%7Cbfd62fcabd384e07a0785e9943d1f9c0%7C0%7C0%7C637193573316590034=VRW0p3%2FwtOLrTqVmRe8kA%2FaqG0qtFUkCXyVZG4yTrtU%3D=0>
>
> ---
> You received this message because you are subscribed to the Google Groups 
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jb...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/050fac31-e1aa-46e0-99bd-59d6f8dcdea7%40googlegroups.com<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fjbase%2F050fac31-e1aa-46e0-99bd-59d6f8dcdea7%2540googlegroups.com=02%7C01%7Cdane%40jbase.com%7C2735ab848de94763c06908d7c42dccb7%7Cbfd62fcabd384e07a0785e9943d1f9c0%7C0%7C0%7C637193573316590034=vlTrFwviCbBUQ%2BM1gJtK%2BEYHCIhO9T%2B4Lcl9z%2FFifV4%3D=0>.
--
--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com<mailto:jBASE@googlegroups.com>
To unsubscribe, send email to 
jbase-unsubscr...@googlegroups.com<mailto:jbase-unsubscr...@googlegroups.com>
For more options, visit this group at 
http://groups.google.com/group/jBASE?hl=en<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2FjBASE%3Fhl%3Den=02%7C01%7Cdane%40jbase.com%7C2735ab848de94763c06908d7c42dccb7%7Cbfd62fcabd384e07a0785e9943d1f9c0%7C0%7C0%7C637193573316600023=C0g7WVU0MT7Rzp90HiQkjwmyNdIa7WS2U5UznTBzWvU%3D=0>

---
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
jbase+unsubscr...@googlegroups.com<mailto:jbase+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/3308135a-4d22-4124-88c0-d5b693d9ed2d%40googlegroups.com<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fjbase%2F3308135a-4d22-4124-88c0-d5b693d9ed2d%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter=02%7C01%7Cdane%40jbase.com%7C2735ab848de94763c06908d7c42dccb7%7Cbfd62fcabd384e07a0785e9943d1f9c0%7C0%7C0%7C637193573316610020=HgYP5YlsaNvbsC6vEI8vgbLTfTWChbcoAyiM2h83QR4%3D=0>.

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/MN2PR18MB351231B0E400775FEA1A7E8DC4FE0%40MN2PR18MB3512.namprd18.prod.outlook.com.


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 
> 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 г., 1:13:48 UTC+1 пользователь pfalson написал:
>> 
>> 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 
>> > jbase_getdpEX(NULL,NULL,1,NULL) 
>> > 
>> > Thanks 
>> > Igor 
>> > 
>> > -- 
>> > -- 
>> > IMPORTANT: T24/Globus posts are no longer accepted on this forum. 
>> > 
>> > To post, send email to jb...@googlegroups.com 
>> > To unsubscribe, send email to jbase-un...@googlegroups.com 
>> > For more options, visit this group at 
>> > http://groups.google.com/group/jBASE?hl=en 
>> > 
>> > --- 
>> > You received this message because you are subscribed to the Google Groups 
>> > "jBASE" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send an 
>> > email to jb...@googlegroups.com. 
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/jbase/050fac31-e1aa-46e0-99bd-59d6f8dcdea7%40googlegroups.com.
>> >  
> 
> -- 
> -- 
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>  
> To post, send email to jBASE@googlegroups.com
> To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbase+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/3308135a-4d22-4124-88c0-d5b693d9ed2d%40googlegroups.com.

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/BDC0BAEB-BBEB-4F86-B508-08374E9E4028%40gmail.com.


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 г., 1:13:48 UTC+1 пользователь pfalson написал:
>
> 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 
> > jbase_getdpEX(NULL,NULL,1,NULL) 
> > 
> > Thanks 
> > Igor 
> > 
> > -- 
> > -- 
> > IMPORTANT: T24/Globus posts are no longer accepted on this forum. 
> > 
> > To post, send email to jb...@googlegroups.com  
> > To unsubscribe, send email to jbase-un...@googlegroups.com  
> > For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en 
> > 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups "jBASE" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to jb...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/050fac31-e1aa-46e0-99bd-59d6f8dcdea7%40googlegroups.com.
>  
>
>

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/3308135a-4d22-4124-88c0-d5b693d9ed2d%40googlegroups.com.


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 = 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 create a new dp :)
> thanks
> 
> среда, 4 марта 2020 г., 21:08:25 UTC+1 пользователь pfalson написал:
>> 
>> 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 variable types are required in this case. So all 
>>> the transformations from PythonObj to a C type is required for each 
>>> argument. Also in many cases polymorphismе would be required as JBC 
>>> arguments often assume different types.
>>> 2. building a python library via distutils and working with PythonObj only. 
>>> As I've mentioned already this works but was not able to get rid of the 
>>> additional session being created at the step of "import lib" in python code.
>>> 
>>> среда, 4 марта 2020 г., 16:11:12 UTC+1 пользователь pfalson написал:
 
 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 написал:
>> 
>> 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 created in jshell (and gets removed 
>>> automatically after the code has been executed).
>>> 
>>> So I am wondering: is there a possibility to retrieve and use the 
>>> current session DP somehow? So that no child session would get created
>>> 
>>> Any advice would be highly appreciated
>>> 
>>> Thanks in advance
>>> 
>>> 
>>> PS: to the admin, it is actually a jBase related question rather than 
>>> TAFC. Thanks
>>> 
>>> 
>>> Kind regards,
>>> Igor
>>> -- 
>>> -- 
>>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>>  
>>> To post, send email to jb...@googlegroups.com
>>> To unsubscribe, send email to jbase-un...@googlegroups.com
>>> For more options, visit this group at 
>>> http://groups.google.com/group/jBASE?hl=en
>>> 
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "jBASE" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to jb...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jbase/73153581-25ae-493a-95f6-8afc5cdf7813%40googlegroups.com.
> 
> -- 
> -- 
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>  
> To post, send email to jb...@googlegroups.com
> To unsubscribe, send email to jbase-un...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jb...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/5c46377f-4c68-4f50-a5fb-9d1d8164232b%40googlegroups.com.
>>> 
>>> -- 
>>> -- 
>>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>>  
>>> To post, send email to jb...@googlegroups.com
>>> To unsubscribe, send email to jbase-un...@googlegroups.com
>>> For more options, visit this group at 
>>> http://groups.google.com/group/jBASE?hl=en
>>> 
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "jBASE" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to jb...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jbase/8ed5e66b-8076-495b-8b66-c7db7d4e8629%40googlegroups.com.
> 
> -- 
> -- 
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>  
> To post, send email to jBASE@googlegroups.com

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
> 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 jbase-unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbase+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/050fac31-e1aa-46e0-99bd-59d6f8dcdea7%40googlegroups.com.

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/28A9D49D-1995-4B04-9964-67D449E0D708%40gmail.com.


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 create a new dp :)
thanks

среда, 4 марта 2020 г., 21:08:25 UTC+1 пользователь pfalson написал:
>
> 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 variable types are required in this case. So all 
> the transformations from PythonObj to a C type is required for each 
> argument. Also in many cases polymorphismе would be required as JBC 
> arguments often assume different types.
> 2. building a python library via distutils and working with PythonObj 
> only. As I've mentioned already this works but was not able to get rid of 
> the additional session being created at the step of "import lib" in python 
> code.
>
> среда, 4 марта 2020 г., 16:11:12 UTC+1 пользователь pfalson написал:
>>
>> 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 написал:
>>>
>>> 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 created in jshell (and gets removed automatically 
>>> after the code has been executed).
>>>
>>> So I am wondering: is there a possibility to retrieve and use the 
>>> current session DP somehow? So that no child session would get created
>>>
>>> Any advice would be highly appreciated
>>>
>>> Thanks in advance
>>>
>>>
>>> PS: to the admin, it is actually a jBase related question rather than 
>>> TAFC. Thanks
>>>
>>>
>>> Kind regards,
>>> Igor
>>>
>>> -- 
>>> -- 
>>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>>  
>>> To post, send email to jb...@googlegroups.com
>>> To unsubscribe, send email to jbase-un...@googlegroups.com
>>> For more options, visit this group at 
>>> http://groups.google.com/group/jBASE?hl=en
>>>
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "jBASE" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to jb...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jbase/73153581-25ae-493a-95f6-8afc5cdf7813%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>> -- 
>> -- 
>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>  
>> To post, send email to jb...@googlegroups.com
>> To unsubscribe, send email to jbase-un...@googlegroups.com
>> For more options, visit this group at 
>> http://groups.google.com/group/jBASE?hl=en
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "jBASE" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jb...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jbase/5c46377f-4c68-4f50-a5fb-9d1d8164232b%40googlegroups.com
>>  
>> 
>> .
>>
>> -- 
> -- 
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>  
> To post, send email to jb...@googlegroups.com 
> To unsubscribe, send email to jbase-un...@googlegroups.com 
> For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en
>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jb...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/8ed5e66b-8076-495b-8b66-c7db7d4e8629%40googlegroups.com
>  
> 
> .
>
>

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at 

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 manually

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/1826d6f5-b4f5-4165-b9b4-d2b4d444ccbb%40googlegroups.com.


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 jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/050fac31-e1aa-46e0-99bd-59d6f8dcdea7%40googlegroups.com.


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 wrapper for Python to allow you to code directly in Python vs Pick 
Basic then you will need Peter.  Keep in mind jBASE now offers direct 
inline C inside Pick Code which allows the opposite where you can directly 
call Python functions from jBASE by using the Python/C integration 
examples.  

Jim, from docker do

docker pull zumasys/jbase_base
docker run -it zumasys/jbase_base jb

Enjoy =)

On Wednesday, March 4, 2020 at 10:25:40 PM UTC-8, Jim Idle wrote:
>
>
> 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  > wrote:
>
>> 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 this excessive session is something would be good to get rid of.
>>
>> I've applied jbc -S myrtn.b for a simple code already which results in 
>> producing 2 files: myrtn.c and the myrtn.j, the latter one being included 
>> into the .c one via #include "myrtn.j". 
>> But in the .j file already we can see the lines like
>> #define DEF_SEL_VAR JLibReturnDefaultSelect(dp) /* Default select 
>> list for this program */
>> #define DEF_FILE_VAR JLibReturnDefaultFile(dp) /* Default file 
>> descriptor for this program */
>>
>> i.e. dp is supposed to be initialized already by the moment myrtn is 
>> called.
>>
>> I've managed to find the next dp related functions mentioned in some 
>> libraries
>> jbase_getdp() - this works, i.e. initializes dp, but creates a new session
>> jbase_getdp_nocreate() - not working if called alone. but it works and 
>> returns the dp1 value when called after jbase_getdp(), and dp1 = dp in 
>> this case
>> jbase_getdpEX() - not sure what it should do
>> jbase_setdpEX() - not sure what it should do   
>>
>>
>> Please see the sample piece of code
>>
>> #include 
>> extern "C" DPSTRUCT *jbase_getdp();
>>
>> ...
>>
>> PyMODINIT_FUNC
>> jbc_oconv(PyObject*, PyObject* _args)
>> {
>> ...
>> DPSTRUCT *dp = jbase_getdp();
>> OCONV_B(result, tmp, VarHelper(arg1), VarHelper(arg2));  // this if 
>> defined in jsystem.h as   #define OCONV_B(Target, ConvReg, Source, 
>> Conversion) JLibGConvRun(*dp*, ConvReg, Target, Source, Conversion, 1)
>> ...
>> }
>>
>>
>>
>> I've tried to read the jmainfunction.obj  as well where some other jbase 
>> related functions are mentioned but could not figure out any useful one...
>>
>> Maybe there is something I am missing or some non-documented function?
>>
>> Would appreciate any hints! :)
>> Thanks
>> Igor
>>
>> среда, 4 марта 2020 г., 8:11:30 UTC+1 пользователь 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 "Leeds United are Magic!"
>>>
>>> jbc -S lufc.b
>>>
>>> Then you will see the startup sequence for a standard executable and can 
>>> copy the code. 
>>>
>>> However, my memory is vague, but I think that we had a C function you 
>>> can call to do what you are doing and that will return the dp for reuse. It 
>>> get's passed to subroutines for instance. 
>>>
>>> Perhaps you can post the code you currently have.
>>>
>>> Jim
>>>
>>> On Wed, Mar 4, 2020 at 3: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 created in jshell (and gets removed automatically 
 after the code has been executed).

 So I am wondering: is there a possibility to retrieve and use the 
 current session DP somehow? So that no child session would get created

 Any advice would be highly appreciated

 Thanks in advance


 PS: to the admin, it is actually a jBase related question rather than 
 TAFC. Thanks


 Kind regards,
 Igor

 -- 
 -- 
 IMPORTANT: T24/Globus posts are no longer accepted on this forum.
  
 To post, send email to jb...@googlegroups.com
 To unsubscribe, send email to jbase-un...@googlegroups.com

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  wrote:

> 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 this excessive session is something would be good to get rid of.
>
> I've applied jbc -S myrtn.b for a simple code already which results in
> producing 2 files: myrtn.c and the myrtn.j, the latter one being included
> into the .c one via #include "myrtn.j".
> But in the .j file already we can see the lines like
> #define DEF_SEL_VAR JLibReturnDefaultSelect(dp) /* Default select
> list for this program */
> #define DEF_FILE_VAR JLibReturnDefaultFile(dp) /* Default file
> descriptor for this program */
>
> i.e. dp is supposed to be initialized already by the moment myrtn is
> called.
>
> I've managed to find the next dp related functions mentioned in some
> libraries
> jbase_getdp() - this works, i.e. initializes dp, but creates a new session
> jbase_getdp_nocreate() - not working if called alone. but it works and
> returns the dp1 value when called after jbase_getdp(), and dp1 = dp in
> this case
> jbase_getdpEX() - not sure what it should do
> jbase_setdpEX() - not sure what it should do
>
>
> Please see the sample piece of code
>
> #include 
> extern "C" DPSTRUCT *jbase_getdp();
>
> ...
>
> PyMODINIT_FUNC
> jbc_oconv(PyObject*, PyObject* _args)
> {
> ...
> DPSTRUCT *dp = jbase_getdp();
> OCONV_B(result, tmp, VarHelper(arg1), VarHelper(arg2));  // this if
> defined in jsystem.h as   #define OCONV_B(Target, ConvReg, Source,
> Conversion) JLibGConvRun(*dp*, ConvReg, Target, Source, Conversion, 1)
> ...
> }
>
>
>
> I've tried to read the jmainfunction.obj  as well where some other jbase
> related functions are mentioned but could not figure out any useful one...
>
> Maybe there is something I am missing or some non-documented function?
>
> Would appreciate any hints! :)
> Thanks
> Igor
>
> среда, 4 марта 2020 г., 8:11:30 UTC+1 пользователь 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 "Leeds United are Magic!"
>>
>> jbc -S lufc.b
>>
>> Then you will see the startup sequence for a standard executable and can
>> copy the code.
>>
>> However, my memory is vague, but I think that we had a C function you can
>> call to do what you are doing and that will return the dp for reuse. It
>> get's passed to subroutines for instance.
>>
>> Perhaps you can post the code you currently have.
>>
>> Jim
>>
>> On Wed, Mar 4, 2020 at 3: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 created in jshell (and gets removed automatically
>>> after the code has been executed).
>>>
>>> So I am wondering: is there a possibility to retrieve and use the
>>> current session DP somehow? So that no child session would get created
>>>
>>> Any advice would be highly appreciated
>>>
>>> Thanks in advance
>>>
>>>
>>> PS: to the admin, it is actually a jBase related question rather than
>>> TAFC. Thanks
>>>
>>>
>>> Kind regards,
>>> Igor
>>>
>>> --
>>> --
>>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>>
>>> To post, send email to jb...@googlegroups.com
>>> To unsubscribe, send email to jbase-un...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/jBASE?hl=en
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "jBASE" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jb...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jbase/73153581-25ae-493a-95f6-8afc5cdf7813%40googlegroups.com
>>> 
>>> .
>>
>>
>>> --
> --
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>
> To post, send email to jBASE@googlegroups.com
> To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/jBASE?hl=en
>
> ---
> You received this message because you are 

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. What I learned about the DP is that every subroutine is passed the
DP as the first argument so you do not need to initialise it again - just
pass it on.

I achieved my objective by compiling and cataloging a duplicate routine and
making sure that my duplicate routine was in a search path that was found
first before the existing routine. I would then call dllsym function below
passing it the actual shared library file name that contained the original
routine name (dll_name) and the name of the original subroutine (rtn_name)
and the arguments in VAR*,  (Note that I had typedef int (*fptrXX) for
upto 20 arguments which was more than enough for all the subroutines I
wanted to debug).

dlopen/dlsym system calls were key functions in this piece of code. In my
case, the original jbase session was already started and from there, calls
could be exchanged between jBC and C any number of times by just passing
the DP along.

Hope it helps, Marco.

#include 
#include 
#include 

typedef int (*fptr)(struct jBASEDataAreas *dp, char *);
typedef int (*fptr1)(struct jBASEDataAreas *dp, char *, VAR *);
typedef int (*fptr2)(struct jBASEDataAreas *dp, char *, VAR *, VAR *);
typedef int (*fptr3)(struct jBASEDataAreas *dp, char *, VAR *, VAR *, VAR
*);
typedef int (*fptr4)(struct jBASEDataAreas *dp, char *, VAR *, VAR *, VAR
*, VAR *);

INT32 dllsym(struct jBASEDataAreas *dp, char *dll_name, char *rtn_name,
char *vflags, VAR **arg)
{
   void *handle;
   fptr fun_ptr;

   int numargs = strlen(vflags);

   handle = dlopen(dll_name, RTLD_LOCAL | RTLD_LAZY);
   if (!handle) {
  printf("dlopen('%s') failed!: %s\n ",dll_name, dlerror());
  return 1;
   }

   *(void **)(_ptr) = dlsym(handle, rtn_name);
   if (fun_ptr == NULL) {
  printf("dlsym('%s', '%s') failed!: %s\n", dll_name, rtn_name,
dlerror());
  dlclose(handle);
  return 1;
   }
   switch(numargs) {
   case 0:
  (*fun_ptr)(dp, vflags);
  break;
   case 1:
  (*(fptr1)fun_ptr)(dp, vflags, arg[0]);
  break;
   case 2:
  (*(fptr2)fun_ptr)(dp, vflags, arg[0], arg[1]);
  break;
   case 3:
  (*(fptr3)fun_ptr)(dp, vflags, arg[0], arg[1], arg[2]);
  break;
   case 4:
  (*(fptr4)fun_ptr)(dp, vflags, arg[0], arg[1], arg[2], arg[3]);
  break;
   }
   dlclose(handle);
   return 0;
}


On Wed, 4 Mar 2020 at 17:05, Igor Osmolovskiy  wrote:

> 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 this excessive session is something would be good to get rid of.
>
> I've applied jbc -S myrtn.b for a simple code already which results in
> producing 2 files: myrtn.c and the myrtn.j, the latter one being included
> into the .c one via #include "myrtn.j".
> But in the .j file already we can see the lines like
> #define DEF_SEL_VAR JLibReturnDefaultSelect(dp) /* Default select
> list for this program */
> #define DEF_FILE_VAR JLibReturnDefaultFile(dp) /* Default file
> descriptor for this program */
>
> i.e. dp is supposed to be initialized already by the moment myrtn is
> called.
>
> I've managed to find the next dp related functions mentioned in some
> libraries
> jbase_getdp() - this works, i.e. initializes dp, but creates a new session
> jbase_getdp_nocreate() - not working if called alone. but it works and
> returns the dp1 value when called after jbase_getdp(), and dp1 = dp in
> this case
> jbase_getdpEX() - not sure what it should do
> jbase_setdpEX() - not sure what it should do
>
>
> Please see the sample piece of code
>
> #include 
> extern "C" DPSTRUCT *jbase_getdp();
>
> ...
>
> PyMODINIT_FUNC
> jbc_oconv(PyObject*, PyObject* _args)
> {
> ...
> DPSTRUCT *dp = jbase_getdp();
> OCONV_B(result, tmp, VarHelper(arg1), VarHelper(arg2));  // this if
> defined in jsystem.h as   #define OCONV_B(Target, ConvReg, Source,
> Conversion) JLibGConvRun(*dp*, ConvReg, Target, Source, Conversion, 1)
> ...
> }
>
>
>
> I've tried to read the jmainfunction.obj  as well where some other jbase
> related functions are mentioned but could not figure out any useful one...
>
> Maybe there is something I am missing or some non-documented function?
>
> Would appreciate any hints! :)
> Thanks
> Igor
>
> среда, 4 марта 2020 г., 8:11:30 UTC+1 пользователь 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 

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* arr[],Py_ssize_t size, PyObject *args) {
/* Get arbitrary number of strings from Py_Tuple */
Py_ssize_t i;
PyObject *temp_p, * pyStr;

temp_p = PyTuple_GetItem(args,i);
if(temp_p == NULL) {return 0;}
char *ptr = PyUnicode_AsUTF8AndSize(temp_p, );
arr[i] = strdup(ptr);
}
return 1;
}

static PyObject * jbasepy_callsub(PyObject *self, PyObject *args)
{
struct jBASEDataAreas *dp;

dp = jbase_getdpEX(NULL,NULL,1,NULL);
if (dp != NULL)
{
char * subroutineName;
Py_ssize_t TupleSize = PyTuple_Size(args);
char ** all_args = malloc(TupleSize * sizeof(char*));
PyObject * list_out;
if (ParseArguments(all_args, TupleSize, args))
{
subroutineName = all_args[0];
int (*subptr)() = JediObjectFindFunction(dp,
subroutineName, 2);
if (subptr != NULL)
{
int i;
char V[256];
memset (V, 'V', TupleSize-1);
V[TupleSize-1] = '\0';  /* null terminate.
*/
VAR *varArg, **varArgs =
malloc((TupleSize-1) * sizeof(VAR*));
for(i = 1; i < TupleSize; ++i)
{
varArgs[i-1] = malloc(sizeof(VAR));
varArg = varArgs[i-1];
VAR_INITIALISE_VB(varArg);

STORE_VBS(varArg,(STRING*)all_args[i]);
}
list_out =
PyUnicode_FromString((char*)CONV_SFB(varArgs[0]));
for(i = 1; i < TupleSize; ++i)
{
VAR * varArg = varArgs[i-1];
VAR_RELEASE_VB(varArg);
free(varArgs[i-1]);
free(all_args[i]);
}
free(all_args[0]);
char V[256];
memset (V, 'V', TupleSize-1);
V[TupleSize-1] = '\0';  /* null terminate.
*/
VAR *varArg, **varArgs =
malloc((TupleSize-1) * sizeof(VAR*));
for(i = 1; i < TupleSize; ++i)
{
varArgs[i-1] = malloc(sizeof(VAR));
varArg = varArgs[i-1];
VAR_INITIALISE_VB(varArg);

STORE_VBS(varArg,(STRING*)all_args[i]);
}
subptr(dp, V, varArgs[0], varArgs[1],
varArgs[2], varArgs[3], varArgs[4], varArg
s[5], varArgs[6], varArgs[7], varArgs[8], varArgs[9]);
list_out =
PyUnicode_FromString((char*)CONV_SFB(varArgs[0]));
for(i = 1; i < TupleSize; ++i)
{
VAR * varArg = varArgs[i-1];
VAR_RELEASE_VB(varArg);
free(varArgs[i-1]);
free(all_args[i]);
}
free(all_args[0]);
free(all_args);
free(varArgs);
return list_out;
}
else
{
return PyUnicode_FromString("Subroutine not
found");
}
}
return PyUnicode_FromString("Error parsing arguments");
}
return PyUnicode_FromString("Failed to initialise jBASE");
}

static PyMethodDef jbasepy_methods[] = {
{"callsub", (PyCFunction)jbasepy_callsub, METH_VARARGS,
PyDoc_STR("call jBASE subroutine")},

On Wed, Mar 4, 2020 at 12:08 PM Peter Falson  wrote:

> 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 variable types are required in this case. So 

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 variable types are required in this case. So all the 
> transformations from PythonObj to a C type is required for each argument. 
> Also in many cases polymorphismе would be required as JBC arguments often 
> assume different types.
> 2. building a python library via distutils and working with PythonObj only. 
> As I've mentioned already this works but was not able to get rid of the 
> additional session being created at the step of "import lib" in python code.
> 
> среда, 4 марта 2020 г., 16:11:12 UTC+1 пользователь pfalson написал:
>> 
>> 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 написал:
 
 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 created in jshell (and gets removed 
> automatically after the code has been executed).
> 
> So I am wondering: is there a possibility to retrieve and use the current 
> session DP somehow? So that no child session would get created
> 
> Any advice would be highly appreciated
> 
> Thanks in advance
> 
> 
> PS: to the admin, it is actually a jBase related question rather than 
> TAFC. Thanks
> 
> 
> Kind regards,
> Igor
> -- 
> -- 
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>  
> To post, send email to jb...@googlegroups.com
> To unsubscribe, send email to jbase-un...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jb...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/73153581-25ae-493a-95f6-8afc5cdf7813%40googlegroups.com.
>>> 
>>> -- 
>>> -- 
>>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>>  
>>> To post, send email to jb...@googlegroups.com
>>> To unsubscribe, send email to jbase-un...@googlegroups.com
>>> For more options, visit this group at 
>>> http://groups.google.com/group/jBASE?hl=en
>>> 
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "jBASE" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to jb...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jbase/5c46377f-4c68-4f50-a5fb-9d1d8164232b%40googlegroups.com.
> 
> -- 
> -- 
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>  
> To post, send email to jBASE@googlegroups.com
> To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbase+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/8ed5e66b-8076-495b-8b66-c7db7d4e8629%40googlegroups.com.

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/F16FECD2-1575-4ED5-B958-72A8ADB411CC%40gmail.com.


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 many cases polymorphismе would be required as JBC 
arguments often assume different types.
2. building a python library via distutils and working with PythonObj only. 
As I've mentioned already this works but was not able to get rid of the 
additional session being created at the step of "import lib" in python code.

среда, 4 марта 2020 г., 16:11:12 UTC+1 пользователь pfalson написал:
>
> 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 написал:
>>
>> 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 created in jshell (and gets removed automatically 
>> after the code has been executed).
>>
>> So I am wondering: is there a possibility to retrieve and use the current 
>> session DP somehow? So that no child session would get created
>>
>> Any advice would be highly appreciated
>>
>> Thanks in advance
>>
>>
>> PS: to the admin, it is actually a jBase related question rather than 
>> TAFC. Thanks
>>
>>
>> Kind regards,
>> Igor
>>
>> -- 
>> -- 
>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>  
>> To post, send email to jb...@googlegroups.com
>> To unsubscribe, send email to jbase-un...@googlegroups.com
>> For more options, visit this group at 
>> http://groups.google.com/group/jBASE?hl=en
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "jBASE" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jb...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jbase/73153581-25ae-493a-95f6-8afc5cdf7813%40googlegroups.com
>>  
>> 
>> .
>>
>> -- 
> -- 
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>  
> To post, send email to jb...@googlegroups.com 
> To unsubscribe, send email to jbase-un...@googlegroups.com 
> For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en
>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jb...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/5c46377f-4c68-4f50-a5fb-9d1d8164232b%40googlegroups.com
>  
> 
> .
>
>

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/8ed5e66b-8076-495b-8b66-c7db7d4e8629%40googlegroups.com.


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 написал:
>> 
>> 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 created in jshell (and gets removed automatically after 
>>> the code has been executed).
>>> 
>>> So I am wondering: is there a possibility to retrieve and use the current 
>>> session DP somehow? So that no child session would get created
>>> 
>>> Any advice would be highly appreciated
>>> 
>>> Thanks in advance
>>> 
>>> 
>>> PS: to the admin, it is actually a jBase related question rather than TAFC. 
>>> Thanks
>>> 
>>> 
>>> Kind regards,
>>> Igor
>>> -- 
>>> -- 
>>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>>  
>>> To post, send email to jb...@googlegroups.com
>>> To unsubscribe, send email to jbase-un...@googlegroups.com
>>> For more options, visit this group at 
>>> http://groups.google.com/group/jBASE?hl=en
>>> 
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "jBASE" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to jb...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jbase/73153581-25ae-493a-95f6-8afc5cdf7813%40googlegroups.com.
> 
> -- 
> -- 
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>  
> To post, send email to jBASE@googlegroups.com
> To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbase+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/5c46377f-4c68-4f50-a5fb-9d1d8164232b%40googlegroups.com.

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/E058F46A-17E6-4F97-9A47-3974BBC1EF1D%40gmail.com.


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 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 possibility to retrieve and use the current 
> session DP somehow? So that no child session would get created
>
> Any advice would be highly appreciated
>
> Thanks in advance
>
>
> PS: to the admin, it is actually a jBase related question rather than 
> TAFC. Thanks
>
>
> Kind regards,
> Igor
>
> -- 
> -- 
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>  
> To post, send email to jb...@googlegroups.com 
> To unsubscribe, send email to jbase-un...@googlegroups.com 
> For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en
>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jb...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/73153581-25ae-493a-95f6-8afc5cdf7813%40googlegroups.com
>  
> 
> .
>
>

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/5c46377f-4c68-4f50-a5fb-9d1d8164232b%40googlegroups.com.


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 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 "Leeds United are Magic!"
>
> jbc -S lufc.b
>
> Then you will see the startup sequence for a standard executable and can 
> copy the code. 
>
> However, my memory is vague, but I think that we had a C function you can 
> call to do what you are doing and that will return the dp for reuse. It 
> get's passed to subroutines for instance. 
>
> Perhaps you can post the code you currently have.
>
> Jim
>
> On Wed, Mar 4, 2020 at 3: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 created in jshell (and gets removed automatically 
>> after the code has been executed).
>>
>> So I am wondering: is there a possibility to retrieve and use the current 
>> session DP somehow? So that no child session would get created
>>
>> Any advice would be highly appreciated
>>
>> Thanks in advance
>>
>>
>> PS: to the admin, it is actually a jBase related question rather than 
>> TAFC. Thanks
>>
>>
>> Kind regards,
>> Igor
>>
>> -- 
>> -- 
>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>  
>> To post, send email to jb...@googlegroups.com 
>> To unsubscribe, send email to jbase-un...@googlegroups.com 
>> For more options, visit this group at 
>> http://groups.google.com/group/jBASE?hl=en
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "jBASE" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jb...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jbase/73153581-25ae-493a-95f6-8afc5cdf7813%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/010e8e45-627a-43a8-b48b-7582562a8116%40googlegroups.com.


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 this excessive session is something would be good to get rid of.

I've applied jbc -S myrtn.b for a simple code already which results in 
producing 2 files: myrtn.c and the myrtn.j, the latter one being included 
into the .c one via #include "myrtn.j". 
But in the .j file already we can see the lines like
#define DEF_SEL_VAR JLibReturnDefaultSelect(dp) /* Default select list 
for this program */
#define DEF_FILE_VAR JLibReturnDefaultFile(dp) /* Default file 
descriptor for this program */

i.e. dp is supposed to be initialized already by the moment myrtn is called.

I've managed to find the next dp related functions mentioned in some 
libraries
jbase_getdp() - this works, i.e. initializes dp, but creates a new session
jbase_getdp_nocreate() - not working if called alone. but it works and 
returns the dp1 value when called after jbase_getdp(), and dp1 = dp in this 
case
jbase_getdpEX() - not sure what it should do
jbase_setdpEX() - not sure what it should do   


Please see the sample piece of code

#include 
extern "C" DPSTRUCT *jbase_getdp();

...

PyMODINIT_FUNC
jbc_oconv(PyObject*, PyObject* _args)
{
...
DPSTRUCT *dp = jbase_getdp();
OCONV_B(result, tmp, VarHelper(arg1), VarHelper(arg2));  // this if 
defined in jsystem.h as   #define OCONV_B(Target, ConvReg, Source, 
Conversion) JLibGConvRun(*dp*, ConvReg, Target, Source, Conversion, 1)
...
}



I've tried to read the jmainfunction.obj  as well where some other jbase 
related functions are mentioned but could not figure out any useful one...

Maybe there is something I am missing or some non-documented function?

Would appreciate any hints! :)
Thanks
Igor

среда, 4 марта 2020 г., 8:11:30 UTC+1 пользователь 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 "Leeds United are Magic!"
>
> jbc -S lufc.b
>
> Then you will see the startup sequence for a standard executable and can 
> copy the code. 
>
> However, my memory is vague, but I think that we had a C function you can 
> call to do what you are doing and that will return the dp for reuse. It 
> get's passed to subroutines for instance. 
>
> Perhaps you can post the code you currently have.
>
> Jim
>
> On Wed, Mar 4, 2020 at 3: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 created in jshell (and gets removed automatically 
>> after the code has been executed).
>>
>> So I am wondering: is there a possibility to retrieve and use the current 
>> session DP somehow? So that no child session would get created
>>
>> Any advice would be highly appreciated
>>
>> Thanks in advance
>>
>>
>> PS: to the admin, it is actually a jBase related question rather than 
>> TAFC. Thanks
>>
>>
>> Kind regards,
>> Igor
>>
>> -- 
>> -- 
>> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>>  
>> To post, send email to jb...@googlegroups.com 
>> To unsubscribe, send email to jbase-un...@googlegroups.com 
>> For more options, visit this group at 
>> http://groups.google.com/group/jBASE?hl=en
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "jBASE" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jb...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jbase/73153581-25ae-493a-95f6-8afc5cdf7813%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/c010b5b5-199a-42b8-a7fa-2b351052c29f%40googlegroups.com.


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 "Leeds United are Magic!"

jbc -S lufc.b

Then you will see the startup sequence for a standard executable and can
copy the code.

However, my memory is vague, but I think that we had a C function you can
call to do what you are doing and that will return the dp for reuse. It
get's passed to subroutines for instance.

Perhaps you can post the code you currently have.

Jim

On Wed, Mar 4, 2020 at 3: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 created in jshell (and gets removed automatically
> after the code has been executed).
>
> So I am wondering: is there a possibility to retrieve and use the current
> session DP somehow? So that no child session would get created
>
> Any advice would be highly appreciated
>
> Thanks in advance
>
>
> PS: to the admin, it is actually a jBase related question rather than
> TAFC. Thanks
>
>
> Kind regards,
> 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 jbase-unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/jBASE?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jbase+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jbase/73153581-25ae-493a-95f6-8afc5cdf7813%40googlegroups.com
> 
> .
>

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/CAGPPfg8zzGaA%3Dizs%3DL-DJJgrfzJ2BaenCBdtNOfMRD_HX6XvUg%40mail.gmail.com.


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 created in jshell (and gets removed automatically after the 
> code has been executed).
> 
> So I am wondering: is there a possibility to retrieve and use the current 
> session DP somehow? So that no child session would get created
> 
> Any advice would be highly appreciated
> 
> Thanks in advance
> 
> 
> PS: to the admin, it is actually a jBase related question rather than TAFC. 
> Thanks
> 
> 
> Kind regards,
> 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 jbase-unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/jBASE?hl=en
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jbase+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jbase/73153581-25ae-493a-95f6-8afc5cdf7813%40googlegroups.com.

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jbase/CBAA340C-20E0-405C-ACC5-948C232B1CD6%40gmail.com.