Something like this should do the trick
IF ASSIGNED(F.PTR) THEN
STATUS STUFF FROM F.PTR ELSE
* FILE POINTER IS INVALID)
END
END ELSE
* FILE POINTER IS NOT ASSIGNED/OPENED
END
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Doug Chanco
Sent: Friday, May 02, 2008 3:21 PM
To: [email protected]
Subject: [U2] passing file pointers?
Hey all,
In universe 10.1 how can I verify that a file pointer passed via a
subroutine param is valid? I have a subroutine that is called with several
file pointers but it is possible to be called without opening a file and the
subroutine would check if the file pointer is empty and if so open the file.
The problem is that my check
IF F.PTR = '' THEN
Is erroring out with a invalid data type error message when the file pointer
is passed in (instead of being null). I know that I can make all the
calling programs open the needed files BEFORE calling the subroutine BUT if
its possible to somehow have the subroutine check and open it if its (empty
the file pointer), I would prefer to do that.
Thoughts/suggestions welcome
Thanks!
dougc
-------
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/