RE: [U2] Clearing a Sequential File:

2004-08-25 Thread Claus Derlien
From the 8.3.3 paper manual (holy object here) - i found this snippet :

OPENSEQ 'FILE.E','RECORD4' TO FILE
   ELSE CREATE FILE ELSE ABORT
WEOFSEQ FILE
WRITESEQ 'HELLO, UNIVERSE' TO FILE ELSE STOP

nothing beats a printed manual :-))  -  i hate those freak pdf monsters!


Claus Derlien
edb-afdelingen
direkte : 63 13 86 69
email   : [EMAIL PROTECTED]

 I am able to OPENSEQ and WRITESEQ for a sequential file, and 
 need to clear
 the records or data before writing to this file.  I have 
 tried CLEAR and
 CLEARFILE, but may not have the correct syntax.  How do I go 
 about this?


Frie Funktionfrer - faglig organisation og tvfrfaglig a-kasse - www.f-f.dk

***
Denne email og alle filer vedlagt som bilag kan indeholde fortroligt materiale, der 
kun er beregnet for adressaten,
og maa ikke udleveres eller kopieres til uvedkommende. Har De ved en fejltagelse 
modtaget denne email, bedes
De venligst omgaaende meddele os dette pr. telefon : 6313 8550. Paa forhaand tak.
***
This email and any files transmitted with it may contain confidential information 
intended for the addressee(s) only.
The information is not to be surrendered or copied to unauthorised persons. If you 
have received this
communication in error, please notify us immediately by telephone: +45 6313 8550. 
Thank you.
***
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Clearing a Sequential File:

2004-08-24 Thread Dianne Ackerman
In Universe there is a command called WEOFSEQ which will do that.  (HELP 
BASIC WEOFSEQ)
-Dianne

Ron Moore wrote:
I am able to OPENSEQ and WRITESEQ for a sequential file, and need to clear
the records or data before writing to this file.  I have tried CLEAR and
CLEARFILE, but may not have the correct syntax.  How do I go about this?
TIA, as always.
Ron 
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

 

--
Dianne Ackerman
Director, Application Development  Support
Aptron Corporation
973/822-0700, ext. 105
FAX 973/822-3234
[EMAIL PROTECTED]
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Clearing a Sequential File

2004-08-24 Thread James B. Mitchell
A sequential file  within the program bycan by truncating the file before writing to 
it.  This is accomplished by using the WEOFSEQ filevariable statement after the 
OPENSEQ and before the first WRITESEQ.

Hope that helps!

-- James
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Clearing a Sequential File:

2004-08-24 Thread Kevin King
There are a number of approaches to this.  If you're on a *nix
platform, you could rm and touch the file you want and that'll create
the null file.  On Windows you can do a similar thing, but of course
the OS verbs are different.

I use a cross-platform approach that doesn't use OS verbs at all.
First, open the directory file as a regular file.  Use DELETE to
remove the old item.  Then, when writing to the file, on the first
output just WRITE it to the DIR file under the sequential name.  Then
open the sequential item and WRITESEQ to it thereafter.

This is a bit more complicated than other approaches, but if you WRITE
'' ON dirfile,name at the start (which is the most common variant of
the technique) you'll get a blank first line.  If you don't mind that
blank first line, then that may be an easier way to go.

-Kevin
[EMAIL PROTECTED]
http://www.PrecisOnline.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron Moore
Sent: Tuesday, August 24, 2004 11:41 AM
To: [EMAIL PROTECTED]
Subject: [U2] Clearing a Sequential File:

I am able to OPENSEQ and WRITESEQ for a sequential file, and need to
clear the records or data before writing to this file.  I have tried
CLEAR and CLEARFILE, but may not have the correct syntax.  How do I go
about this?

TIA, as always.
Ron
---
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/


Re: [U2] Clearing a Sequential File:

2004-08-24 Thread Karl L Pearson
Maybe this isn't correct, but I usually just do the following command
(Unix):

echo ''  SEQFILE

Karl

