[Info-vax] Access to _all_ VMS system services and library functions from DCL ?
mcleanjoh at gmail.com
mcleanjoh at gmail.com
Mon Jul 10 04:26:00 EDT 2017
On Monday, July 10, 2017 at 10:09:47 AM UTC+10, Arne Vajhøj wrote:
> On 7/9/2017 7:59 PM, Craig A. Berry wrote:
> > On 7/8/17 8:39 PM, Arne Vajhøj wrote:
> >> On 7/8/2017 4:09 PM, Simon Clubley wrote:
> >>> On 2017-07-07, Arne Vajhøj <arne at vajhoej.dk> wrote:
> >>>> On 4/4/2017 2:21 PM, Simon Clubley wrote:
> >>>>> As mentioned in my original post, some aspects might be challenging
> >>>>> in DCL as it stands today. For example, how do you marshall an
> >>>>> itemlist as seen by DCL into an itemlist directly usable by VMS ?
>
> >>>> It requires some tweaking, but it is possible.
>
> > It's very nice that Javascript can do this sort of thing on VMS. I
> > assume anything based on the JVM could do something similar?
>
> Yes.
>
> I would actually have preferred to use Jython (JVM Python), but
> I had problems getting it to run, so I ended up using JavaScript.
> But the Jython problems could probably be sorted out. JRuby and
> Groovy are other options.
>
> > I have to say, though, that this is very low-level and frankly looks
> > like a lot of work. Dealing with item lists in something called a
> > scripting language doesn't really appeal to me. This can of course be
> > solved by writing wrapper code, which other languages have already done.
> > So why not just use DCL or various other solutions so that you do not
> > have to construct item lists in order to retrieve an item available from
> > $GETJPI?
>
> I only showed the item list example to demonstrate that it could be done.
>
> >> Original version was primarily to show item lists working:...
> >> $ type itmlst3.js
> >> load("vms.js");
> >>
> >> var res = syssrv.SYS$GETJPIW(0,["PID","USERNAME"]);
> >> var sts = res.getStatus();
> >> var pinfo = res.getResult();
> >> printf("sts=%.0f pid=%.0f usrnam=%s\n", sts, pinfo.PID, pinfo.USERNAME);
>
> This is the version that I think would be used.
>
> Maybe it can be further improved, but that is where I am now.
>
> Yes - wrapper code need to be written. But it is not so much -
> 5-20 lines of code per function.
>
> And because it is reusable from multiple languages then
> I think it is a decent investment.
>
> Arne
I'm sure we've been around this block on other occasions but given how memory has expanded enormously since VMS v1.0, why not simply return ALL the relavent data in one large data structure and let the users deal with whatever fields they want to use?
I'm sure there's some smarts in the processing of what might be multiple item codes but simply copying all the relevant data into a single data structure for the user has to surely be the simplest.
More information about the Info-vax
mailing list