Skip to content

Instantly share code, notes, and snippets.

@abhishekdagarit
Last active September 22, 2017 15:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save abhishekdagarit/4fc6d0327029f2cabd00e251e864170d to your computer and use it in GitHub Desktop.
Special cases

Special cases

Maximum number of decimal places

proc print data=work.temp maxdec=2;
run;

labels in SAS

Rules for labels

1.Cant perform operations with lables. 2. Its only for display. 3. But it changes the dataset properties.

Defining single lables

proc print data=work.test;
label  salary='annual salary`;
run;

Defining multiple labels

proc print data=work.test;
label salary=`annual salary`;
      rating=`new rating`;
run;

Printing labels

proc print data=work.test;
label x=`new x`;
run;
proc print data=work.test;
var x;
run;

This will throw an error as you can not print or operate on labels. They are only for display.

page size

options ps=10;

list size

options ls=10;

Using page size or list size

options ps=10;
options ls=10;
proc print data=work.test;
run;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment