A lot more lines of code, but this should work. (Please double-check for
typos.)
FILE.IS.OPEN = 0
LOOP
OPENSEQ '/path/file' TO FV
ON ERROR
PRINT;PRINT 'Could not open the /path/file file, status
':STATUS():'.'
STOP
END LOCKED
PRINT;PRINT 'File /path/file is locked.'
SLEEP 1
END THEN
FILE.IS.OPEN = 1
END ELSE
CMD = '!touch /path/file'
EXECUTE CMD CAPTURING OUTPUT RETURNING ERROR.MESSAGE
IF @SYSTEM.RETURN.CODE = -1 THEN
PRINT;PRINT 'Could not create the /path/file file,
status ':STATUS():'.'
STOP
END
END
UNTIL FILE.IS.OPEN DO REPEAT
[EMAIL PROTECTED] wrote on 09/13/2007 09:44:15 PM:
> Hello group, I am a UV guy and I need some UD assistance.
>
> In UV I can
>
> OPENSEQ "/path/file" TO FV ELSE
> CREATE FV ELSE STOPM "nope"
> END
>
> Which will create the file if it doesn't exit, after which I can READEQ
or
> READBLK to my heart's content.
>
> But UD dies at the CREATE statment.
>
> Also, instead of READBLK WRITEBLK it is OSBREAD, OSBWRITE in UD, correct
?
>
> Thanks,
> /Scott Ballinger
> Pareto Corporation
> Edmonds WA USA
> 206 713 6006
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/