Discussion:
Enhancement suggestion: Wildcard delete on DELETE/ENTRY ?
(too old to reply)
Simon Clubley
2021-04-29 01:21:00 UTC
Permalink
Can we please have a wildcard delete option for DELETE/ENTRY in
future versions of VMS ?

Something like /user=<username>, /before and /after are the kinds
of things I am thinking of.

Getting a little annoyed with listing entry numbers one by one
while deleting some test entries... :-)

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Phillip Helbig (undress to reply)
2021-04-29 05:49:26 UTC
Permalink
Post by Simon Clubley
Can we please have a wildcard delete option for DELETE/ENTRY in
future versions of VMS ?
Good idea. While you're at it, allow the job name and not just the
entry number. :-|
Post by Simon Clubley
Something like /user=<username>, /before and /after are the kinds
of things I am thinking of.
Getting a little annoyed with listing entry numbers one by one
while deleting some test entries... :-)
You can, of course, delete many entries at once with a list. :-)
Simon Clubley
2021-04-29 12:06:40 UTC
Permalink
Post by Phillip Helbig (undress to reply)
Post by Simon Clubley
Getting a little annoyed with listing entry numbers one by one
while deleting some test entries... :-)
You can, of course, delete many entries at once with a list. :-)
That's what I am doing but I still have find and type in every single
entry number.

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Phillip Helbig (undress to reply)
2021-04-29 13:38:45 UTC
Permalink
Post by Simon Clubley
Post by Phillip Helbig (undress to reply)
Post by Simon Clubley
Getting a little annoyed with listing entry numbers one by one
while deleting some test entries... :-)
You can, of course, delete many entries at once with a list. :-)
That's what I am doing but I still have find and type in every single
entry number.
That's what DCL scripts and F$GETQUI are for. :-)
Arne Vajhøj
2021-04-29 14:57:06 UTC
Permalink
Post by Phillip Helbig (undress to reply)
Post by Simon Clubley
Post by Phillip Helbig (undress to reply)
Post by Simon Clubley
Getting a little annoyed with listing entry numbers one by one
while deleting some test entries... :-)
You can, of course, delete many entries at once with a list. :-)
That's what I am doing but I still have find and type in every single
entry number.
That's what DCL scripts and F$GETQUI are for. :-)
If all jobs then it should be relative simple.

Untested copy paste and edit:

$ tmp=f$getqui("DISPLAY_QUEUE","QUEUE_NAME",p1,"WILDCARD")
$ loop:
$ ent=f$getqui("DISPLAY_JOB","ENTRY_NUMBER",,"ALL_JOBS")
$ if ent .eqs. "" then goto endloop
$ delete/ent='ent'
$ goto loop
$ endloop:

True wildcard match with the option of before and after is a little
more tricky and switching to another language than DCL may be
better.

Arne
David Jones
2021-04-29 13:19:36 UTC
Permalink
Post by Simon Clubley
Can we please have a wildcard delete option for DELETE/ENTRY in
future versions of VMS ?
My vms_getqui extension for SQLite, which maps VMS queues to SQLite
virtual tables, lets you use wildcards:

$ sqlite3 queue_vtabs.db
SQLite version 3.35.2 2021-03-17 19:07:21
Enter ".help" for usage hints.
sqlite> .schema hp1200
CREATE VIRTUAL TABLE hp1200 using vms$entries('hp1200','after_time')
/* hp1200(jobnum,username,file,flags,status,jobname,p1,after_time) */;
sqlite> .mode column
sqlite> select jobnum,username,status,jobname from hp1200;
jobnum username status jobname
------ -------- ------- -----------------
426 JONESD holding zipfile_extension
426 JONESD holding zipfile_extension
590 JONESD holding test_insert
591 JONESD holding test_insert
595 JONESD holding test_insert
sqlite> delete from hp1200 where username='JONESD' and jobnum like '59%';

Job test_insert (queue HP1200, entry 591) terminated with error status
%JBC-F-JOBDELETE, job deleted before execution
sqlite> select jobnum,username,status,jobname from hp1200;
jobnum username status jobname
------ -------- ------- -----------------
426 JONESD holding zipfile_extension
426 JONESD holding zipfile_extension
sqlite>

