IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

is this a bug or is it working as per design??


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
adbanginwar

New User


Joined: 06 Sep 2007
Posts: 8
Location: Pune

PostPosted: Fri Dec 21, 2007 10:49 am
Reply with quote

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. icon_sad.gif
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Dec 21, 2007 10:53 am
Reply with quote

Abhi,

Quote:
thought disp=shr means we cannot modify the data content of files.

May I know, where did youget this?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Dec 21, 2007 10:55 am
Reply with quote

adbanginwar wrote:
i thought disp=shr means we cannot modify the data content of files. icon_sad.gif


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
View user's profile Send private message
adbanginwar

New User


Joined: 06 Sep 2007
Posts: 8
Location: Pune

PostPosted: Fri Dec 21, 2007 1:52 pm
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Dec 21, 2007 2:02 pm
Reply with quote

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
View user's profile Send private message
adbanginwar

New User


Joined: 06 Sep 2007
Posts: 8
Location: Pune

PostPosted: Fri Dec 21, 2007 2:50 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Dec 21, 2007 4:31 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Dec 21, 2007 11:24 pm
Reply with quote

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
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Fri Dec 21, 2007 11:58 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts ICETOOL with JOINKEY for Big record l... DFSORT/ICETOOL 12
No new posts JCL JOB Cancel/Purge Not Working JCL & VSAM 6
No new posts OMVS Shell Script not working properly. All Other Mainframe Topics 1
Search our Forums:

Back to Top