![]() ![]() What if you defined librefs for each of the caslibs that you want to view in the Libraries tree, but some CAS tables are not displayed for a caslib? When you want to specify a name for a caslib, keep these SAS name rules in mind. The CAS LIBNAME engine does not support a SAS name literal for a caslib name. In the following image, the Libraries tree now includes the SYSDATA libref, which enables you to view the CAS tables that are stored in the SystemData caslib.Īnother issue that you might encounter is that the name of the caslib is defined as a SAS name literal, such as containing character spaces in the caslib name, and you cannot associate a libref with that caslib. If a caslib name is longer than eight characters, you can use the LIBNAME statement with the CAS engine to associate your caslib with a libref that meets the requirements for a SAS name.įor example, to define a libref for the SystemData caslib, you can use a shorter libref name, such as SYSDATA: The name that is used for a SAS libref must conform to the rules for a SAS name. However, a libref name is limited to eight characters, so SystemData could not be used as a libref name. This note is produced because the LIBNAME statement attempted to define a libref named SystemData to be associated with the caslib SystemData. The CASLIB name is not valid for use as a libref. NOTE: CASLIB SystemData for session CASAUTO will not be mapped to SAS Library SystemData. The rules for caslib names are not the same as the rules for librefs, so not all caslib names can be used as libref names.įor example, when you use the CASLIB _ALL_ ASSIGN statement, you might see a note like the following written to the log: What if you followed the above instructions and see some, but not all, of the librefs for your caslibs in the Libraries tree? Troubleshooting Some librefs are not shown Whether you use the table.caslibInfo action or the CASLIB _ALL_ LIST statement is a matter of preference for where you want to view the results.Īdditional options are supported for the LIBNAME statement and can be found in the CAS LIBNAME engine documentation. Note that you can also use the CASLIB _ALL_ LIST statement to view the list of caslibs in the SAS Studio log. ![]() The following statement shows the syntax to define the libref: To do that, use the LIBNAME statement with the CAS engine to define a libref that is associated with a specific caslib. However, if you do not want to include all caslibs in the Libraries tree, you can define librefs for only the caslibs that you want to include. The CASLIB _ALL_ ASSIGN statement defines a libref for each of your caslibs. SAS Snippets ► SAS Viya Cloud Analytic Services ► Generate SAS librefs for caslibs Use the LIBNAME statement and CAS engine to associate specific caslibs You can also use the following SAS Studio snippet to create a libref for each caslib: The librefs that are associated with caslibs are identified by a cloud and snowflake icon that is next to the caslib name: Use the CASLIB _ALL_ ASSIGN statement to associate all caslibsĪfter you establish a CAS session (by using the CAS statement), you can associate a libref with each of the defined caslibs by running the following statement:Īfter you submit this code, you can see in the log that a libref was created for each caslib, and the name of the caslib is used as the name of the libref.Īfter you define a libref for each caslib, the Libraries tree is then updated to include these new librefs, as shown in the following image. To view caslibs in the Libraries tree, you need to associate a libref with each caslib. Note: No caslibs are displayed in this list. In the following image, the Libraries tree displays the default libraries:Īny user-defined libraries would appear in this list as well. The Libraries tree in SAS Studio displays the defined librefs where you can select and view your data sets. The LIBNAME statement enables you to create these types of shortcut names. A CAS library name, or caslib, is a shortcut name that references an in-memory space that holds your CAS tables. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |