:[EMAIL PROTECTED]
Sent: Tuesday, April 13, 2004 2:02 PM
To: U2 Users Discussion List
Subject: RE: [UD] OPENSEQ, WEOFSEQ, CLOSESEQ
My main problem is resolved but your suggestions raised some other
questions, Larry.
When I take the initial WEOFSEQ out, the first run will produce the
result I need
I'm back. I lost my machine yesterday afternoon.
-Original Message-
From: Larry Hiscock [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 13, 2004 2:21 PM
To: 'U2 Users Discussion List'
Subject: RE: [UD] OPENSEQ, WEOFSEQ, CLOSESEQ
Comments inline:
What version of UD are you running
: Wednesday, April 14, 2004 6:53 AM
To: [EMAIL PROTECTED]
Subject: RE: [UD] OPENSEQ, WEOFSEQ, CLOSESEQ
Here is the basic structure I've been using in my export programs. It
does require that the directory you are working in is setup in the VOC
for the DELETE to work - I just wanted to be extra sure
I need some clarification.
Given the following:
X.DIR = X.HOME.WALDIES; * the VOC item 'X.HOME.WALDIES' is a
pointer to /home/waldies
X.FILE = SRW_TEST_SEQ.txt
OPENSEQ X.DIR,X.FILE TO FV.SEQ THEN
WEOFSEQ FV.SEQ
ELSE
...
END
Upon a successful open of X.DIR at X.FILE
Users Discussion List
Subject: WEOFSEQ
I need some clarification.
Given the following:
X.DIR = X.HOME.WALDIES; * the VOC item 'X.HOME.WALDIES' is a
pointer to /home/waldies
X.FILE = SRW_TEST_SEQ.txt
OPENSEQ X.DIR,X.FILE TO FV.SEQ THEN
WEOFSEQ FV.SEQ
ELSE
...
END
Upon a successful
From: Shawn Waldie [EMAIL PROTECTED]
Sent: Wednesday, April 14, 2004 1:48 PM
I need some clarification.
Given the following:
X.DIR = X.HOME.WALDIES; * the VOC item 'X.HOME.WALDIES' is a
pointer to /home/waldies
X.FILE = SRW_TEST_SEQ.txt
OPENSEQ X.DIR,X.FILE TO FV.SEQ THEN
WEOFSEQ
before a WRITESEQ
is executed, or the write will fail, and the ELSE clause will be taken.
There are three ways to do this:
1) READSEQ until eof
2) Use the APPEND clause to the WRITESEQ statement
3) WEOFSEQ (truncates the file at the current position, effectively making
the end of file)
I revise my
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
-
From: Shawn Waldie [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 13, 2004 12:15 PM
To: U2 Users Discussion List
Subject: [UD] OPENSEQ, WEOFSEQ, CLOSESEQ
Except for one possible inconsistency with the instructions regarding
OPENSEQ, the documentation seems very straight-forward. However, I'm
still
I may be over simplifying this but there appears to be a STOP missing
after the CLOSESEQ command. If this is actually the case in your code, the
WEOFSEQ will be executed one last time before the program terminates.
Could this possibly be the reason?
dan
If you don't position the file with READSEQ, and you don't use the
APPEND clause on WRITESEQ, it should overwrite the file from the
beginning. The initial WEOFSEQ should be unnecessary, and in fact is
probably why you're only seeing an empty file. We use sequential file
processing in a number
PROTECTED]
On Behalf Of Shawn Waldie
Sent: Tuesday, April 13, 2004 10:15 AM
To: U2 Users Discussion List
Subject: [UD] OPENSEQ, WEOFSEQ, CLOSESEQ
Except for one possible inconsistency with the instructions regarding
OPENSEQ, the documentation seems very straight-forward. However, I'm
still missing
That WAS the reason.
Thank you very much.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 13, 2004 11:51 AM
To: U2 Users Discussion List
Subject: Re: [UD] OPENSEQ, WEOFSEQ, CLOSESEQ
I may be over simplifying this but there appears
Comments inline:
When I take the initial WEOFSEQ out, the first run will
produce the result I need. But if I run the program again,
the error statement is returned each time the WRITESEQ
statement is executed. When WEOFSEQ is executed right
after the OPEN... statement, I get the desired
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
15 matches
Mail list logo