?
Solved

How do I create a new sequential (NOT hashed) file in UniBasic?

Posted on 2011-05-10
4
Medium Priority
?
1,118 Views
Last Modified: 2012-06-21
What I am trying to do should be simple and straightforward, but I can't figure it out.
My UniBasic application simply needs to create a new temporary text file and add data to it.

The documentation says I can use "WRITESEQ" with the "APPEND" option to create a new file, yet also says I must first use "OPENSEQ" to open the file!  But since there is no file to open, then OPENSEQ crashes with a fatal error and the file variable needed by WRITESEQ is never initialized.  Also, there is no way in WRITESEQ to specify the name of the new file it would allegedly create; it wants that "file variable" instead.

I am aware of the UniData CREATE.FILE command, but that creates a hashed file and also an entry in the VOC file, neither of which is desirable.
0
Comment
Question by:ehavemann
3 Comments
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 2000 total points
ID: 35781331
ehavemann,

If you have access to your Universe Online Library, find the Basic PDF and lookup CREATE syntax.  It works as part of the ELSE condition of OPENSEQ.

Example:
OPENSEQ 'FILE.E', '{Name Of File}' TO FILEVARIABLE
ELSE CREATE FILEVARIABLE ELSE ABORT

Then you can use WEOFSEQ and WRITESEQ as previously desired and yes it is to the FILEVARIABLE from above.
i.e., WRITESEQ 'Hello, World!' TO FILEVARIABLE ELSE STOP

0
 
LVL 53

Expert Comment

by:Dhaest
ID: 35964379
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
 

Author Comment

by:ehavemann
ID: 36004729
Dhaest's answer worked for me.  I had neglected to check in on a timely basis to see if I got a response.

Eric
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we’ll look at how to deploy ProxySQL.
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question