Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CRTDUPOBJ problem with *QDDS

Status
Not open for further replies.

Kath01

Programmer
Mar 22, 2006
2
SE
In my CL I have done an ALCOBJ on a file with *EXCL as the Share option. The ALCOBJ is definitely successful. I then do a CRTDUPOBJ which gets a CPF3203 and CPF3163 message. Below is the message from my joblog. Has anyone come across this problem and a way around it?
Kind regards
Kath
Message . . . . : Cannot allocate object for file F5H08 in JRWLXDP.
Cause . . . . . : The requested operation was not performed for member F5H08
file F5H08 in library JRWLXDP, because member F5H08 file F5H08 in library
JRWLXDP type *QDDS was not available. Recovery . . . : Try the request
again when the object is available.
30 09-12-05 01:27:19.680232 QDBDUPFI QSYS 03F4 J5H08 JRWLPTFO11 00E0
Message . . . . : Cannot create duplicate member F5H08 in file F5H08.
Cause . . . . . : An error occurred while you were trying to create a
duplicate of member F5H08 from file F5H08 in library JRWLXDP into file F5H08
in library QTEMP. File F5H08 in library QTEMP will exist and contain only
those members created before member F5H08. Recovery . . . : See the
previously listed messages to determine the specific cause of the error.
After correcting the problem, do one of the following: -- Use either the add
logical file member (ADDLFM) command or the add physical file member
(ADDPFM) command to add those members that were not added to the file. Then
if the data is to be duplicated use the copy file (CPYF) command to copy the
data. -- Use the delete file (DLTF) command to delete file F5H08 in library
QTEMP. Then try the create duplicate object (CRTDUPOBJ) command again.
 
Any reason why you need to allocate the object before you create a duplicate of it?

Feles mala! Cur cista non uteris? Stramentum novum in ea posui!

 
Do CRTDUPOBJ first then ALCOBJ.

As soon as the file object is exclusively allocated, you cannot use it to do anything else (crtdupobj). You need to deallocate it first before to make it available.
 
I'm guessing that the reason Kath is allocating it is so that no other job can "interfere" with it.

ALCOBJ is a strange command, because it is described thus:

"The Allocate Object (ALCOBJ) command is used to reserve an object or list of objects for use later in the job or thread"

But it doesn't explain that you can't always do what you want with it whilst it's allocated.
 
Thanks for the responses.
I may have solved my own question. What I have found is that 2 jobs were running concurrently at the time that the *QDDS message was sent to the one job. It seems obvious that the ALCOBJ was not successful in the second job, possibly because I am currently only monitoring for message CPF1002. I am going to try monitoring for CPF1085 too. Hopefully this should do it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top