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
 

 

Mutiple users updating the same dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
vidyaa

New User


Joined: 02 May 2008
Posts: 72
Location: chennai

PostPosted: Fri Aug 29, 2008 11:53 am    Post subject: Mutiple users updating the same dataset
Reply with quote

Hi Friends,

is there any way that multiple users can update on the same datset set at the same time without getting the contention.

am using
"ALLOC FI(OUTX) DA('"OUTDS"') MOD REUSE"

your suggestions please
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Aug 29, 2008 12:21 pm    Post subject:
Reply with quote

Have you checked out DISP=MOD in the JCL manual
Back to top
View user's profile Send private message
malathy_tv

New User


Joined: 29 May 2007
Posts: 34
Location: chennai

PostPosted: Fri Aug 29, 2008 6:04 pm    Post subject:
Reply with quote

this is in REXX any way i have used MOD only but then too we have this problem
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Aug 29, 2008 6:07 pm    Post subject:
Reply with quote

Well, you have not expressed that there is a problem, merely asking a question.

REXX, JCL - the result is the same when you specify a disposition, that is why I referred you to the JCL manual.

So if you actually do have a problem - would you care to explain it for us to look at.
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 Aug 29, 2008 9:08 pm    Post subject:
Reply with quote

Hello,

Quote:
i have used MOD only but then too we have this problem
Is your problem that only one user can access the dataset at a time?

This is not a problem - it is the way MOD is designed to work.

If you explain why multiple people need to update the dataset at the same time, we may be able to offer suggestions.
Back to top
View user's profile Send private message
malathy_tv

New User


Joined: 29 May 2007
Posts: 34
Location: chennai

PostPosted: Mon Sep 01, 2008 10:19 am    Post subject:
Reply with quote

actually i have written a rexx which needs to get input from the user and update in an output file along with the request number.for first user request one, second one request two and so on.
so when more than one user try entering values for the output file gets the contention message and the second request number gets the request number one actually it needs to be two
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Sep 01, 2008 11:35 am    Post subject:
Reply with quote

Hi,

I'm not a REXX expert, however, I do play with files in batch. It's not good to use a single file across JOBs for such a taks described in this thread - what if two user enter the same "request number" at a given moment..?

If MOD is used & if the data set already existed - new records will be added to the end of the data set (for sequential files only), but it would take the "exclusive rights" of the DSN, when "one" is updating "other" can't, as told before- it is the way MOD is designed to work. Would suggest to use temparary files in different JOBs & then on "final" processing merge them daily..only a thought though- I don't know your requirement fully.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2061
Location: Silicon Valley

PostPosted: Mon Sep 01, 2008 9:51 pm    Post subject: Reply to: Mutiple users updating the same dataset
Reply with quote

How many users will there be? How many records will there be? Some designs will work on a small scale, but may not hold up when scaled to larger numbers. n a small scale, I think MOD will work.

1. the user types information / fills out screen / whatever, then presses Enter.

2. allocate file with MOD. If someone already has file allocated and the allocation fails, then wait 1 second and retry.

3. count number of existing records

4. write new record, using count+1

5. free the file immediately.

You can probably test your scheme with several batch jobs that sleep for random intervals, and that go through steps 2-5.

For a larger scale, use a VSAM dataset instead.
Back to top
View user's profile Send private message
Adrian Stern

New User


Joined: 13 Feb 2008
Posts: 12
Location: Sweden

PostPosted: Mon Sep 08, 2008 4:46 pm    Post subject:
Reply with quote

1 Create a started task to control your file
2 Let the rexx program pass the information to the started task
3 Contention disappears as started task is sole user of your file
4 Requests to be queued

Adrian
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 2 Fri Jul 28, 2017 9:10 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am


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