I figured out my problem by reading through some of the bulletin board posts,unfortunately my docs say only 0 or 1 is an option for mode when opening a file, there is no mention of opening for read or write etc.
However I have a new problem, My readline is only reading the first line repeatedly, is something else you have to state, or some particular structure the file needs to make it move to the next line? This time I've include the script
; ******************************************
; **** Virus Management Strategy ****
; **** Nov 24.99 ****
; ******************************************
$LM =@WKSTA
$OS =@INWIN
$Result = open(1,@lserver+"\apps\updates\machines.txt",3)
$x=blank
if $result = 0
;read in list of machines,
$x=Readline(1)
while @Error =0
? "Line Read:["+$x+"]"
? "Local Machine:["+$LM+"]"
if INSTR($x,$LM) = 1
if $OS =1
;check dates of files
if comparefiletimes<files> )=1
copy over def files
RETURN
end if
else
run "w:\apps\updates\antivirus.bat"
RETURN
endif
endif
$x = Readline (1)
? "Line Read:["+$x+"]"
LOOP
close(1)
EXIT 1
end if