Re: Getting the jBase DP (data pointer) of the current session when using pure C
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: 3.10 and Windows 10
We have recently updated our download page at Zumasys making it easier to get a developer/demo copy of jBase 5.7. We have also released a quick start video on how to get started on windows 10 with jBASE. https://www.youtube.com/watch?v=Z-K9YcDiGiU - Video https://www.zumasys.com/downloads - Downloads and eval/license request It shouldn't be too difficult to port your application from jBASE 3.2 to jBASE 5.7.1. jBASE 5.7.1 now supports using the Visual Studio as the compiler including the community edition. On Thursday, February 7, 2019 at 5:55:05 AM UTC-8, Dave Grenfell wrote: > > Good Morning all: > > > > I see that M$ is working up to the point of no support or upgrades to > Windows 7. Since my application is running on jbase 3.10 on Windows 7, I > assume that I would have to port it over to Windows 10. Does any-one else > have 3.10 running on Windows 10 ? > > > > Perhaps , since I have not actively used my app or upgraded in at least 5 > years, I should just deposit it in the round file. > > > > I there a new to Jbase programmer who could benefit from reviewing code of > a system that was running bug free, to begin your career, contact me here. > > > > System included, ICS, a/r, a/p, customer service module, delivery module > -- -- 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. For more options, visit https://groups.google.com/d/optout.
Re: Issue with umask and openseq
Jose, OPENSEQ if it creates the file does not use umask but instead always does it with a mode 0666 which is the behavior you are seeing. Unfortunately there is no overriding mask option. You can although create the file first using the unix command touch which will create it according to your umask and then use OPENSEQ to open the file. On Wednesday, December 12, 2018 at 9:13:51 PM UTC-8, Jose L wrote: > > Hello, > we are running into some issues with files created with OPENSEQ. We are > using Jbase 5.11 over Solaris 10, and we have setup umask 002, in order to > avoid files being writable by others. It works fine if I create a new file > by doing > > jsh miaeod ~ -->touch test2.txt > jsh miaeod ~ -->ls -lrt test1.txt > -rw-rw-r-- 1 miaeod tafc 0 Dec 12 22:56 test2.txt > > but if I write a program that just creates a file and closes it, the file > is created with permissions for others to read > jsh miaeod ~ -->CT DEV.BP TEST.OPENSEQ > TEST.OPENSEQ > 001 PROGRAM TEST.OPENSEQ > 002 FILE.NAME = "test.txt" > 003 OPENSEQ FILE.NAME TO FILE.CREATED ELSE CREATE FILE.CREATED ELSE > DISPLAY 'ERROR CREATING TABLE' ; STOP > 004 WEOFSEQ FILE.CREATED > 005 CLOSESEQ FILE.CREATED > 006 RETURN > 007 END > > jsh miaeod ~ -->TEST.OPENSEQ > jsh miaeod ~ -->ls -lrt test.txt > -rw-rw-rw- 1 miaeod tafc 0 Dec 12 22:56 test.txt > >What could be the issue? > > thanks > > JL > > -- -- 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. For more options, visit https://groups.google.com/d/optout.
Re: Creating an index on a multi-part key
Hey Rick, I am wondering if it is getting confused. I like to create the index against the actual dictionary and see what jBase does automatically. In your case I made another dictionary in which attribute 8 is a;3:"*":4 <-- This should be faster than using the N features. Then I did a create-index sched.detail jBase created as such Notice: Command converted to 'CREATE-INDEX NW.ORDERS TEST.INDEX BY ICONV(0,\A;3:"*":4\)' I did a test select and it did use the index. With more complicated indexes such as this I prefer to do it off the dictionary as it makes jBase better guess that it has a index to use. On Thursday, September 27, 2018 at 10:19:36 AM UTC-4, Rick Weiser wrote: > > So, I looked at the manual and found that I can create the index by > combining the fields. This is what I used and the error that I got. What > am I missing? > > jsh SBPF ~ -->CREATE-INDEX SCHED.DETAIL SCD.CLIENT.DATE BY 3 : "*" : 4 > Multi-Value error. You have defined an index specification that > causes problems with multi-value fields. You have defined 2 multi-value > extractions and 1 single-value extractions. The rule is that you can > only have a total extraction count of 1 for multi-value index keys, > although all the > single-value extractions only count as 1. In your definition therefore > the total extraction count equates to a value of 3. Use the (M) or -m > options to define an index definition that is not multi-value. > C:\Accounts\SBPFDATA\SCHED.DETAIL: Invalid argument > > On Wednesday, September 26, 2018 at 5:54:52 PM UTC-4, Rick Weiser wrote: >> >> Hi guys, >> >> I tried looking this up on the knowledgebase but nothing came up for >> CREATE-INDEX. >> >> I need to create an index on a correlative that looks like the following: >> >> 001 S >> 002 0 >> 003 >> 004 >> 005 >> 006 >> 007 >> 008 A;N(SCD.CLIENT) : "*" : N(SCD.DATE) >> 009 L >> 010 10 >> >> Client is attr<3> and Date is attr<4> of the same file. >> >> What would my create-index look like? >> >> Thanks, >> >> Rick >> > -- -- 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. For more options, visit https://groups.google.com/d/optout.