- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- f$getqui to return queue entry info
Operating System - OpenVMS
1753548
Members
5742
Online
108795
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
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
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
тАО08-18-2004 06:16 AM
тАО08-18-2004 06:16 AM
I know if I read for a couple more hours I would get it..
I am attemping to watch a queued job with a script to watch for when the job ends.
I know I am close.
f$getqui("display_entry","entry_number","somenumber#", ?? )
Basically once the entry is gone or returns null I would like to do some thing afterwards.
Any tips ?
Thanks !!!
I am attemping to watch a queued job with a script to watch for when the job ends.
I know I am close.
f$getqui("display_entry","entry_number","somenumber#", ?? )
Basically once the entry is gone or returns null I would like to do some thing afterwards.
Any tips ?
Thanks !!!
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2004 08:05 AM
тАО08-18-2004 08:05 AM
Solution
The easiest way is to use the Synchronize command with a /Entry=entry_number. This will cause the command procedure to wait until the entry completes and then continue with the next statement in the procedure. It does require delete access to the specified entry number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2004 11:12 AM
тАО08-18-2004 11:12 AM
Re: f$getqui to return queue entry info
Tim,
By default a batch entry is removed when the job completes. If the entry doesn't exist, your F$GETQUI will return null (which can't be distinguished from using a bogus entry number). If the job is submitted with /RETAIN=ALWAYS (or the queue is set to retain jobs) the entry will remain until explicitly deleted.
F$GETQUI("DISPLAY_ENTRY","JOB_STATUS",entry)
will return the state of the job. For example, a holding job will return 4
(QUI$M_JOB_HOLDING), en executing job will return 2 (QUI$M_JOB_EXECUTING) and a completed job will return 128 (QUI$M_JOB_RETAINED). See the $GETQUI documentation for other possible states. Values (hex) can be found with:
$ PIPE LIBRARY/EXTRACT=$QUIDEF/OUT=SYS$OUTPUT SYS$SHARE:STARLET/MACRO | SEARCH SYS$PIPE QUI$M_JOB_ | SORT SYS$PIPE SYS$OUTPUT
If you want to wait for a specific job to complete, use SYNCHRONIZE as Dale has suggested. Note that SYNCHRONIZE against a retained job will return immediately. Also note that the $STATUS of SYNCHRONIZE will be the completion status of the job, unless the entry number doesn't exist, in which case it will be JBC-E-NOSUCHENT.
Also note that the symbol $ENTRY gets set to the entry number following a PRINT or SUBMIT command. It's much easier to use $ENTRY than search for your job later. For example:
$ SUBMIT/RETAIN=ALWAYS MYBATCHJOB
$ myentry=$entry
$!
$! some stuff...
$!
$ SET NOON
$ SYNCHRONIZE/ENTRY='myentry'
$ mystatus=$STATUS
$ DELETE/ENTRY='myentry'
By default a batch entry is removed when the job completes. If the entry doesn't exist, your F$GETQUI will return null (which can't be distinguished from using a bogus entry number). If the job is submitted with /RETAIN=ALWAYS (or the queue is set to retain jobs) the entry will remain until explicitly deleted.
F$GETQUI("DISPLAY_ENTRY","JOB_STATUS",entry)
will return the state of the job. For example, a holding job will return 4
(QUI$M_JOB_HOLDING), en executing job will return 2 (QUI$M_JOB_EXECUTING) and a completed job will return 128 (QUI$M_JOB_RETAINED). See the $GETQUI documentation for other possible states. Values (hex) can be found with:
$ PIPE LIBRARY/EXTRACT=$QUIDEF/OUT=SYS$OUTPUT SYS$SHARE:STARLET/MACRO | SEARCH SYS$PIPE QUI$M_JOB_ | SORT SYS$PIPE SYS$OUTPUT
If you want to wait for a specific job to complete, use SYNCHRONIZE as Dale has suggested. Note that SYNCHRONIZE against a retained job will return immediately. Also note that the $STATUS of SYNCHRONIZE will be the completion status of the job, unless the entry number doesn't exist, in which case it will be JBC-E-NOSUCHENT.
Also note that the symbol $ENTRY gets set to the entry number following a PRINT or SUBMIT command. It's much easier to use $ENTRY than search for your job later. For example:
$ SUBMIT/RETAIN=ALWAYS MYBATCHJOB
$ myentry=$entry
$!
$! some stuff...
$!
$ SET NOON
$ SYNCHRONIZE/ENTRY='myentry'
$ mystatus=$STATUS
$ DELETE/ENTRY='myentry'
A crucible of informative mistakes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2005 04:38 AM
тАО07-21-2005 04:38 AM
Re: f$getqui to return queue entry info
Thanks to all who responded
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