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

CPYF and COMMIT

226 views
Skip to first unread message

Nob

unread,
Mar 22, 2004, 8:40:28 AM3/22/04
to
Hi All,

I want to do the following process using CPYF and COMMIT.

1.Receive a file by file transfer application such as FTP
2.Copy the file to existing file that has unique key by using CPYF
MBROPT(*ADD)
3.If a duplicate key is found, do ROLLBACK and cancel the copy operation

I tested above process using CL but I couldn't do ROLLBACK.
Can't a commitment control be used in CPYF operation?

Any suggestions would be appreciated.

Thanks,
Nob

Rough Diamonds

unread,
Mar 22, 2004, 3:34:58 PM3/22/04
to
You could do the CPYF on a duplicate file in an other Library. If it occurs
to be a duplicate Key, then no
record is actuallly added on the original File.
Not very smart but it will do the job.

"Nob" <tur...@bd6.so-net.ne.jp> a ecrit dans le message de news:
newscache$fkczuh$qp6$1...@news01a.so-net.ne.jp...

Saml

unread,
Mar 22, 2004, 8:02:24 PM3/22/04
to
Is the file journaled and did you start commitment control?

Sam

"Nob" <tur...@bd6.so-net.ne.jp> wrote in message
news:newscache$fkczuh$qp6$1...@news01a.so-net.ne.jp...

Nob

unread,
Mar 23, 2004, 8:59:29 AM3/23/04
to
Of course I have started journal and commitment control.
My CLP is as follows,

STRCMTCTL
CPYF
MONMSG CPF5009 CPF5034 EXEC(ROLLBACK)
ENDCMTCTL

Thanks and regards,
Nob

"Saml" <no...@nonesuch.com> wrote in message
news:j1M7c.579$oF.1...@eagle.america.net...

Christian Gstalder

unread,
Mar 23, 2004, 12:17:46 PM3/23/04
to
Hi,

If you do a DSPJRN, are the entries for destination file linked to a commit
boundary?

If not, I'll suggest to do a STRCMTCTL CMTSCOPE(*JOB)

--

Christian Gstalder


"Nob" <tur...@bd6.so-net.ne.jp> a ecrit dans le message de
news:newscache$fkczuh$qp6$1...@news01a.so-net.ne.jp...

0 new messages