Highlighted
Absent Member.
Absent Member.
1468 views

[archive] acu 8.0 strange file status code

[Migrated content. Thread originally posted on 29 August 2008]

If your write statements contain syntax such as Before or after the file will be considered to be a print file (whether you intended to make it a print file or not). I do not know why the lock statement is causing an issue but you may want to report it to Customer Care.
0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] acu 8.0 strange file status code

Hi, i wonder if anyone ever came across this :

i select a sequential file like this :

SELECT REPORT-1 ASSIGN TO "LD4HdkabX27001"
ORGANIZATION SEQUENTIAL
ACCESS MODE IS SEQUENTIAL
LOCK MODE IS EXCLUSIVE
FILE STATUS IS FILE-STATUS.


and open like this: OPEN OUTPUT REPORT-1.

the runtime tries this : (tf 9 output)

>>>trying alias = LD4HdkabX27001
LD4HdkabX27001: open i-o with lock (thread 1187)
>>>file status = 37,08
>>>trying alias = LD4HdkabX27001


which ends in a horrible error.
But if i select the file like this instead,
SELECT REPORT-1 ASSIGN TO "LD4HdkabX27001"
ORGANIZATION SEQUENTIAL
ACCESS MODE IS SEQUENTIAL
FILE STATUS IS FILE-STATUS.

i.e. without "lock mode is exclusive"
all is well...

>>>trying alias = LD4HdkabX27001
LD4BdkabX26001: open output with lock (thread 1176)
>>>trying alias =
>>>>trying LD4HdkabX27001
-->insert (1), assign_name: LD4HdkabX27001, filesystem: 0, external_name: LD4HdkabX27001
>>>>trying LD4HdkabX27001
>>>>trying LD4HdkabX27001
-->use existing (1), assign_name: LD4HdkabX27001, filesystem: 0, external_name: LD4HdkabX27001


Why does the runtime try to open I-O when i ask it to open Oputput??

and what is with the 37,08 error ?
Attempt to open a print file for INPUT. (open)

it makes some sense under the circumstances, but i never said my file should be a print file..

Is this a feature that could be opt-outed via some compiler option?
programs compiled with an earlier compiler (7.2.1 tested) does not do this, even with the 8.0.0 runtime

thanks, Bernte
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] acu 8.0 strange file status code

Thanks,

You're right, there are occasional "after advancing" for some writes.
I'll see if 8.1 makes any difference once i get it.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] acu 8.0 strange file status code

See Rule 5 of the WRITE Statement:

Some sequential files are considered to be print files. A print file has page positioning information specified in it along with the record data. A file with the PRINT option of the ASSIGN clause specified for it is a print file. A file that is referenced by any WRITE statement that contains an ADVANCING phrase is also a print file.

8.1 will not have changes that affect this behavior
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] acu 8.0 strange file status code

[edit: rant removed and replaced by informational text]
in 8.0 "you cannot create a file with OPEN OUTPUT that has LOCK MODE EXCLUSIVE."
apparently it is covered by ECN-3774 due for 8.1 relese..
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.