RE: [U2] passing file pointers?

2008-05-06 Thread Dennis Bartlett
If unassigned(F.PTR) then open 'f' to F.PTR... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doug Chanco Sent: 02 May 2008 10:21 PM To: u2-users@listserver.u2ug.org Subject: [U2] passing file pointers? Hey all, In universe 10.1 how can I verify

RE: [U2] passing file pointers?

2008-05-05 Thread Ray Wurlod
FILEINFO() will fail if the argument is passed in an unassigned state or is null. Therefore, when creating routines that programs written by anyone I will usually test first with UNASSIGNED and ISNULL before going on to other checks such as FILEINFO or NUM. --- u2-users mailing list

RE: [U2] passing file pointers?

2008-05-04 Thread David Jordan
Use the Fileinfo routine. If fileinfo(fv,1) = (if 0 not open, if 1 open) This checks that is a valid file that is open. This is good practice to test the file is open before opening, as reopening the file clears all previous record locks held on that file by that user and can cause fatal

RE: [U2] passing file pointers?

2008-05-04 Thread Ross Ferris
Ferris Stamina Software Visage Better by Design! -Original Message- From: [EMAIL PROTECTED] [mailto:owner-u2- [EMAIL PROTECTED] On Behalf Of David Jordan Sent: Sunday, 4 May 2008 10:11 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] passing file pointers? Use the Fileinfo routine

RE: [U2] passing file pointers?

2008-05-04 Thread Doug Chanco
@listserver.u2ug.org Subject: RE: [U2] passing file pointers? Wouldn't even BETTER practice be to just ensure that the file is open in the calling program? If this is a well used routine that is called for a couple of million records, then even the overhead of this simple check can quickly mount. Whilst I agree

RE: [U2] passing file pointers?

2008-05-02 Thread David Ward
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

Re: [U2] passing file pointers?

2008-05-02 Thread Raul_Dominguez
Check out the FILEINFO function Raul - Original Message - From: Doug Chanco [EMAIL PROTECTED] Sent: 05/02/2008 04:21 PM AST To: u2-users@listserver.u2ug.org Subject: [U2] passing file pointers? Hey all, In universe 10.1 how can I verify that a file pointer passed via a subroutine