SHARE and SHARE ALIKE Michael R. Gibson, The Gates Rubber Company

As The Gates Rubber Company's SAS® Wizard, 1 To allocate departmental libraries, I have adopted needed a way to share SAS libraries efficiently the follOwing conventions: among several groups of users. SAS/SHARE®, a relatively new product in the SAS system, helped 1. SASLIB is allocated as "dept. " me accomplish this objective. This paper will 2. SASPROF is allocated as "deptuser. " show the three key features of my implementation 3. CNTL is allocated as "deptcode. " SAS/SHARE at Gates, using examples from my TSO CLIST for operating in a MVS/XA Similarly, my one divisional application, for our environment on an IBM 3084, and my SAS Operations Division, is named to "OPERDlV," and AUTOEXEC files. their libraries are allocated as "oper" and "opertiser." There is no "opercode" at present. STANDARDIZED LIBRARY NAMES: Standardized library names greatly simplifies The first key to the effective use of SAS/SHARE is implementing SAS/SHARE as my TSO CLIST will standardizing library names. The SAS system at show. Gates is supported by the Computer Information Center, therefore, I use ·CIG" as the high-level TSO CLlST: prefix for all library names. The following suffixes form the last element of all SAS libraries: For convenience, my entire TSO CLIST is appended to the end of this paper, but I would 1. SASLIB data libraries. like to draw attention to a few major points. 2. SASPROF-- SAS/AF catalog libraries. 3. SASFMT permanent format libraries. • Lines 26 - 30 set up the default library names. 4. CNTL code libraries that are standard This is greatly simplified by using the naming OS partition data set with PS conventions discussed in the previous section. organization. Lines 32 - 38 allocate a special, permanent, Middle level names are based on application department level format library. This must be usage. At Gates, applications fall into one of done before starting SAS, and is the only time I three categories - single user, departmental or have to hard-code user TSO logon ids within the divisional. For single user applications, I use the CLIST. individual's TSO logon id as the middle level name. • Lines 40 - 47 check for user libraries. If none My logon is MG9950, for example, and my SAS are found, the defaults are set to missing, and data library, therefore, is "CIC. MG9950. SASLlB." allocations are controlled with the AUTOEXEC Libraries are allocated to individual users as file. follows: • Now for the magic: lines 65 - 72 check to see if 1. SASLIB as "user." the user has an individual AUTOEXEC file. If 2. SASPROF as "sasuser." not, a default AUTOEXEC file is used. 3. CNTL as "code." • Finally, in lines 73 - 74, SAS is invoked using Department names are abbreviated to form a the CLIST provided at installation, and the TSO meaningful acronym. For instance, the CLIST variables from the previous lines. Advertising Department at Gates is "ADVERT," and their data is stored as "CIC.ADVERT.SASLIB. "

1362 SAS AUTOEXEC: As an aside here, I might mention an additional naming convention that expedites updating Standardized names and the TSO CLIST lead us to department level applications. Whenever possible, SAS AUTOEXEC. If the user has a member in related datasets, SAS/FSP® screens and code are the AUTOEXEC Library, the SAS DMS Editor will given the same name within given catalogs. For execute the program for the user. PD9703, for instance, in "CIC,ADVERT ... ; catalog example, has such a member in the AUTOEXEC "Deptuser. Traffic" makes use of a data set named Library: -Dept. TralTic," which is associated with ·a permanent fsedit screen, "TraffiC. Screen," and is BROWSE - PROD.USER.SASEXEC(PD9703) invoked by "Deptcode(Traffic). " - ....._- ..., .. , """'TOP OF DATA m."""...., __~ 10 PGM: 20 CAPS ON: Line 60 allocates the individual user's SAS library, 30 X ALLOC F(DEPTCODE) DA('CIC.ADVERT.CNTL·) SHR: again with a libname statement. I suggest using 10 SUB 'LlBNAME DEPT SERVER·MCR ·CIC.ADVERT.SASLIB';': the libname statement to allocate all SAS libraries. 50 SUB 'LlBNAME DEPTUSER ·CIC.ADVERT.SASPROF' DlSP-SHR;': 60 SUB 'LlBNAME USER ·CIC.PD9703.SASLIB':": It has proved to be easier and cleaner, with the 70 SUB 'PROC DlSPLA Y C-SASUSER.STARTUP,MAIN.PROGRAM: added advantage that when the user exits SAS, RUN:': the libnames' are automatically de-allocated. ------BOTTOM OF DATA ------Finally, line 70 submits a "proc display" to start Line 10 puts DMS into the program editor screen, up the user's applications. At Gates, I have made while line 20 sets caps on as the user's preference. it a standard that all SAS users have a SASUSER Line 30 is a TSO system command to allocate librer with a "Startup" catalog containing an PD9703's departmental code library. TSO Allocate SASI AF program called "Main. Program." This is is recommended here because I have found that a very powerful tool because a SASI AF program SAS libname sometimes does not work properly in can start any other member type. This also allocating control libraries. simplifies adding users to or deleting them from shared library environments. Line 40 is the key to bringing up SAS/SHARE. At the present time, I bring up only two servers, As we have seen, SAS/SHARE administration and SHARE and MCR, using a Ubname statement to implementation can become relatively simple and allocate the shared library to the correct server. transparent with a little pre planing. I have to insure that the servers have been started correctly Line 50 submits a libname statement to allocate a and I have to maintain the AUTOEXEC files when shared, departmental SASI AF® catalog library. there is a change in user status. Note that it is allocated with "disp=shr," because at the present, SAS/SHARE cannot handle catalog entries. Individual catalog members, therefore, cannot be updated unless all server users exit SAS, and the catalog library is re-a1located with "disp=old. "

1363 ,DIT --- TSO.ClISnCICSCOO) - 01.20 .. ***** .. ** .. *** .... ************ TOP OF DATA ************************** 00000 I PROC 0 + 000002 PRE (Clc) " USER PREFIX" + 000003 USER (&SYSUID) " USER HUmR" • 000004 INPUT 0 '* SAS INPUT FILE *' + OOOOOS LOG 0 '* SAS LOG FILE *' + 000006 OPTIONS 0 '* SAS OPTIONS *' + 000007 TRACE 000009 IF &TRACE NE THEN + 000010 CONTROL END(DEND) MSG SYMLlST CONLIST 000011 ELSE 000012 CONTROL END(DEND) MSG NOSYMLlST HOCONLIST NOflUSH 000015 /"'--______------Jlj 000016 f* NAME: CICSCOO *f 000017 '* WRITTEN 6Y: Michael Gibson June 1966 version5.t6 *1 000018 '* DESC; InvokeSAS INTERACTIVE *' 000019 /'" MOO: To include SPECIAL user AUTOEXEC for SAS/SHARE "'/ 000020 lilt USER-ID must have a member in PROO.usER.SASEXEC lib. II / 000022 1* ------* f 000025 ,,------SET USER DA TASETS NAMES ------" 000026 SET &L1B = 1>.PRE..&USER ..SASLIB " SAS DSN LIBRARY" 000027 SET &PRO = &PRE .. II.USER .. SASPROF " SAS AF CAT LIBRARY" 000028 SET II.COO = &PRE .. Il.USER..CNT " SAS COIlE LIBRARY" 000029 SET &MAC = &PRE .. &USER ..SASMACRO " SAS MACRO LIBRARY" 000030 SET &FMT = &PRE .. &USER .. SASFMT " SAS PERM FORMAT LIBRARY " 000031 "------CHECK FOR DEPARTMENTIAL FORMA TlIBRARY ------" 000032 IF &USER = DJ5075 OR + 000034 &USER = TW9316 OR + 000035 &USER = 150074 OR + 000036 &USER = PD9703 OR + 000038 "USER = L58072 THEN SET &FMT = CIC .ADVERT.SASFMT 000039 "------CHECK FOR USER LIBRARIES ------" 000040 IF &SYSDSNC&LfS·, NE OK THEN SET &L18= 000041 ELSE SET &lIB=··&L18" 000042 IF &SYSDSNC/.PRO·) N£ Of( THEN SET &PRQ= 000043 ELSE SET &PRQ="&PRO- 000044 IF &SYSDSNCII.COIYJ NE OK. THEN SET &COO= 000045 ElSE SET &COO="&COO" 000046 IF &SYSDSNC&MAC·l NE OK THEN SET &MAC= 000047 ElSE SET &MAC="&MAC 000049 "------FORMAT LIBRARY MUST 6E ALLOCATED BEFORE " 000050 ,,---.. ---- START OF SAS SYSfEM " 000051 IF II.SYSDSNC&FMTJ EQ OK THEN + 000052 ALLOC HSASlfBl DAC&FMrJ REUSE SHR 000064 "------ALLOC AUTOEXEC FILE AND 5T ART SA5 ------" 000065 SET DSN=PRoo .USER.5ASEXEC(&USERI " CHECK FOR AUTOEXEC " 000066 IF &SVSDSN(·&DSN·' NE OK THEN + 000067 ALLOC F(SASEX£C) DACPRoo.uSER.SASEXEC(DEFAUL m SHR REUSE 000009 lLSE DO 000070 ALLOC F(SASEXEC) DA(PRoo.USER.5ASEX£C(&USERl"l SHR REUSE 000071 SET &lIB= 000072 DEND 000073 DOlT: SAS AUTOSC&MAC·) UCODECII.COD"l SASUSERCII.PRO·) + 000074 USER('&lf8·) OPTlONSr&OPTIONSI & TRACE 000075 /* ------EXIT SYSTEM ------*! 000076 END; IF &SYSISPF EO ACTIVE THEN EXIT 000077 ELSE LOGOFF *If .*M_ •• II II Ii*.* If._._ ill * _******** BOTTOM OF DATA*.1f III II _ •• * .***** .If.lilt *1f*1I II

SAS, SAS/AF, SAS/FSP, and SAS/SHARE aTe registered trademarks of The SAS Institute Inc., Cary, NC, USA

1364