Skip to main content

[archive] acu 8.0 strange file status code

  • August 29, 2008
  • 5 replies
  • 0 views

[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.

5 replies

[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.
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

[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.
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.

[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.
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

[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.
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

[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.
[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..