No announcement yet.

Assign Libnames

  • Filter
  • Time
  • Show
Clear All
new posts

  • Assign Libnames

    Assign Libnames

    (Revised 3/25/2015) This macro was revised to simplify it to use only the study path a parameter. The CPDM path is now specified internally in the macro.

    When you need to run a SAS program against a study in the Data Management system from outside of the system, the data should be obtained using the System and Study Level data views that are defined by the system. These views are located in the GVIEWS and PVIEWS libraries. The views are generated by the system and contain the passwords required to access the data in a read-only state. The problem is that you will need to assign the appropriate libnames for the views to work correctly. Also, if you are using SAS Share with the data management system, then your external access should also go through SAS Share.

    The following macro code can help facilitate the use of data externally. The macro allows for the SAS Share Parameters to be assigned and takes care of the leg work in assigning the libnames.

    Note: This macro assumes that you have used the default directory names for the study libraries.

    The following items can be assigned within the macro code:
    • The path to the CPDM 3.x root directory
    • serverIp= specify the ip address of the Share server. If you are not using SAS Share then you don't need to specify this.
    • serverPort= specify the server port number on which to communicate with SAS Share.
    • sapw= specify the user access password for the Share Server.

    The macro call takes one parameter:
    • The path to the desired study.

    Alternative data access method
    Another method for accessing data CPDM data outside of the system is to create external data views with embedded connection information. This method can be found here:

    Attached Files
    Last edited by Greg Wagner; 03-25-2015, 02:33 PM. Reason: Revised code