The hp1200 table has 2 rows with jobnum 426 because job 426 has 2 files (one
row for each file). Of the 3 deleted jobs, only 591 was submitted /notify.
Tim Sneddon
2021-04-30 02:46:05 UTC
Permalink
Post by David Jones
Post by Simon Clubley
Can we please have a wildcard delete option for DELETE/ENTRY in
future versions of VMS ?
My vms_getqui extension for SQLite, which maps VMS queues to SQLite
This is brilliant. Have you done any others? Is the source code
available?

Regards, Tim.
David Jones
2021-04-30 07:48:29 UTC
Permalink
This is brilliant. Have you done any others? Is the source code
available?
Source kits are at https://sourceforge.net/projects/vms-ports/files/

Of the few others I've done, the extension I find most handy is vms$cvtime()
---------------------------------------------------------------
$ sqlite3/help

Information available:

Building Extensions SQLITE_library SQLITE_shell

Topic? extensions

EXTENSIONS

Extensions are shareable image files that are dynamically loaded by the
application to provide additional functions for SQL statements. To load
an extension from the shell program use the .load command (.exe file
type must be explicitly specified). To load the extension from an
application, see the documentation for the sqlite3_load_extension() function.



Additional information available:

VMS$cvtime VMS$date_format VMS$entries VMS$queues zipfile
xlsxvtab

EXTENSIONS Subtopic? vms*

EXTENSIONS

VMS$cvtime

Function to mimic the OpenVMS DCL F$CVTIME() lexical function. The
function is implemented using OpenVMS functions SYS$ASCTIM(), SYS$BINTIM(),
SYS$NUMTIM(), LIB$CONVERT_DATE_STRING, and LIB$FORMAT_DATE_TIME().

Extension filename: vms_time.exe

Format:
VMS%cvtime(time,[output_format[,output_field]])



Additional information available:

time output_format output_field


EXTENSIONS

VMS$date_format

Function to modify how VMS$cvtime parses and formats date strings by
creating a context to use with the LIB$CONVERT_DATE_STRING() and
LIB$FORMAT_DATE_TIME() functions called by VMS$cvtim().

Extension filename: vms_time.exe

Format:
VMS%date_format(component,...])



Additional information available:

component ... eponymous_virtual_table example


EXTENSIONS

VMS$entries

Virtual table function to present an OpenVMS queue's entries as table
data. Note that the same extension file provides both this function and
VMS$queues().

Extension filename: vms_getqui.exe

Format:
CREATE VIRTUAL TABLE table_name USING VMS$entries(queue,[item,...])

Result columns:
entries(jobnum INTEGER KEY, username TEXT, file TEXT, flags TEXT,
status TEXT, jobname TEXT, P1 TEXT [, item-type[,...]]);



Additional information available:

queue_name items data_conversion


EXTENSIONS

VMS$queues

Virtual table function to present OpenVMS queue manager queues as table
data. Note that the same extension file provides both this function and
VMS$entries().

Extension filename: vms_getqui.exe

Format:
CREATE VIRTUAL TABLE table-name USING VMS$queues([item,...])

Result columns:
queues(name TEXT PRIMARY KEY, type TEXT, state TEXT,
node TEXT [, item-type[,...]]) WITHOUT ROWID;


Additional information available:

items item-suffixes
Dave
Stephen Hoffman
2021-04-29 14:25:37 UTC
Permalink
Can we please have a wildcard delete option for DELETE/ENTRY in future
versions of VMS ?
As we slowly half-ass our way toward a scatter-shot job scheduler with
marvelously inconsistent syntax, one enhancement request at a time.
--
Pure Personal Opinion | HoffmanLabs LLC
Dave Froble
2021-04-29 16:28:41 UTC
Permalink
Post by Stephen Hoffman
Can we please have a wildcard delete option for DELETE/ENTRY in future
versions of VMS ?
As we slowly half-ass our way toward a scatter-shot job scheduler with
marvelously inconsistent syntax, one enhancement request at a time.
I find the original request interesting. Nor do I see how any job
scheduler would help. If specific tasks need to be performed, then one
must know enough to select the task. Or, if wanting to clear the queue,
just delete the entire queue and re-create it.

Perhaps too lazy to "just do it" ??

My "wildcard" technique is simply "uparrow",change the entry, and
<return>. Perhaps used 2-3 times in many years?
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: ***@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
Loading...