Hi guys,

Thanks for the response...ya, it does sound like the file is not being
closed. However, please look at the first sentence of my original second
paragraph. Here's the simple code:

open( FILEHANDLE, "<a:/filename );
$Line1 = <FILEHANDLE>;
$Line2 = <FILEHANDLE>;
close( FILEHANDLE );

When placed in a loop, this code produces the Wrong Volume err msg as I
described. The script acts like buffers are remaining open. Strangely, I
have some old COBOL legacy code that acts the same way under WinNT virtual
DOS. I was hoping this is NOT a WinNT issue and there might be a perlish
fix. 

Cheers,
Bob




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 3:31 PM
To: Sturdevant-Contractor, Robert W; ActivePerl ListServer
Subject: Re: Help Accessing A:


Bob,
    I'm by no means an expert in making perl scripts for win32 applications,
but it sure sounds a
lot like you need to close some sort of file handle before switching disks.

Regards,
David



----- Original Message -----
From: "Sturdevant-Contractor, Robert W"
<[EMAIL PROTECTED]>
To: "ActivePerl ListServer" <[EMAIL PROTECTED]>
Sent: Wednesday, July 17, 2002 12:35 PM
Subject: Help Accessing A:


Hi List,

I have an annoying problem accessing multiple diskettes on WinNT. This
doesn't appear to be strictly a perl issue but I'm hoping there is a perl
workaround.

My script OPENs a file for read on A:, reads a diskette number, then CLOSEs
the file. After inserting the next diskette, if the diskette number is not
the next in sequence, a dialog box instructs the user to insert the correct
diskette. Which is again checked...until the next diskette is inserted.

The problem is that another, unscripted NT dialog box is displayed when the
script tries to OPEN the file on each subsequent diskette. The unscripted
dialog box title is _Information Message: perl.exe - Wrong Volume_ and the
message text is _The wrong volume is in the drive. Please Insert volume into
Drive A:. Abort/Retry/Ignore_

Each diskette is correctly OPENed and read when Retry is pressed, but this
annoying behavior is very ugly when several diskettes are needed. Perhaps,
WinNT is holding an input buffer that isn't released when the file is
closed. I haven't been able to locate anything useful in the POD about input
buffering and $| has no affect. I don't see any way to release/flush/clear
the input buffer, label or volume name, if that is the problem.

MS KB article
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q136026
cites a similar issue related to WinNT volume label and OS2 clients.

I've probably overlooked something simple, but I'm out of ideas...any help
is appreciated. tia

Bob
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to