IDCAMS query



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

Re: IDCAMS query

Postby vinay238018 » Sun Feb 19, 2012 2:08 am

Thanks , This explains somewhat. then can we override the Allocations using some override, or Parm to IDCAMS?
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 2:39 am

then can we override the Allocations using some override, or Parm to IDCAMS?

can You read ?
my reply was clear enough!
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

Re: IDCAMS query

Postby steve-myers » Sun Feb 19, 2012 7:37 am

Actually, Enrico used an incorrect IDCAMS keyword. When you use the INDATASET and OUTDATASET keywords, IDCAMS allocates the datasets with exclusive control. By using the INFILE(ddname) or OUTFILE(ddname) keywords you can specify DISP=SHR, which allows the command to run provided the job or TSO user that has the dataset allocated with shared access, like this
//STEP01  EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//INPUT    DD  DISP=SHR,DSN=input.dataset
//SYSIN    DD  *
  REPRO INFILE(INPUT) -
       OUTDATASET(output.dataset)
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: IDCAMS query

Postby enrico-sorichetti » Sun Feb 19, 2012 2:00 pm

:oops:
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

Re: IDCAMS query

Postby steve-myers » Mon Feb 20, 2012 11:23 am

It occurred to me the wording of my last post on this topic was poor, so I'll try again.

When you use the INDATASET and OUTDATASET keywords, IDCAMS allocates the datasets with exclusive control. By using the INFILE(ddname) or OUTFILE(ddname) keywords you can specify DISP=SHR in the JCL, which allows the command to run provided the other job or TSO user using the dataset has the dataset allocated with shared access. Your job would look like this -
//STEP01  EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//INPUT    DD  DISP=SHR,DSN=input.dataset
//SYSIN    DD  *
  REPRO INFILE(INPUT) -
       OUTDATASET(output.dataset)
If the other job or TSO user has input.dataset allocated with exclusive control, your job will not run until the other job or TSO user releases the dataset or the job ends or the TSO user logs off.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: IDCAMS query

Postby vinay238018 » Tue Feb 21, 2012 12:18 pm

Thanks a lot, it worked.
vinay238018
 
Posts: 6
Joined: Sat Feb 18, 2012 9:54 pm
Has thanked: 0 time
Been thanked: 0 time

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post