We use:
OPENSEQ FNAME TO FHANDLE ELSE CREATE FHANDLE ELSE STOP
Schalk van Zyl
Al DeWitt wrote:
I GET THE FOLLOWING MESSAGE [FATAL ERROR: - Cannot open file
C:\OUTPUT\APCHECKS1002] and I'm sent to the colon prompt.
Al DeWitt
Schalk van Zyl
GWK Beperk
Tel+2753 298 8231
Fax+2753 298 2445
Mobile
Hierdie e-pos en sy inhoud is onderhewig aan 'n regskennisgewing oor
elektroniese pos wat gelees kan word by
http://www.gwk.co.za/DisclaimerVrywaring.asp
.> -----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Dan McGrath
Sent: Wednesday, September 08, 2010 7:20 PM
To: U2 Users List
Subject: Re: [U2] Sequential Files Question
If you run this code:
OPENSEQ FNAME TO OUTFILE ON ERROR
STOP 'FATAL ERROR: - Cannot open file ':FNAME END THEN
STOP 'FATAL ERROR: - Already exiting file called: ':FNAME END ELSE
CRT "FILE OPEN SUCCEEDED!"
WRITESEQ "Dummy data" ON OUTFILE THEN NULL END
What happens?
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Al DeWitt
Sent: Thursday, September 09, 2010 10:03 AM
To: U2 Users List
Subject: Re: [U2] Sequential Files Question
I forgot to mention that I'm on Windows.
My output path is: C:\OUTPUT\
My file name isAPCHECKS9999 where is a counter that gets incremented
each time the program is run.
FNAME would be C:\OUTPUT\APCHECKS9999 so that my statement would read:
OPENSEQ FNAME TO OUTFILE...
However, since APCHECKS9999 would be unique each time it doesn't exist.
BTW when I try to display OUTFILE it gives me an Unitialized Variable,
zero assumed error.
Al DeWitt
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Dan McGrath
Sent: Wednesday, September 08, 2010 6:29 PM
To: U2 Users List
Subject: Re: [U2] Sequential Files Question
Yes, it will.
Note: It will drop into the 'ELSE' clause if the file didn't exist to
start with.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Al DeWitt
Sent: Thursday, September 09, 2010 8:55 AM
To: [email protected]
Subject: [U2] Sequential Files Question
Unidata 7.1.20
I've never dealt with sequential files, but I have a need to output
records to a text file. Each record will be a series of fixed-length
fields. Each file will need to be created at the time of opening. The
destination will be a Windows folder on one of our servers. I will be
using OPENSEQ to open the file. However, since each file needs to be
created at time of opening what do I use to create the file? My reading
of OPENSEQ doesn't indicate that it will create it automatically if it
doesn't exist.
Thanks.
Al DeWitt
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
########################################################################
###################
The information transmitted in this message and attachments (if any) is
intended only for the person or entity to which it is addressed. The
message may contain confidential and/or privileged material. Any
review, retransmission, dissemination or other use of or taking of any
action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. If you received this in
error, please contact the sender and delete the material from any
computer.
The intended recipient of this e-mail may only use, reproduce, disclose
or distribute the information contained in this e-mail and any attached
files with the permission of IMB.
########################################################################
###################
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
########################################################################
###################
The information transmitted in this message and attachments (if any) is
intended only for the person or entity to which it is addressed. The
message may contain confidential and/or privileged material. Any
review, retransmission, dissemination or other use of or taking of any
action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. If you received this in
error, please contact the sender and delete the material from any
computer.
The intended recipient of this e-mail may only use, reproduce, disclose
or distribute the information contained in this e-mail and any attached
files with the permission of IMB.
########################################################################
###################
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
.
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users