M "CLEARSELECT"
STOP
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Bright, Frank
Sent: Monday, November 29, 2004 13:38
To: U2-Users Group (E-mail)
Subject: [U2] Testing if a Unidata file has records or not!
To All:
I am writing an interesting pr
I would do this:
SEL.8 = 8
OPEN '', 'TEST.FILE' TO OPEN.FILE THEN
SELECT OPEN.FILE TO SEL.8
READNEXT ID FROM SEL.8 THEN
HAVE.RECORDS = 1
END ELSE
HAVE.RECORDS = 0
END
CLEARSELECT SEL.8
END
This should work on UV and UD.
Dick Kryka
Director of Applications
CCCS of Great
L PROTECTED] On Behalf Of HENDERSON
MICHAEL MR
Sent: Monday, November 29, 2004 3:17 PM
To: [EMAIL PROTECTED]
Subject: Unclassified RE: [U2] Testing if a Unidata file has records
or not!
Frank,
I wouldn't do it that way!
If the file actually has a gazillion records in it, "COUNT" cou
1:38 PM
To: U2-Users Group (E-mail)
Subject: [U2] Testing if a Unidata file has records or not!
To All:
I am writing an interesting program. One that finds where a file is empty
of records or not. I used the EXECUTE command with the COUNT command to get
the number of records in a file. If its 0 th
On Mon, 29 Nov 2004 16:37:32 -0500, you wrote:
>To All:
>
>I am writing an interesting program. One that finds where a file is empty of
>records or not. I used the EXECUTE command with the COUNT command to get the
>number of records in a file. If its 0 then the file is empty.
>
>But is there
le Grocery
[EMAIL PROTECTED]
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:owner-u2-
> [EMAIL PROTECTED] On Behalf Of Bright, Frank
> Sent: Monday, November 29, 2004 1:38 PM
> To: U2-Users Group (E-mail)
> Subject: [U2] Testing if a Unidata file has records or not!
&g
Hi Frank,
I'm not a UD expert, but how about this:
OPEN "MYFILE" TO FH ELSE
PRINT "FAILED TO OPEN MYFILE"
STOP
END
SELECT FH
* After a UniBASIC SELECT, SYSTEM(11) contains the number of items in
the current group. If this is 0 then the file should be empty.
IF SYSTEM(11) THEN
PRIN
> I am writing an interesting program. One that finds where
a
> file is empty of records or not. I used the EXECUTE
command
> with the COUNT command to get the number of records in a
> file. If its 0 then the file is empty.
>
> But is there a better way as the execution command causes
> problem
END
[This is the UniVerse syntax, but UDT should be similar]
HTH
Mike
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bright, Frank
Sent: Tuesday, 30 November 2004 10:38
To: U2-Users Group (E-mail)
Subject: [U2] Testing if a Unidata file has re
To All:
I am writing an interesting program. One that finds where a file is empty of
records or not. I used the EXECUTE command with the COUNT command to get the
number of records in a file. If its 0 then the file is empty.
But is there a better way as the execution command causes problem in
10 matches
Mail list logo