1 / 19

Why use... SAS/SHARE?

Why use... SAS/SHARE?. Andrew Ratcliffe Freelance SAS consultant Ratcliffe Technical Services Limited. Allow Concurrent Update Access to a Data Set.

bazyli
Download Presentation

Why use... SAS/SHARE?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Why use... SAS/SHARE? Andrew Ratcliffe Freelance SAS consultant Ratcliffe Technical Services Limited

  2. Allow Concurrent Update Access to a Data Set If two users attempt to update the same data set at the same time, the second will be told that the data set is in use - even though he/she may wish to update a different record to the first user

  3. Maintaining a Simple Look-Up Table • Pharms industry: table used for unit conversion • Use VIEWTABLE to maintain it • Updates must be single-threaded • Even with “Row Level Edit Access” • Update Mode: Record • CNTLLEV=RECORD

  4. One at a Time  

  5. SAS/SHARE Permits Concurrent Access • Two (or more) users may open a data set for update at the same time • Only one user may edit/update an individual record at any point in time • Other users may browse the record at the same time

  6. Others may browse at the same time This record cannot be updated at this time

  7. build_d = open ('sasuser.build (cntllev=record)', 'U’ ); : rc=fetchobs (build_d, pointer ); if rc eq %sysrc(_SWNOUPD) then do; call send (_frame_, '_set_msg_', sysmsg() ); /* ... Prevent updates? ... */ end; else ... %macro sysrc(mac_name); !SASROOT\core\sasmacro : %let _SWNOUPD = -630054; /* This record cannot be updated at this */ /* time */

  8. SAS/SHARE Makes Users Effective • If you need concurrent update access to one or more data sets: SAS/SHARE is a proven, effective solution

  9. Release Observations • Clicking on another observation • Fetching another observation • UNLOCK() function • Lock two observations by opening the data set twice

  10. Fully-supported Tried & tested Easily added to existing code Flexible Base SAS SAS/AF Data sets Catalog entries… Benefits

  11. The Down-Side • All data access is done via the server • Server is a separate task • Increased response times • Added hardware expense? • Operational overhead

  12. Start-Up: PROC OPERATE; START SERVER; Shut-Down: PROC OPERATE; QUIESCE SERVER; Operation: PROC OPERATE; ALLOCATE LIBRARY; Server: MVS job UNIX or NT process LAN requires PC A Few More Details

  13. Configuration SAS code runs on SAS/SHARE clients SAS/SHARE server All data accessed by server task - wide security scope required Data

  14. Protecting Inter-Related Data • Avoid deadly embraces by always accessing data elements in the same order • Use one data element as the access key Orders Accounts

  15. Why not use... SAS/SHARE?

  16. Why not use… SAS/SHARE • “It costs money” • Low frequency of concurrent access • Data structures can be designed to avoid/minimise contention • Need non-volatile locking

  17. Non-Volatile Locking • Prevent others’ access even whilst not actively accessing it yourself • Slowly progressing activities • Work-flow • Write your own locking mechanism

  18. Close • Easy to overlook (or ignore) your need • Make your applications more resilient • A necessity for high-contention data • May not be the most appropriate solution • Alternative data architecture • Non-volatile locking

  19. Any Questions? Andrew Ratcliffe SAS Institute Registered Consultant Ratcliffe Technical Services Limited Tel/fax: 01322-525672 Email: andrew@ratcliffe.demon.co.uk Web: http://www.ratcliffe.demon.co.uk

More Related