Re: [ql-users] How about scanning jobs in C68? Problem with mt_jinf

2004-10-23 Thread P Witte
James Hunkins writes:


 Looking at other assembly that does use this call, the examples do
 match the usage in the documentation.  I suspect that I fell for the
 old 'believing what you read' thing without thinking it out.  I bet
 that this does not recurse through the full tree on its own in most
 cases.  Will try to do some recursion (will check on a hand drawn tree)
 and see if that does it.

 Any suggestions in the meantime would of course be welcome.


The SBASIC routine below demonstrates the logic of scanning the job tree for
a matching job ID to see if it exists.

290 DEFine FuNction JobLives(jid)
300 LOCal nj, n
310 IF jid = 0: RETurn 1: REMark Job #0 always assumed to exist
320 n = 0: REMark Start here
330 REPeat nj
340  n = NXJOB(n, 0): REMark Top job = #0
350  IF n = 0 OR n = jid: EXIT nj: REMark End of tree or match
360 END REPeat nj
370 RETurn n
380 END DEFine JobLives
390

Per

___
QL-Users Mailing List
http://www.quanta.org.uk/mailing.htm


Re: [ql-users] How about scanning jobs in C68? Problem with mt_jinf

2004-10-23 Thread James Hunkins
Thanks for the help guys.  I still seem to have a problem with the 
original routing mt.jinf falling out of the tree when I leave it up to 
it to run the full structure.

So instead I am simply walking through the entire job table (good 
suggestions).

One last question on this one, how do I know if a job table entry is 
valid?

Thanks,
jim
___
QL-Users Mailing List
http://www.quanta.org.uk/mailing.htm


[ql-users] How about scanning jobs in C68? Problem with mt_jinf

2004-10-22 Thread James Hunkins
Guys,
Another question for all the wonderful brilliant readers...
I am trying to scan and get all the jobs names running.  In C68 I am 
using the mt_jinf call which is the direct wrapper to the assembly 
call.  According to the documentation, if I set the jobid and the 
topofthetree job both to 0, then it should keep scanning and find every 
job.

Well, sometimes it does, depending on what and/or how many jobs I have 
running.  But this seems to be an exception to the rule.

When it is done going through the tree, it sets the jobid to 0 again 
(IE: SuperBasic job) and then would start over if I let it keep going.

What it seems to do is to prematurely return with the jobid set back to 
0.

I see that the assembly call is used within SMSQ/E for the jobs command 
which seems to work just fine.

Is there something that the documentation isn't saying?  Or perhaps the 
documentation is incorrect.  The code for jobs in SMSQ/E seems to be 
using the registers a bit differently than I would expect.

Any help, anyone?
-
As an alternate, perhaps someone has a better way (even though I 
eventually need this for one of the new jobs control application for 
QDT) of doing my immediate requirements.  I need to be able to search 
find find the jobid for a specific application which I know by name.  
Is there an easier way to get this?

Thanks,
jim
___
QL-Users Mailing List
http://www.quanta.org.uk/mailing.htm


Re: [ql-users] How about scanning jobs in C68? Problem with mt_jinf

2004-10-22 Thread James Hunkins
I may be about to answer my own questions here..
Looking at other assembly that does use this call, the examples do 
match the usage in the documentation.  I suspect that I fell for the 
old 'believing what you read' thing without thinking it out.  I bet 
that this does not recurse through the full tree on its own in most 
cases.  Will try to do some recursion (will check on a hand drawn tree) 
and see if that does it.

Any suggestions in the meantime would of course be welcome.
Cheers,
jim
On Oct 22, 2004, at 1:59 AM, James Hunkins wrote:
Guys,
Another question for all the wonderful brilliant readers...
I am trying to scan and get all the jobs names running.  In C68 I am 
using the mt_jinf call which is the direct wrapper to the assembly 
call.  According to the documentation, if I set the jobid and the 
topofthetree job both to 0, then it should keep scanning and find 
every job.

Well, sometimes it does, depending on what and/or how many jobs I have 
running.  But this seems to be an exception to the rule.

When it is done going through the tree, it sets the jobid to 0 again 
(IE: SuperBasic job) and then would start over if I let it keep going.

What it seems to do is to prematurely return with the jobid set back 
to 0.

I see that the assembly call is used within SMSQ/E for the jobs 
command which seems to work just fine.

Is there something that the documentation isn't saying?  Or perhaps 
the documentation is incorrect.  The code for jobs in SMSQ/E seems to 
be using the registers a bit differently than I would expect.

Any help, anyone?
-
As an alternate, perhaps someone has a better way (even though I 
eventually need this for one of the new jobs control application for 
QDT) of doing my immediate requirements.  I need to be able to search 
find find the jobid for a specific application which I know by name.  
Is there an easier way to get this?

Thanks,
jim
___
QL-Users Mailing List
http://www.quanta.org.uk/mailing.htm
___
QL-Users Mailing List
http://www.quanta.org.uk/mailing.htm