[Migrated content. Thread originally posted on 23 September 2011]
Hello all
i am using server express 5.1.4.0 on HP-UX 11.31.
a cobol program contain this declaration:
file-control.
select fdate assign to disk
organization indexed access mode dynamic
record key is fdate-key
lock mode automatic with lock on record
file status is fs2.
procedure division.
open output fdate.
two users user1 and user2 in the same group users.
when user1 launch the program FDATE is owned by user1
$ ll FDATE*
-rw-r--r-- 1 user1 users 0 Sep 23 17:26 FDATE
-rw-r--r-- 1 user1 users 3072 Sep 23 17:26 FDATE.idx
when user2 launch the program it still owned by user1
$ ll FDATE*
-rw-r--r-- 1 user1 users 0 Sep 23 17:26 FDATE
-rw-r--r-- 1 user1 users 3072 Sep 23 17:26 FDATE.idx
the file is not removed and will have always the owner user1 why?
some one know an option to make the launcher of the program the owner of the file.
thank for your help.
Can you please give us some more detail?
Are you launching these programs simultaneously from both user1 and user2 with both programs trying to open the file for output?
or
Are you launching these programs sequentially so that user1 launches the program, creates the file, closes the file and does stop run and then user2 does the same sequence of events?
Thanks.
[Migrated content. Thread originally posted on 23 September 2011]
Hello all
i am using server express 5.1.4.0 on HP-UX 11.31.
a cobol program contain this declaration:
file-control.
select fdate assign to disk
organization indexed access mode dynamic
record key is fdate-key
lock mode automatic with lock on record
file status is fs2.
procedure division.
open output fdate.
two users user1 and user2 in the same group users.
when user1 launch the program FDATE is owned by user1
$ ll FDATE*
-rw-r--r-- 1 user1 users 0 Sep 23 17:26 FDATE
-rw-r--r-- 1 user1 users 3072 Sep 23 17:26 FDATE.idx
when user2 launch the program it still owned by user1
$ ll FDATE*
-rw-r--r-- 1 user1 users 0 Sep 23 17:26 FDATE
-rw-r--r-- 1 user1 users 3072 Sep 23 17:26 FDATE.idx
the file is not removed and will have always the owner user1 why?
some one know an option to make the launcher of the program the owner of the file.
thank for your help.
Thank you for reply.
we are in the second case that means the process is runned exclusively by user1 once at time.
the problem is that the open output initialize the file but will never change the owner.
user2 can remove with the command rm the files created by user1 before running the program and then the files are created with owner user2 and will still like this when user1 open the files for output.
this case is not happening with olde microfocus cobol 1.4.
[Migrated content. Thread originally posted on 23 September 2011]
Hello all
i am using server express 5.1.4.0 on HP-UX 11.31.
a cobol program contain this declaration:
file-control.
select fdate assign to disk
organization indexed access mode dynamic
record key is fdate-key
lock mode automatic with lock on record
file status is fs2.
procedure division.
open output fdate.
two users user1 and user2 in the same group users.
when user1 launch the program FDATE is owned by user1
$ ll FDATE*
-rw-r--r-- 1 user1 users 0 Sep 23 17:26 FDATE
-rw-r--r-- 1 user1 users 3072 Sep 23 17:26 FDATE.idx
when user2 launch the program it still owned by user1
$ ll FDATE*
-rw-r--r-- 1 user1 users 0 Sep 23 17:26 FDATE
-rw-r--r-- 1 user1 users 3072 Sep 23 17:26 FDATE.idx
the file is not removed and will have always the owner user1 why?
some one know an option to make the launcher of the program the owner of the file.
thank for your help.
I checked with development and received the following reply:
You will need to delete the file first in order to change the owner.
Under the covers the runtime system requests the file open by setting the create file flag.
It is up to the OS how it actually will accomplish this task, which in this case, if the file already exists it simply resets the file size to 0 on the open.
So if the file already exists the owner will remain as the first owner.
I recommend that you use the DELETE FILE filename statement before you open a file where you wish the owner to change.
Thanks.
[Migrated content. Thread originally posted on 23 September 2011]
Hello all
i am using server express 5.1.4.0 on HP-UX 11.31.
a cobol program contain this declaration:
file-control.
select fdate assign to disk
organization indexed access mode dynamic
record key is fdate-key
lock mode automatic with lock on record
file status is fs2.
procedure division.
open output fdate.
two users user1 and user2 in the same group users.
when user1 launch the program FDATE is owned by user1
$ ll FDATE*
-rw-r--r-- 1 user1 users 0 Sep 23 17:26 FDATE
-rw-r--r-- 1 user1 users 3072 Sep 23 17:26 FDATE.idx
when user2 launch the program it still owned by user1
$ ll FDATE*
-rw-r--r-- 1 user1 users 0 Sep 23 17:26 FDATE
-rw-r--r-- 1 user1 users 3072 Sep 23 17:26 FDATE.idx
the file is not removed and will have always the owner user1 why?
some one know an option to make the launcher of the program the owner of the file.
thank for your help.
Thank you for reply.
i have seen this workaround , but there is an existant and the customer did not change all his code .
in version 1.4 of MF, the owner was changed when a user open a file for output.
[Migrated content. Thread originally posted on 23 September 2011]
Hello all
i am using server express 5.1.4.0 on HP-UX 11.31.
a cobol program contain this declaration:
file-control.
select fdate assign to disk
organization indexed access mode dynamic
record key is fdate-key
lock mode automatic with lock on record
file status is fs2.
procedure division.
open output fdate.
two users user1 and user2 in the same group users.
when user1 launch the program FDATE is owned by user1
$ ll FDATE*
-rw-r--r-- 1 user1 users 0 Sep 23 17:26 FDATE
-rw-r--r-- 1 user1 users 3072 Sep 23 17:26 FDATE.idx
when user2 launch the program it still owned by user1
$ ll FDATE*
-rw-r--r-- 1 user1 users 0 Sep 23 17:26 FDATE
-rw-r--r-- 1 user1 users 3072 Sep 23 17:26 FDATE.idx
the file is not removed and will have always the owner user1 why?
some one know an option to make the launcher of the program the owner of the file.
thank for your help.
I can only tell you how this is working now in the current release of Server Express.
If you believe that there is an incompatibility issue that you would like to have addressed then you will need to open up a support incident with your local Supportline center and ask that an RPI be created to address the issue.
Thanks.
[Migrated content. Thread originally posted on 23 September 2011]
Hello all
i am using server express 5.1.4.0 on HP-UX 11.31.
a cobol program contain this declaration:
file-control.
select fdate assign to disk
organization indexed access mode dynamic
record key is fdate-key
lock mode automatic with lock on record
file status is fs2.
procedure division.
open output fdate.
two users user1 and user2 in the same group users.
when user1 launch the program FDATE is owned by user1
$ ll FDATE*
-rw-r--r-- 1 user1 users 0 Sep 23 17:26 FDATE
-rw-r--r-- 1 user1 users 3072 Sep 23 17:26 FDATE.idx
when user2 launch the program it still owned by user1
$ ll FDATE*
-rw-r--r-- 1 user1 users 0 Sep 23 17:26 FDATE
-rw-r--r-- 1 user1 users 3072 Sep 23 17:26 FDATE.idx
the file is not removed and will have always the owner user1 why?
some one know an option to make the launcher of the program the owner of the file.
thank for your help.
Is this simply a case of setting the correct umask in the shell process that is launching the runtime instance?
Set correctly the umask would give rw permission to the group, allowing any user to open output on the file.