IDCAMS query



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

IDCAMS query

Postby vinay238018 » Sat Feb 18, 2012 10:29 pm

Hi,
I am Copying a Dataset into another data Set using IDCAMS Utility.

REPRO INDATASET(INPUT.FILENAME) -
OUTDATASET(OUTPUT.FILENAME)


But it is failing whenever "INPUT.FILENAME" is opened, Is there is a way to resolve this issue using INDATASET and OUTDATASET in IDCAMS.

Please help.
vinay238018
 
Posts: 6
Joined: Sat Feb 18, 2012 9:54 pm
Has thanked: 0 time
Been thanked: 0 time

Re: IDCAMS query

Postby NicC » Sat Feb 18, 2012 10:32 pm

How is it failing? What are the error messages and codes. How do you expect people to help if you do not give details of what is wrong? Are those 2 lines the only SYSIN to your IDCAMS step? Might also be a good idea to post the file attributes for both input and output.

Oh, and use the code tags - available via the 'POST REPLY' button rather than the 'Quick Reply' button.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: IDCAMS query

Postby vinay238018 » Sat Feb 18, 2012 10:40 pm

The O/P Codes is as follows:
IKJ56225I DATA SET INPUT.FILENAME ALREADY IN USE, TRY
IKJ56225I LATER
IKJ56225I DATA SET IS ALLOCATED TO ANOTHER JOB OR USER
IDC0005I NUMBER OF RECORDS PROCESSED WAS 0
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12

Data Set attributes are from FB 80 to FB 80.
vinay238018
 
Posts: 6
Joined: Sat Feb 18, 2012 9:54 pm
Has thanked: 0 time
Been thanked: 0 time

Re: IDCAMS query

Postby BillyBoyo » Sat Feb 18, 2012 11:03 pm

And what is it that is unclear? "Someone else", could be you, has the dataset you are trying to copy from open, and your dataset is defined not to allow anyone else to read it whilst it is in that particular state (open for read, open for update, we don't know).
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: IDCAMS query

Postby bodatrinadh » Sat Feb 18, 2012 11:08 pm

It is clearly says

"IKJ56225I DATA SET INPUT.FILENAME ALREADY IN USE, TRY
IKJ56225I LATER
IKJ56225I DATA SET IS ALLOCATED TO ANOTHER JOB OR USER"

Either you or other user/job is using your file. Try to close it and rerun the job.

Thanks
-3nadh
Thanks
-3nadh
User avatar
bodatrinadh
 
Posts: 67
Joined: Thu Jan 12, 2012 9:05 pm
Has thanked: 0 time
Been thanked: 4 times

Re: IDCAMS query

Postby vinay238018 » Sat Feb 18, 2012 11:08 pm

This is what i wanted to ask that ,whether we use in SHR mode with REPRO options in INDATSET to OUTDATASET Copy.
Is that possible.
Even if it is used by some Job or User, we can use that file in Share mode while doing a Copy in IDCAMS (INDATSET to OUTDATASET) options.

Please advice.
vinay238018
 
Posts: 6
Joined: Sat Feb 18, 2012 9:54 pm
Has thanked: 0 time
Been thanked: 0 time

Re: IDCAMS query

Postby bodatrinadh » Sat Feb 18, 2012 11:12 pm

Check in SPOOL, Whether your job is showing any contention with any resourse.

Thanks
-3nadh
Thanks
-3nadh
User avatar
bodatrinadh
 
Posts: 67
Joined: Thu Jan 12, 2012 9:05 pm
Has thanked: 0 time
Been thanked: 4 times

Re: IDCAMS query

Postby BillyBoyo » Sat Feb 18, 2012 11:22 pm

Is it your dataset? If not, talk to the person(s) responsible for it, explain what you want to do, and why, and follow their advice.

It is possible to define a VSAM dataset in several ways. If it is yours, look at Shareoptions as part of the DEFINE/ALTER.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: IDCAMS query

Postby vinay238018 » Sat Feb 18, 2012 11:53 pm

Thanks every one,

this means we cannot use the file used by USER or Job in REPRO Command of IDCAMS in Share mode for INDATASET options.
vinay238018
 
Posts: 6
Joined: Sat Feb 18, 2012 9:54 pm
Has thanked: 0 time
Been thanked: 0 time

Re: IDCAMS query

Postby enrico-sorichetti » Sun Feb 19, 2012 12:56 am

shareoptions is not involved here ...
when using the INDATASET/OUTDATSET clauses IDCAMS allocates with <DISP OLD>

if You have the dataset allocated and You do not have <integrity> issues then
allocate the datasets using the jcl DD statements and use the INDD/OUTDD clauses
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post