1752587 Members
4250 Online
108788 Solutions
New Discussion юеВ

Lexical function

 
SOLVED
Go to solution
Just_Sergey
Occasional Advisor

Lexical function

Help me plz.
How can i get Entry number of executing job by f$getqui function??
I know just job name.
14 REPLIES 14
EdgarZamora_1
Respected Contributor

Re: Lexical function

More details would get you a more specific answer.

If you want to get the entry number of your currently executing job (from that job itself) then something like...

entry = f$getqui("display_job","entry_number",,"this_job")

If the job you're interested in is another job (not the process you're running in) then you would need to loop through the queues (or the specific queue if you know the queue name) then loop through the jobs in that queue and check for the specific job name you want. Once you find that job then you can get the entry number.
Wim Van den Wyngaert
Honored Contributor

Re: Lexical function

And note that the job name is not a unique key for getting a job (you can have 2 jobs calling "COMPILE").

Wim
Wim
Just_Sergey
Occasional Advisor

Re: Lexical function

2EdgarZamora: i have second case.
I'm interested in is another job.
And I know queue name, but I dont know how realize it. ((
Can you write some example?
2Wim Van den: I have just one job with this job_name
Robert Gezelter
Honored Contributor

Re: Lexical function

Just_Sergey,

As was implied by the other posts, one must be careful as it is possible to have multiple jobs of the same name in the queues and/or executing at the same time (for either the same user or different users).

Only the entry number is unique, so long as the job exists. Entry numbers can be quickly recycled, so care is recommended.

- Bob Gezelter, http://www.rlgsc.com
Wim Van den Wyngaert
Honored Contributor
Solution

Re: Lexical function

Here you have an example of a .com that creates (if not there) and deletes (if there) job entries.

Wim
Wim
Just_Sergey
Occasional Advisor

Re: Lexical function

I thought it would work. (in Attachment)
Naively )
Wim Van den Wyngaert
Honored Contributor

Re: Lexical function

Replace display_job by display_entry and it will.

Wim
Wim
Just_Sergey
Occasional Advisor

Re: Lexical function

It does not ((( Attach
EdgarZamora_1
Respected Contributor

Re: Lexical function

The attached sample code will do what you want. Tailor it for flexibility.