View Single Post
Old 05 December 2015, 15:55   #1
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,305
DOpus5 lister handling

I`ve a problem with open new DOpus lister, the command "LISTER QUERY" and its RC.

Following two examples work but for some strange reason I get always RC=20 for first example. 20 means:
Quote:
20 - RXERR_NO_LISTER
A lister failed to open (usually because of low-memory).
Code:
[...]
'LISTER NEW' dir                               /* Open lister with given path */
'LISTER QUERY ACTIVE' ; activelister = RESULT  /* Get handle of ACTIVE lister */
IF RC >= 20 THEN EXIT                          /* Exit if can`t get handle of ACTIVE lister */
[...]
Code:
[...]
'LISTER NEW'                                   /* Open lister */
'LISTER QUERY ACTIVE' ; activelister = RESULT  /* Get handle of ACTIVE lister */
IF RC >= 20 THEN EXIT                          /* Exit if can`t get handle of ACTIVE lister */
'LISTER READ' activelister dir                 /* Read given dir into ACTIVE lister */
[...]
But the lister opens and RESULT contains a valid address. The "LISTER QUERY ACTIVE" docs say:
Quote:
If no listers are available the result will be empty and RC will contain the relevant error code.
I thought this could be the reason but then it must be the same in both examples:
Quote:
lister wait <handle> [quick]

This command causes the rexx script to wait for the specified lister to finish whatever it is doing.

Because Opus 5 multitasks, all rexx commands (like lister read, or lister new) will return immediately, even if the lister has not completed its task. This command will force the script to wait until the lister goes non-busy.
Is "LISTER NEW <path>" broken by design? At least you cannot wait for a lister that not yet exists. Anyone with an explanation whats going wrong?
daxb is offline  
 
Page generated in 0.04942 seconds with 11 queries