View previous topic :: View next topic
|
Author |
Message |
adbanginwar
New User
Joined: 06 Sep 2007 Posts: 8 Location: Pune
|
|
|
|
I encountered this now so i am a bit surprised.
In a job we have utility called fileaid....
it takes a control card as input and replaces data in input datasets...
now the question is ;
even if the datasets is specified with disp=shr the values in datasets are getting replaced.... it shouldnt right??
i thought disp=shr means we cannot modify the data content of files. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Abhi,
Quote: |
thought disp=shr means we cannot modify the data content of files. |
May I know, where did youget this? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
adbanginwar wrote: |
i thought disp=shr means we cannot modify the data content of files. |
No, just the opposite. The disposition is SHARED, so any number of applications can access (READ or WRITE) the dataset at the same time. There's no disposition I've ever heard of that prevents updates to a dataset. That's a RACF access rights issue. |
|
Back to top |
|
|
adbanginwar
New User
Joined: 06 Sep 2007 Posts: 8 Location: Pune
|
|
|
|
This is the JCL for your reference:-
Code: |
//FAUPS1 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=RS7171.ACIS.STGE.#005233.PRC
//SYSIN DD DISP=SHR,DSN=TES0B.R0711.CNTLLIB(AC04PROC)
|
|
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Abhishek,
Quote: |
//SYSIN DD DISP=SHR,DSN=TES0B.R0711.CNTLLIB(AC04PROC) |
And what does the SYSIN dataset contain? We cant see your MF. Can we? |
|
Back to top |
|
|
adbanginwar
New User
Joined: 06 Sep 2007 Posts: 8 Location: Pune
|
|
|
|
The control card contains following statements;
EA=(1,0,C"='INSTALL.CNTRLIB'",C"='DXY2B.CNTLLIB'"),
EA=(1,0,C"='INSTALL.SQLSRCE'",C"='DXY2B.SQLSRCE'"),
EA=(1,0,C"='INSTALL.DB2CNTL'",C"='DXY2B.DB2CNTL'"),
EA=(1,0,C"='INSTALL.CTLDATE'",C"='DXY2B.XY5TM1.CTLDATE'"),
EA=(1,0,C"='INSTALL.DB2CNTL'",C"='DXY2B.DB2CNTL'"),
EA=(1,0,C"='INSTALL.DBRMLIB'",C"='DXY2B.DBRMLIB'"),
it basically replaces INSTALL.CNTRLIB with DXY2B.CNTLLIB after end of job. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
i thought disp=shr means we cannot modify the data content of files. |
the JCL "DISP" keyword and its operand are not related to the use
being made of the dataset inside the program...
are only related to the "ALLOCATION" environment..
which means .. actions to be taken in order to make the dataset
available to the application
new... dataset not exists, will be physically defined/allocated
shr... dataset exists, will allow access by other processes
old... datasets exists, an enqueing mechanism will be setup in order to avoid concurrent access
mod... peculiar parameter, dataset will be physically defined if non existent,
otherwise the existing one will be used;
if opened write ( for PS dataset) it will not be overwritten and
records will be added at the end |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
even if the datasets is specified with disp=shr the values in datasets are getting replaced.... it shouldnt right?? |
As has already been posted, the DISP will not change how a process works - it may interfere with allocation, but should not cause a process to run differently.
SHR simply says that multiple allocations of the dataset are possible.
Is there something you need to do or prevent from happening? |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
As a general rule you should not allow access by another job while a dataset is being updated. If another job were to read this dataset while it was being updated, it may get partially updated data. What affect might this have on the other job? If 2 jobs are updating a data in a file at the same time, some of the updates may get lost. What affect might this have? It is up to the programmer to consider these thing and assign the disp accordingly. |
|
Back to top |
|
|
|