Highlighted
Absent Member.
Absent Member.
1094 views

[archive] IO_Creates

[Migrated content. Thread originally posted on 04 June 2004]

Usually we include the IO_Creates 1 option in the cblconfigs that we use with our software, but recently we have decided that we don't want IO to create databases but to error out if it cannot find the database needed but when we set IO_Creates to 0, opening a file IO still results in the database being created.

Here is an example of the select statement for one of the databases:
select TOX-FILE
assign to disk TOX--File-Name
organization is indexed
access mode is dynamic
record key is TOX-Product-Key
lock mode is manual with lock on multiple records
file status is TOX--Status
.

It does not have the "Optional" attribute so opening it IO I would assume should cause an error if the database does not exist.

Here is a partial listing of a -le output from the runtime:

Runtime version 5.2.1
Using SAFE mode for file access
Configuration file = '@ob1:/devsys/thin/cbldan'
Set parameter 'IO_CREATES' to FALSE


I removed the object loading lines and any application specific variables that we had.

I have tested this with the 521 runtime over 521 Acuserver and through the 6.0 thin client runtime.

Anybody have any ideas why IO still creates the file despite being told not to?

Dan
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] IO_Creates

Are you possibly compiling with a compatability mode option(-C??) that is perhaps forcing this behavior?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] IO_Creates

We were using three compatibility flags: -Cibf

The "i" compiles in ICOBOL compatibility, "b" makes sequential files binary unless otherwise specified, "f" forces records to be fixed length.

I took off the "i" and got the results I thought that we should be getting before (IE opening a field IO did not create the file). Now it looks like the object is compiled in VAX-Mode.

So a couple of questions:

1. What is the difference between VAX-Mode and ICOBOL mode (IE what problems might our current programs have if we compile them all in VAX-Mode). I have already found one: ICOBOL mode seemed to default to the -D7 flag for COMP-4 items. I was able to work around that one by adding -D7 to our cblflags.

2. Where in the documentation does is mention that ICOBOL mode will always create a file when opened in IO?

Dan
Infotrax Systems
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] IO_Creates

I don't know if it says it in the manual, but that is the way the "real" ICOBOL works - OPEN I-O always creates the file in ICOBOL.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.