LIBRARY rexxinet
ineterr = "ERROR"
inetheading = 1
DO
inetdial("ONLINE")
inetopen(, , "My test")
CATCH ERROR
CONDITION('M')
RETURN
END
myftpsite = "ftp.microsoft.com"
inetconnect("MyFtpHandle", myftpsite, "FTP")
inetdir("peropsys")
DO WHILE inetmatchname("dirInfo") == ""
CHAROUT(, dirinfo)
flag = BIT(dirinfo.2, 4)
IF flag THEN SAY " <DIR>"
ELSE SAY
END
RETURN
CATCH ERROR
CONDITION('M')
FINALLY
inetclose() |