Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FUP DUP opened edit files?

409 views
Skip to first unread message

compspecialist

unread,
Dec 19, 2013, 11:36:22 AM12/19/13
to
Is it possible to fup dup the edit 101 files that are opened?
or is it possible to fup dup anyother files that are opened? If yes, how?

Doug Miller

unread,
Dec 19, 2013, 12:24:25 PM12/19/13
to
compspecialist <luvfo...@gmail.com> wrote in news:56f453ce-c63c-443c-809b-
b900ac...@googlegroups.com:

> Is it possible to fup dup the edit 101 files that are opened?

Not if it's open for write access. FUP DUP doesn't work on files of any type that are open for
write access.

> or is it possible to fup dup anyother files that are opened? If yes, how?

FUP DUP opens the source file in protected mode. This will fail with Error 12 if another process
has the file open for read/write or write-only access, or has it open in exclusive mode.

I believe that it is possible to FUP DUP a file that is open by another process for read-only
access in shared or protected mode.

wbreidbach

unread,
Dec 19, 2013, 5:34:26 PM12/19/13
to
As far as I know there is no chance to DUP a file that is open for write/update. COPY and LOAD support shared access, DUP does not.
In addition there is no way to access an EDIT-file that is open by EDIT or TEDIT with write access, because both open the file in exclusive mode. I will have a look if that is possible if the file is opened by another program tomorrow.

Bill Honaker

unread,
Dec 19, 2013, 7:48:32 PM12/19/13
to
If the edit file is opened in read only mode you may be able to dup
it.

If it is open for write you probably wouldn't want to even if were
allowed, as the index blocks may be corrupt.

It depends on the 'protection' mode. If it's open 'shared', then you
should be able to dup it, 'protected' and 'exclusive' mode won't allow
it. Note that if the file is being updated, depending on the file
type you may have a different issue with index blocks.



wbreidbach

unread,
Dec 20, 2013, 4:01:32 AM12/20/13
to
I just gave it a try, I opened a type 101 file for update with shared mode

fup listopens work

$DATA02.WOLFGANG.WORK
PID MODE USERID SD MYTERM PROGRAM FILE NAME
250,00,1100 R/W-S 255,250 00 $ZTNP0.#PTD1WAK $DATA02.APPLSRV.BREDIT

fup copy work works, but

fup dup work,work1
ERROR - $DATA02.WOLFGANG.WORK: OPEN ERR 12
*ABEND*

So there is no chance to dup a type 101 file opened for update.

Doug Miller

unread,
Dec 20, 2013, 8:22:09 AM12/20/13
to
wbreidbach <wolfgang....@gmail.com> wrote in news:c1c3471d-ee2a-4e4c-a25e-
f73b1c...@googlegroups.com:

> So there is no chance to dup a type 101 file opened for update.

There is no chance to FUP DUP *anything* that's opened for update. FUP DUP opens the
source file read-only protected. Protected mode means "I can write to it, but nobody else
can" -- which means that an attempt to open a file in protected mode is guaranteed to fail if any
other process has the file open with read-write or write-only access.

wbreidbach

unread,
Dec 20, 2013, 8:37:29 AM12/20/13
to
Yes, Doug, you are right. If would not make any sense to dup a file open for update because the resulting file would pbobably be corrupt. And neither FUP nor SQLCI offer a SHARE option with DUP.
What could be done is creating a file with CREATE newfile, LIKE oldfile and COPY (or LOAD) oldfile,newfile,SHARE as long as oldfile is not opened in exclusive mode.

wbreidbach

unread,
Dec 20, 2013, 8:39:41 AM12/20/13
to
LOAD does not work with type 101 files, in case of structured files LOAD is usually faster than COPY.
0 new messages