On Tue, 2004-08-24 at 11:40, Ron Moore wrote:
 I am able to OPENSEQ and WRITESEQ for a sequential file, and need to clear
 the records or data before writing to this file.  I have tried CLEAR and
 CLEARFILE, but may not have the correct syntax.  How do I go about this?
 
 TIA, as always.
 Ron 
 ---
 u2-users mailing list
 [EMAIL PROTECTED]
 To unsubscribe please visit http://listserver.u2ug.org/
-- 
Karl L. Pearson
Director of IT,
ATS Industrial Supply
Direct: 801-978-4429
Toll-free: 888-972-3182 x29
Fax: 801-972-3888
http://www.atsindustrial.com
[EMAIL PROTECTED]
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Clearing a Sequential File:

2004-08-24 Thread u2ug
weofseq


- Original Message - 
From: Ron Moore [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 24, 2004 01:40 pm
Subject: [U2] Clearing a Sequential File:


 I am able to OPENSEQ and WRITESEQ for a sequential file, and need to clear
 the records or data before writing to this file.  I have tried CLEAR and
 CLEARFILE, but may not have the correct syntax.  How do I go about this?

 TIA, as always.
 Ron
 ---
 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/


RE: [U2] Clearing a Sequential File:

2004-08-24 Thread Ron Moore
Thanks Dianne, works like a charm.

Ron

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dianne Ackerman
Sent: Tuesday, August 24, 2004 1:53 PM
To: [EMAIL PROTECTED]
Subject: Re: [U2] Clearing a Sequential File:


In Universe there is a command called WEOFSEQ which will do that.  (HELP 
BASIC WEOFSEQ)
-Dianne

Ron Moore wrote:

I am able to OPENSEQ and WRITESEQ for a sequential file, and need to 
clear the records or data before writing to this file.  I have tried 
CLEAR and CLEARFILE, but may not have the correct syntax.  How do I go 
about this?

TIA, as always.
Ron
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

  


-- 


Dianne Ackerman
Director, Application Development  Support
Aptron Corporation
973/822-0700, ext. 105
FAX 973/822-3234
[EMAIL PROTECTED]
---
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/


RE: [U2] Clearing a Sequential File:

2004-08-24 Thread Richard Lewis
If you do a WEOFSEQ after all your WRITESEQs, the file will be truncated
at that point.  Something like this:

OPENSEQ 'path/filename' TO F.SEQ ...
* pointer is at beginning of file
LOOP
WHILE STUFF.TO.WRITE DO
WRITESEQ STUFF.TO.WRITE ON F.SEQ ELSE ...
REPEAT
WEOFSEQ F.SEQ
...

This insures that even if what you're writing this time is fewer 'lines'
than last time, the file will not contain any leftovers at the end.

Richard B. Lewis
Sr. Software Engineer
 
Dynix
r l e w i s at d y n I x dot c o m
www.dynix.com
 
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron Moore
Sent: Tuesday, August 24, 2004 11:41 AM
To: [EMAIL PROTECTED]
Subject: [U2] Clearing a Sequential File:

I am able to OPENSEQ and WRITESEQ for a sequential file, and need to
clear the records or data before writing to this file.  I have tried
CLEAR and CLEARFILE, but may not have the correct syntax.  How do I go
about this?

TIA, as always.
Ron
---
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/


RE: [U2] Clearing a Sequential File:

2004-08-24 Thread Allen E. Elwood \(CA\)
Sequential and dynamic access are defined by the way the file is opened.  So
you can always do a :

EXECUTE 'CLEAR-FILE GODZILLA'

before opening the file and it will be clear.  I've done this in U2 - don't
know about UV or native Pick.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ron Moore
Sent: Tuesday, August 24, 2004 10:41
To: [EMAIL PROTECTED]
Subject: [U2] Clearing a Sequential File:


I am able to OPENSEQ and WRITESEQ for a sequential file, and need to clear
the records or data before writing to this file.  I have tried CLEAR and
CLEARFILE, but may not have the correct syntax.  How do I go about this?

TIA, as always.
Ron
---
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/


Re: [U2] Clearing a Sequential File:

2004-08-24 Thread BNeylon
I like,
OPENSEQ 'whatever,'recid' TO SEQFILE THEN
  WEOFSEQ SEQFILE
END

Bruce M Neylon
Health Care Management Group 





Ron Moore [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
08/24/2004 01:40 PM
Please respond to u2-users

 
To: [EMAIL PROTECTED]
cc: 
Subject:[U2] Clearing a Sequential File:

I am able to OPENSEQ and WRITESEQ for a sequential file, and need to clear
the records or data before writing to this file.  I have tried CLEAR and
CLEARFILE, but may not have the correct syntax.  How do I go about this?

TIA, as always.
Ron 
---
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/


RE: [U2] Clearing a Sequential File:

2004-08-24 Thread Ron Moore
Thanks for the idea, Kevin.  I'll keep that in mind for future work.
Unfortunately, I can't live with the blank line.  Some specs get 'set in
stone' early in the project.

Ron

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kevin King
Sent: Tuesday, August 24, 2004 2:26 PM
To: [EMAIL PROTECTED]
Subject: RE: [U2] Clearing a Sequential File:


There are a number of approaches to this.  If you're on a *nix platform, you
could rm and touch the file you want and that'll create the null file.  On
Windows you can do a similar thing, but of course the OS verbs are
different.

I use a cross-platform approach that doesn't use OS verbs at all. First,
open the directory file as a regular file.  Use DELETE to remove the old
item.  Then, when writing to the file, on the first output just WRITE it to
the DIR file under the sequential name.  Then open the sequential item and
WRITESEQ to it thereafter.

This is a bit more complicated than other approaches, but if you WRITE '' ON
dirfile,name at the start (which is the most common variant of the
technique) you'll get a blank first line.  If you don't mind that blank
first line, then that may be an easier way to go.

-Kevin
[EMAIL PROTECTED]
http://www.PrecisOnline.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron Moore
Sent: Tuesday, August 24, 2004 11:41 AM
To: [EMAIL PROTECTED]
Subject: [U2] Clearing a Sequential File:

I am able to OPENSEQ and WRITESEQ for a sequential file, and need to clear
the records or data before writing to this file.  I have tried CLEAR and
CLEARFILE, but may not have the correct syntax.  How do I go about this?

TIA, as always.
Ron
---
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/
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Clearing a Sequential File:

2004-08-24 Thread Kevin King
I tested the WEOFSEQ on UD6 and it works real well, but I seem to
remember on earlier versions of Unidata you had to have the record
there before you could OPENSEQ. Or perhaps this was UV?  I just tested
this and on my UD6 you can OPENSEQ a non-existant item and it creates
the new record, so you wouldn't have to go through all these hoops if
you're UD6.

-Kevin
[EMAIL PROTECTED]
http://www.PrecisOnline.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron Moore
Sent: Tuesday, August 24, 2004 1:31 PM
To: [EMAIL PROTECTED]
Subject: RE: [U2] Clearing a Sequential File:

Thanks for the idea, Kevin.  I'll keep that in mind for future work.
Unfortunately, I can't live with the blank line.  Some specs get 'set
in stone' early in the project.

Ron

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kevin King
Sent: Tuesday, August 24, 2004 2:26 PM
To: [EMAIL PROTECTED]
Subject: RE: [U2] Clearing a Sequential File:


There are a number of approaches to this.  If you're on a *nix
platform, you could rm and touch the file you want and that'll create
the null file.  On Windows you can do a similar thing, but of course
the OS verbs are different.

I use a cross-platform approach that doesn't use OS verbs at all.
First, open the directory file as a regular file.  Use DELETE to
remove the old item.  Then, when writing to the file, on the first
output just WRITE it to the DIR file under the sequential name.  Then
open the sequential item and WRITESEQ to it thereafter.

This is a bit more complicated than other approaches, but if you WRITE
'' ON dirfile,name at the start (which is the most common variant of
the
technique) you'll get a blank first line.  If you don't mind that
blank first line, then that may be an easier way to go.

-Kevin
[EMAIL PROTECTED]
http://www.PrecisOnline.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron Moore
Sent: Tuesday, August 24, 2004 11:41 AM
To: [EMAIL PROTECTED]
Subject: [U2] Clearing a Sequential File:

I am able to OPENSEQ and WRITESEQ for a sequential file, and need to
clear the records or data before writing to this file.  I have tried
CLEAR and CLEARFILE, but may not have the correct syntax.  How do I go
about this?

TIA, as always.
Ron
---
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/
---
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/