X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 14 Sep 2006 06:57 PM by  anon
lun on restore and save
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
14 Sep 2006 06:57 PM
    I am using a loop procedure in which I restore variables (different for each loop). Sometimes I receive an error message that all logical units are already used. Is there a way to reset the lun for a restore procedure? Thank you for the help you could give me!

    Deleted User



    New Member


    Posts:
    New Member


    --
    14 Sep 2006 06:57 PM
    I have heard of this behavior at least once before. It is probably O.S.-dependent, possibly somewhat dependent on custom configuration of a user's O.S. environment, and/or possibly dependent on the "tightness" or speed of your loop. It may also depend on the particular contents of certain '.sav' files; I don't know. To diagnose the problem, you might try observing the behavior of the output of "HELP, /FILES" as you perform your looping RESTOREs. This should display the LUN numbers that IDL believes are open as your RESTORE loop proceeds. When I tried to reproduce the problem on IDL For Windows XP, though, I never showed any LUN's remaining open at the end of a RESTORE loop cycle. Whether you diagnose the problem or no, I bet the FREE_LUN command can fix it. Your choice would probably be to either CATCH the "all logical units are already used" error and run the command I recommend below only in a CATCH block, OR simply run the command below periodically after some maximum number of RESTORE loop cycles that are safe from error. The command is: for i = 1, 128 do free_lun, i or perhaps you will need: for i = 1, 128 do free_lun, i, /FORCE The nice thing about that take-no-prisoners approach is that it does not throw any errors, even when the 'i' argument is not an open LUN. Let us in the group know whether this works or no. Since I cannot reproduce your problem, I have no other way to know whether the solution was effective or no. James Jones
    You are not authorized to post a reply.