Here's a method I use to determine the highest datasession number--the algorithm looks something like this:
FOR i = 1 TO
SET DATASESSION TO &i
check if an error occurred
if no error occurred
i is now the highest known datasession
endif
ENDFOR
If you want to know how many datasessions exist rather than the highest number, just change the logic to count rather than find the high datasession id.
The art here is guessing how high to set so you don't miss any datasessions balanced against the time it takes to check each one (you don't want to check all 32K of the possibilities). I just pick some reasonable number, but you could also develop more sophisticated logic, such as: keep checking datasessions until you find 10 (or whatever) sequential unused datasessions.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement