Desktop productivity for business analysts and programmers

Simple Expression in Enterprise Guide

Not applicable
Posts: 0

Simple Expression in Enterprise Guide

I am trying to use a simple expression is Enterprise Guide looking at one column of data. My question is how do you call the column and the cells.

if abs((x+1)-x)>0.05

then y = ((x+1)-x);

else y=0;
Not applicable
Posts: 0

Re: Simple Expression in Enterprise Guide

Posted in reply to deleted_user
SAS is a data oriented processing language.
It views the world through datasets = tables.
Each row or record is called an observation.
Each column or field is a variable defined for that dataset.
SAS assumes you want to process each observation in a dataset, with the goal of deriving summarized statistics: sum, count, max, min, mean, median, stddev, etc. or regressions, correlations, etc.
SAS assumes you want to report on the summarized data as well.

So, to simplify the programming efforts, you don't necessarily need to open, read, loop through, and close a file. It is assumed within the context of a DATA Step.

DATA dummy;
set indata;
y = a*x + b;

indata would have been already created, containing the variables a, x and b.
indata could have as few as 1 observation or > 1,000,000,000 observations, and SAS will calculate y = ax + b for each observation.
The resulting dataset is called "dummy" and can be used for input into other data steps or proc's.

SAS also supports SQL processing:

proc sql;
create table dummy as
select a, x, b, (a*x + b) as y
from indata;

In Enterprise Guide, you either use a code block or select a dataset, right click on it and select "Filter and Query ..." or select "Filter and Query ... " from the Data menu. This brings up a dialog box for creating an SQL query. One of the features of the Query dialog box is the ability to define "Computed Columns".

I would recommend you use the OnLine help within EG to help you learn about the product. Also, if you have PC SAS on your box, it also has extensive help and documentation. SAS Help documentation comes in multiple flavors: This is what SAS is all about, This is how you can use SAS, This is how to use SAS, these are the specific details of all the pieces of SAS, This is how you do analysis, This is how SAS helps you do analysis, etc. Message was edited by: Chuck
Ask a Question
Discussion stats
  • 1 reply
  • 1 in conversation