Latest News

the latest news from our team

Checks if file exists on HP3000

;
; Checks if file exists on HP e3000.
;
LET sVar1 = “UNKNOWN”
GOSUB FileTest
IF ( sRETURN = 1 )
DISPLAY “File Found^M^J”
ELSE
DISPLAY “File NOT Found^M^J”
ENDIF
;
LET sVar1 = “NMCONFIG.PUB.SYS”
GOSUB FileTest
IF ( sRETURN = 1 )
DISPLAY “File Found^M^J”
ELSE
DISPLAY “File NOT Found^M^J”
ENDIF
DISPLAY “^M^J”
;
STOP
;
; – – – – – – – – – – – – – – – – – – – – – – – – –
;
LABEL FileTest
LET sTmp1=””
LET sTmp2=””
LET sRETURN=0
SEND “LISTF ” & sVar1
READHOST 00:00:03 sTmp1 UNTIL “^Q” TERMINATOR sTmp2
IF ( LENGTH(sTmp2) = 0 )
RETURN
ENDIF
IF ( FIND ( “CIERR”, sTmp1 ) = 0 )
LET sRETURN=1
ENDIF
RETURN
END

Leave a Reply

Your email address will not be published. Required fields are marked *

*

code