Language : sas
|Remove carriage return and linefeed characters within quoted strings||webonomic||SAS||character||
If a flat file contains embedded carriage return (CR) and linefeed characters (LF) inside double quotes, SAS will interpret them as end of line markers. This may cause your file to be read incorrectly. This example replaces CR/LF characters within double quotes with other printable characters. CR/LF characters outside of double quotes are untouched.
In this sample, the external file is updated in place. You cannot separate the input and output because the code uses shared buffers.
You should make a copy of your file before running this sample on it.
|Counting the number of observations in a BY-Group||webonomic||SAS||count||
Determine how many observations there are in each BY-Group by using BY-Group processing.
|Allow a list of non-numeric values for an iterative macro %DO loop||webonomic||SAS||list||
More details here: https://communities.sas.com/ideas/1084
|Using PATHNAME to Retrieve a Physical Path||webonomic||SAS||path||
If you know a libref or fileref, the PATHNAME function can be used to return the physical location.
If the libref refers to more than one physical location, all of those locations will be returned, in quotes, separated by spaces, with the whole list in parentheses:
|Using character values on a macro %DO loop||webonomic||SAS||list||
This sample contains 2 macro techniques for iterating through character values on a macro %DO loop.
|person age function||csrsen||SAS||sas||
For proper calculation of human age using DOB and an as-of date.
|Co Word Analysis with SAS||webonomic||SAS||document||
Text Miner uses a compressed representation of the term-by-doc frequency matrix. You will find an OUT data set in the project data directory of your text miner run. Its label will include the string "OUT" in it. Since a 30,000 document collection will have as many as 500,000 to a million distinct terms, be sure to restrict your terms of interest with a start list. I give an example of creating the cooccurrence matrix with the following code which expands the compressed version to an uncompressed version and then computes the co-occurrence count with proc corr and the sscp option.
|December 2, 2012|
|Using Alternating Background Color with PROC REPORT||webonomic||SAS||background||
Adding alternating row of color to make proc report output easier to read.
|November 2, 2012|
|Specify colors in SAS statistical graphics procedures||webonomic||SAS||output||
If you want to see some of the color names that SAS recognizes, run the following statements, which will print a list of colors to the SAS log:
|October 24, 2012|
|Default Macro Values||webonomic||SAS||macro||
Quite often it is necessary to set a default value for a macro parameter that is passed to a program. If the program is a macro, the %IF statement can be used to check if the value is provided and provide a default value if not. Since %IF statements are not allowed outside of macros, that technique won't work for a non-macro program (e.g., a file/program that is %INCLUDEd). The following code snippet demonstrates the use of the COALESCEC function to assign a default value.
since macro is a text manipulation facility, the coalesceC function is used regardless of whether the expected value for the parameter is numeric (i.e., everything in macro is interpretted as a character string).
|October 13, 2012|
|Ods Html Report||Pavonz||SAS||
Ods Html Report
|July 14, 2012|
|Creating a report of Twitter hashtag activity||webonomic||SAS||sas||
The program uses the XML LIBNAME engine, FILENAME URL, SGPLOT procedure, and a simple PROC PRINT to create a report of recent Twitter activity around a specified hashtag.
|April 13, 2012|
|[SAS] ETL Email Noticiation||ccw||SAS||notification||
An example to notify users with ETL job status
|March 29, 2012|
|[SAS] JSON output||ccw||SAS||json||
SAS code to output in JSON format
|March 26, 2012|
|[SAS] Applying ACT||ccw||SAS||control||
Applying Access Control Template to specific objects
|March 26, 2012|