Goo'day,

Check the archives.

IIRC, somebody (Ray Wurlod??? ) published a *complete* set of code for OPENSEQ/READSEQ/WEOFSEQ, etc, full of THEN ELSE's about 12 to 18 months ago that goes a long way to getting the damn thing working correctly.....

At 03:14 14/04/04, you wrote:

Except for one possible inconsistency with the instructions regarding
OPENSEQ, the documentation seems very straight-forward.  However, I'm
still missing something.

My intention is to:
        1) create a record (if it doesn't already exist) in a DIR-type
file;
        2) clear said record if data exists;
        3) write "new" data to the record; and
        4) close the file.

The problem is that only an empty record is created if the WEOFSEQ
command is executed.  However, if the WEOFSEQ command is not executed,
the record will not first be cleared.  In other words, each time someone
runs the program, the new info is appended to whatever exists.

Here's my code:


X.DIR = "X.HOME.WALDIES" X.FILE = "SRW_TEST_SEQ.txt" X.DELIM = "|"

********
* MAIN *
********
GOSUB OPEN.SEQFILE


FOR I = 0 TO 9 OUTPUT.DATA = "" FOR J = 0 TO 9 BEGIN CASE CASE J # 9 OUTPUT.DATA := I:"-":J:X.DELIM CASE 1 OUTPUT.DATA := I:"-":J END CASE NEXT J GOSUB WRITE.TO.SEQFILE NEXT I


CLOSESEQ FV.SEQ





*~-~*~-~*~-~*~-~*~-~*~-~*~-~*~-~*~-~*~-~*~-~*~-~*~-~*~-~*


* -----------
OPEN.SEQFILE:
* -----------
PCPERFORM 'touch ':@PATH:'/':X.DIR:'/':X.FILE

OPENSEQ X.DIR,X.FILE TO FV.SEQ ELSE
  CRT "File ":X.FILE:" in ":X.DIR:" didn't open!"
END

WEOFSEQ FV.SEQ

RETURN


* --------------- WRITE.TO.SEQFILE: * --------------- WRITESEQ OUTPUT.DATA APPEND TO FV.SEQ ELSE CRT "Can't append ":OUTPUT.DATA:" to ":X.FILE:" in ":X.DIR:"!" END

RETURN





TIA
Shawn
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users



--
Incoming mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 262.8.0 - Release Date: 09/04/04

Regards,


Bruce Nichol
Talon Computer Services
ALBURY        NSW     2640
Australia

Tel: +61 (0)411149636
Fax: +61 (0)260232119

If it ain't broke, fix it till it is!


-- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.230 / Virus Database: 262.8.0 - Release Date: 09/04/04


-- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to