What you're seeing is the correct behavior of OPENSEQ.  I think what's causing 
the confusion is there are multiple "error" conditions possible when dealing 
with opening a flat file for writing.  The non-existence of the file prior to 
opening may or may not be an error depending on your usage scenario, but it is 
important information, and using an error code along with the ELSE clause is 
the only way it can be conveyed.  If you're writing a per-instance error log, 
for example, you might choose to loop through OPENSEQ statements and increment 
the ID until you hit the non-existence condition so you don't overwrite prior 
logs.  

-John

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Al DeWitt
Sent: Monday, August 05, 2013 11:03 AM
To: U2 Users List
Subject: Re: [U2] OPENSEQ

As I mentioned earlier I went back and started over.  This is my Top of 
"LRGLBRVARS" in "VOC", 3 lines, 48 characters.
001: DIR
002: \\ServerName\ShareName\Folder\LrgLbrVariances
003: D_HOLD_
Bottom.

My OPENSEQ statement is this: OPENSEQ "LRGLBRVARS",FNAME TO OUT.FILE ELSE NULL

This opens my previously non-existing file, allows me to write to it and closes 
it.

It does what I want it to.  As I mentioned to someone else I have no idea why 
the above statement worked, but trying to error catching showed an error 
condition.

Go figure.

Albert DeWitt, CPIM
Sr. Programmer Analyst

Stylmark, Inc.
6536 Main St NE | Minneapolis MN 55432 | USA
DD: 763-574-8705 | PH: 763-574-7474 | F: 763-574-1415 adew...@stylmark.com 
www.stylmark.com

Stylmark is a proud member of RDI, ARE, NGA You can now find Stylmark on 
LinkedIn and Facebook

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to