- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Submit com proc to batch que to run once a wee...
Operating System - OpenVMS
1748327
Members
3370
Online
108762
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2008 08:31 AM
05-21-2008 08:31 AM
Re: Submit com proc to batch que to run once a week?
As to the easiest way to resubmit a batch job exactly as it was submitted before using the new version of the batch command procedure, may I recommend that you use my DISPLAY_JOBS.COM for this task.
As documented in the help text output with
$ @DISPLAY_JOBS ?
This one-liner will resubmit batch job entry 123 using a new version of its batch command procedure and kill the old job:
$ PIPE @DISPLAY_JOBS "" 123 * VERSION,KILL /CONF | @SYS$PIPE
Now I realize that is a long line to type, but you can just use a 1 line RESUBMIT.COM that runs the above command using P1 for the entry number.
Personally though I hate using one command procedure as a wrapper for another, so here is another method using some PIPE magic (this requires my newest version - attached to this post). Define a symbol in your LOGIN.COM this way (use the full path for DISPLAY_JOBS.COM):
$ RESUBMIT == "PIPE WRITE SYS$OUTPUT ""PIPE @DISPLAY_JOBS"+-
"+ 'P1' * KILL,VERSION/CONFIRM|@SYS$PIPE:"" | @SYS$PIPE:"
$ SHOW SYMBOL RESUBMIT
RESUBMIT == "PIPE WRITE SYS$OUTPUT "PIPE @DISPLAY_JOBS+ 'P1' * KILL,VERSION/CONFIRM|@SYS$PIPE:" | @SYS$PIPE:"
And then Bob's your uncle:
$ SHOW ENTRY/FULL/USER=SYSTEM CLUSTER_NEW_DAY
Entry Jobname Username Blocks Status
----- ------- -------- ------ ------
1002606 CLUSTER_NEW_DAY SYSTEM Holding until 22-MAY-2008 00:00:00
On idle batch queue ACCTIQ
Submitted 21-MAY-2008 00:00:00 /KEEP /LOG=SLOG:[MAINT].LOG; /NOPRINT
/PRIORITY=255 /RESTART=ACCTIQ
File: _$1$DGA111:[DSKA.SYSCLOCK]CLUSTER_NEW_DAY.COM;3
$ RESUBMIT 1002606
SUBMIT _$1$DGA111:[DSKA.SYSCLOCK]CLUSTER_NEW_DAY.COM;4 ? [N]: Y
Job CLUSTER_NEW_DAY (queue ACCTIQ, entry 158) holding until 22-MAY-2008 00:00
%DELETE-I-DELETED, entry 1002606 aborting or deleted
$ SHOW ENTRY/FULL/USER=SYSTEM CLUSTER_NEW_DAY
Entry Jobname Username Blocks Status
----- ------- -------- ------ ------
158 CLUSTER_NEW_DAY SYSTEM Holding until 22-MAY-2008 00:00:00
On idle batch queue ACCTIQ
Submitted 21-MAY-2008 16:26:12 /KEEP /LOG=$1$DGA115:[SLOG.][MAINT].LOG;
/NOPRINT /PRIORITY=255 /RESTART=ACCTIQ
File: _$1$DGA111:[DSKA.SYSCLOCK]CLUSTER_NEW_DAY.COM;4
As documented in the help text output with
$ @DISPLAY_JOBS ?
This one-liner will resubmit batch job entry 123 using a new version of its batch command procedure and kill the old job:
$ PIPE @DISPLAY_JOBS "" 123 * VERSION,KILL /CONF | @SYS$PIPE
Now I realize that is a long line to type, but you can just use a 1 line RESUBMIT.COM that runs the above command using P1 for the entry number.
Personally though I hate using one command procedure as a wrapper for another, so here is another method using some PIPE magic (this requires my newest version - attached to this post). Define a symbol in your LOGIN.COM this way (use the full path for DISPLAY_JOBS.COM):
$ RESUBMIT == "PIPE WRITE SYS$OUTPUT ""PIPE @DISPLAY_JOBS"+-
"+ 'P1' * KILL,VERSION/CONFIRM|@SYS$PIPE:"" | @SYS$PIPE:"
$ SHOW SYMBOL RESUBMIT
RESUBMIT == "PIPE WRITE SYS$OUTPUT "PIPE @DISPLAY_JOBS+ 'P1' * KILL,VERSION/CONFIRM|@SYS$PIPE:" | @SYS$PIPE:"
And then Bob's your uncle:
$ SHOW ENTRY/FULL/USER=SYSTEM CLUSTER_NEW_DAY
Entry Jobname Username Blocks Status
----- ------- -------- ------ ------
1002606 CLUSTER_NEW_DAY SYSTEM Holding until 22-MAY-2008 00:00:00
On idle batch queue ACCTIQ
Submitted 21-MAY-2008 00:00:00 /KEEP /LOG=SLOG:[MAINT].LOG; /NOPRINT
/PRIORITY=255 /RESTART=ACCTIQ
File: _$1$DGA111:[DSKA.SYSCLOCK]CLUSTER_NEW_DAY.COM;3
$ RESUBMIT 1002606
SUBMIT _$1$DGA111:[DSKA.SYSCLOCK]CLUSTER_NEW_DAY.COM;4 ? [N]: Y
Job CLUSTER_NEW_DAY (queue ACCTIQ, entry 158) holding until 22-MAY-2008 00:00
%DELETE-I-DELETED, entry 1002606 aborting or deleted
$ SHOW ENTRY/FULL/USER=SYSTEM CLUSTER_NEW_DAY
Entry Jobname Username Blocks Status
----- ------- -------- ------ ------
158 CLUSTER_NEW_DAY SYSTEM Holding until 22-MAY-2008 00:00:00
On idle batch queue ACCTIQ
Submitted 21-MAY-2008 16:26:12 /KEEP /LOG=$1$DGA115:[SLOG.][MAINT].LOG;
/NOPRINT /PRIORITY=255 /RESTART=ACCTIQ
File: _$1$DGA111:[DSKA.SYSCLOCK]CLUSTER_NEW_DAY.COM;4
I have one, but it's personal.
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP