Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: is this a bug or is it working as per design??
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: 1439
Location: Bangalore,India

PostPosted: Fri Dec 21, 2007 10:53 am    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Dec 21, 2007 10:55 am    Post subject: Re: is this a bug or is it working as per design??
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    Post subject: Reply to: is this a bug or is it working as per design??
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: 1439
Location: Bangalore,India

PostPosted: Fri Dec 21, 2007 2:02 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Fri Dec 21, 2007 4:31 pm    Post subject: Reply to: is this a bug or is it working as per design??
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

Site Director


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

PostPosted: Fri Dec 21, 2007 11:24 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Design of ISPF panel prino TSO/ISPF 2 Wed Jan 25, 2017 10:31 pm
No new posts SCRNAME not working on my mainframe? mrsidhu12 TSO/ISPF 7 Thu Sep 01, 2016 2:17 pm
No new posts 2 same CLIST pgm but with different n... boyti ko CLIST & REXX 5 Fri Jun 03, 2016 4:55 pm
No new posts REXX Screen not working due to LINKED... sundarkudos CLIST & REXX 1 Mon May 09, 2016 1:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us