--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
---
You received this message because you are subscribed to the Google Groups "Pick and MultiValue Databases" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mvdbms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/d9f0c739-8798-4f4e-a7cc-a20b5e7e380fn%40googlegroups.com.
IF GETENV(\JBCRELEASEDIR\,JBCRELEASEDIR) THEN
CRT \JBCRELEASEDIR=\:JBCRELEASEDIR
END
Result:
jsh JBASEADM ~ -->TEST
JBCRELEASEDIR=C:\jBASE\6.1.2
jsh JBASEADM ~ -->
--
myOsCommand = \echo whatever\
EXECUTE @IM:\k\:myOsCommand
From: mvd...@googlegroups.com <mvd...@googlegroups.com> On Behalf Of Mike Yates
Sent: Friday, October 18, 2024 10:10 AM
To: Pick and MultiValue Databases <mvd...@googlegroups.com>
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/d5ce30b3-bd9f-41c1-9a17-58d806512117n%40googlegroups.com.
An EXECUTE without the os shell escape (prefix @AM:\k\) will cause the command to be executed by the jsh (TCL) not by the OS shell.
Therefore, shell expansions like $ would not work, because jsh doesn’t do that.
Once you prefix the command with the shell escape (like universe’s sh -c, or D3’s !), it will work.
But I’d use the inbuilt GETENV function if all you’re trying to do is to get the value of an env variable.
Best,
Bruce
Remember too that depending on the release of jBASE, and the way the user has configured preferences, you might see things in /bin you might want to ignore.
For example, on Windows, each verb may end in .exe (e.g. sort.exe), because jBASE exposes all the verbs as actual O/S binaries (executables).
Also, for efficiency, depending on the release you’re on, jBASE may also produce a shared library version of that command. For example, on Windows you’ll see sort.exe and a sort.dll).
On linux, you may find both a sort and sort.so (shared object).
Just mentioning because you may want to structure your loop to filter out the extensions and dups to make it work on all jBASE systems, regardless of release or customer configuration.
Bruce Decker
From: bdeck...@gmail.com <bdeck...@gmail.com>
Sent: Friday, October 18, 2024 10:12 AM
To: mvd...@googlegroups.com
It is very useful indeed. If you need to support older releases of jBASE, just verify that some of these capabilities were in the older release. For example, here’s a slick way to get a list of files in jBASE using jBASE dynamic objects and inbuild class/methods:
$option jabba ; * enable object oriented basic
equ beautify to 5
mySystem = new object("$system") ; * instantiate system object
mySystem->getfiles() ; * use getfiles method of system object
crt mySystem->$tojson(beautify) ; * convert file list to json with tojson inbuilt method.
And the output would look like this:
jsh JBASEADM ~ -->GETFILES
{
"filepath":[
"C:\\jBASE\\JBASEADM\\MD]D",
"C:\\jBASE\\JBASEADM",
"."
],
"files":[
{
"fullpath":"C:\\jBASE\\JBASEADM\\MD]D",
"directory":"C:\\jBASE\\JBASEADM\\MD]D",
"name":"MD",
"index":0
},
{
"fullpath":"C:\\jBASE\\JBASEADM\\MD]D",
"directory":"C:\\jBASE\\JBASEADM\\MD]D",
"name":"MD",
"index":0
},
{
"fullpath":"C:\\jBASE\\SYSTEM]D",
"directory":"C:\\jBASE\\JBASEADM\\MD]D",
"name":"SYSTEM",
"index":0
},
{
"fullpath":"C:\\jBASE\\JBASEADM\\bin",
"directory":"C:\\jBASE\\JBASEADM",
"name":"bin",
"index":1
},
{
"fullpath":"C:\\jBASE\\JBASEADM\\BP",
"directory":"C:\\jBASE\\JBASEADM",
"name":"BP",
"index":1
},
{
"fullpath":"C:\\jBASE\\JBASEADM\\BP]D",
"directory":"C:\\jBASE\\JBASEADM",
"name":"BP]D",
"index":1
},
{
"fullpath":"C:\\jBASE\\JBASEADM\\BP]MOBJECT",
"directory":"C:\\jBASE\\JBASEADM",
"name":"BP]MOBJECT",
"index":1
},
{
"fullpath":"C:\\jBASE\\JBASEADM\\lib",
"directory":"C:\\jBASE\\JBASEADM",
"name":"lib",
"index":1
},
{
"fullpath":"C:\\jBASE\\JBASEADM\\MD]D",
"directory":"C:\\jBASE\\JBASEADM",
"name":"MD]D",
"index":1
},
{
"fullpath":"C:\\jBASE\\JBASEADM\\PROC",
"directory":"C:\\jBASE\\JBASEADM",
"name":"PROC",
"index":1
},
{
"fullpath":"C:\\jBASE\\JBASEADM\\PROC]D",
"directory":"C:\\jBASE\\JBASEADM",
"name":"PROC]D",
"index":1
},
{
"fullpath":".\\bin",
"directory":".",
"name":"bin",
"index":2
},
{
"fullpath":".\\BP",
"directory":".",
"name":"BP",
"index":2
},
{
"fullpath":".\\BP]D",
"directory":".",
"name":"BP]D",
"index":2
},
{
"fullpath":".\\BP]MOBJECT",
"directory":".",
"name":"BP]MOBJECT",
"index":2
},
{
"fullpath":".\\lib",
"directory":".",
"name":"lib",
"index":2
},
{
"fullpath":".\\MD]D",
"directory":".",
"name":"MD]D",
"index":2
},
{
"fullpath":".\\PROC",
"directory":".",
"name":"PROC",
"index":2
},
{
"fullpath":".\\PROC]D",
"directory":".",
"name":"PROC]D",
"index":2
}
]
}
You just want to be sure your target audience is on a later release of jBASE where all of these goodies are available.
Best,
Bruce
From: mvd...@googlegroups.com <mvd...@googlegroups.com> On Behalf Of Mike Yates
Sent: Friday, October 18, 2024 10:38 AM
To: Pick and MultiValue Databases <mvd...@googlegroups.com>
Subject: Re: [mvdbms] Re: jBase: listing of files and verbs in jBasic
Thanks, bdeck, but meanwhile I found "config-strings" which will be useful in other ways in "Pick Explorer":-
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/982be898-b894-4015-a36a-59ae46ae0cebn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/d5ce30b3-bd9f-41c1-9a17-58d806512117n%40googlegroups.com.
--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
---
You received this message because you are subscribed to the Google Groups "Pick and MultiValue Databases" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mvdbms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/6830799f-40be-42b0-8173-322b2e3c2cb4%40youngman.org.uk.
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/7ec68c57-389a-4d02-8187-aa72f00550dbn%40googlegroups.com.
--
You received this message because you are subscribed to
the "Pick and MultiValue Databases" group.
To post, email to: mvd...@googlegroups.com
To unsubscribe, email to: mvdbms+un...@googlegroups.com
For more options, visit http://groups.google.com/group/mvdbms
---
You received this message because you are subscribed to a topic in the Google Groups "Pick and MultiValue Databases" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mvdbms/tGt6f2AnM5s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mvdbms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mvdbms/befba790-09fe-413f-af79-d7313c84310f%40youngman.org.uk.