SQL (8) SQL option parsing in SAS, data dictionary

Source: Internet
Author: User
Tags password protection

inobs/outobs=

This option has been said in the previous essay, Inobs here's an example.

The inobs=5 here is for two tables read into 5, not altogether read five

Number/nonumber

The effect is as follows

Double/nodouble

Double Spacing your output to make it easier to read.

FLOW | NOFLOW | Flow=n | Flow=n m

The FLOW option causes text to being flowed in its column instead of wrapping the entire row

n Sets the width of the flowed column

N m makes the width of the column between n-m

Stimer | Nostimer

Nostimer is the default, and the effect is as follows

The run time of two SELECT statements is calculated together, with no comparative effect

After using Stimer, it has a comparative effect.

Resetting Options

You can use the RESET statement to add, drop, or change PROC SQL options without reinvoking the SQL procedure.

Add to

proc sql Outobs=5; Select Flightnumber, Destination  from  number; Select Flightnumber, Destination  from sasuser.internationalflights where  $ ; quit;

Delete

proc  Number ; Select name, address, city, state, ZipCode  from Sasuser.frequentflyers;reset Nonumber; Select name, address, city, state, ZipCode  from sasuser.frequentflyers where 7000  and  the ; quit;

Data dictionary

Dictionary tables is special, read-only SAS tables that contain information about SAS data Libraries, SAS macros, and external files that is in use or available in the current SAS sess Ion.
Dictionary tables also contain the settings for SAS system options and SAS titles and footnotes that is currently in effect

Dictionary table by referring to the PROC SQL view of the table, the is stored in the Sashelp library.

Working with Data dictionaries

proc SQL;     Table Dictionary.tables;quit;
/ * Here is a partial description of the table */
Create TableDICTIONARY. TABLES (LibnameChar(8) label='Library Name', MemNameChar( +) label='Member Name', MemtypeChar(8) label='Member Type', Dbms_memtypeChar( +) label='DBMS Member Type', MemlabelChar( the) label='Data Set Label', TypememChar(8) label='Data Set Type', crdate num format=DATETIMEInformat=DATETIMELabel='Date Created', modate num format=DATETIMEInformat=DATETIMELabel='Date Modified', nobs num label='Number of physical observations', obslen Num label='observation Length', nvar Num label='Number of Variables', protectChar(3) label='Type of Password Protection', CompressChar(8) label='Compression Routine', EncryptChar(8) label='Encryption',
.......
);
 /* we select all the tables in the library Sasuser, as well as their number of observations, the number of variables, and the date of the table, etc. */
proc SQL; select memname format20 from Span style= "color: #000000;" > Dictionary.tables where libname= " sasuser ;
/* Query the Sasuser library for all table names that contain column Empid */
Proc SQL; Select MemName from Dictionary.columns where libname='sasuser' and name=' EmpID';

SQL (8) SQL option parsing in SAS, data dictionary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.