[Info-vax] DCL's flaws (both scripting and UI)
Jan-Erik Soderholm
jan-erik.soderholm at telia.com
Tue Jan 20 07:39:03 EST 2015
Craig A. Berry skrev den 2015-01-20 02:25:
> On 1/19/15 6:49 AM, Jan-Erik Soderholm wrote:
>> Matthew H McKenzie skrev den 2015-01-19 08:29:
>>> He has,
>>>
>>> I think a port of python would probably go a long way towards resolving
>>> these.
>>
>> Available today.
>> http://www.vmspython.org/doku.php
>>
>>
>>> - abstracting too, the system calls in wrappers.
>>
>> Available today (if you are still talkning about Python).
>>
>> Here is what the interface to SYSQUI looks like.
>> This lists all queues, all jobs in the queues
>> and the filename of all files in those jobs:
>>
>> ------------------------------------------------
>> from vms import queues
>> for q in queues.all_queues():
>> print "Queue: ", q.queue_name
>> for j in q.jobs():
>> print " Job: ", j.job_name
>> for f in j.files:
>> print " Name: ", f.specification
>> ------------------------------------------------
>>
>> Thats all.
>>
>> You can of course get all other information and
>> also "do" things like deleting jobs.
>
> And you can do all of that in Perl as well with the VMS::Queue module,
> which has been around for 17 years now. Here's something similar to the
> above Python example:
>
> use VMS::Queue;
>
> for my $j (VMS::Queue::entry_list()) {
> my $jinfo = VMS::Queue::entry_info($j);
> print "Queue: $$jinfo{QUEUE_NAME} Job: $$jinfo{JOB_NAME}\n";
> for my $f (VMS::Queue::file_list($j)) {
> print " File: $$f{FILE_SPECIFICATION}\n";
> }
> }
>
> It can also decode bitmaps for you, which F$GETQUI can't do.
>
Of course! :-)
I never said it could not be done in Perl. :-)
Maybe it is just me, but I prefer the Python syntax.
More clear and readable, IMHO...
The main point is that to do the same in DCL, you will
need a few more lines then aprox 6-7.
Jan-Erik.
More information about the Info-vax
mailing list