Questions tagged [enterprise-guide]

Questions about using SAS Enterprise Guide as an IDE for writing SAS programs, or about setting up Enterprise Guide to connect to your SAS server. Questions about using Enterprise Guide that are not related to programming are not on topic (such as using its interactive point-and-click features to perform data analysis) - ask those on the SAS community forums.

Filter by
Sorted by
Tagged with
0 votes
1 answer
45 views

Create a variable based on n other variables

I have a dataset in SAS that has 10 variables on the basis of which I would like to create a new flag. If any of the class columns is greater than 0 then its name should come in the flag as given in ...
sunnyday's user avatar
0 votes
2 answers
73 views

SAS program to check file level controls on multiple files

This code is working perfectly when we pass single file but I need to achieve the same when I pass multiple files. If any file fails any macro condition it should be logged in the error.csv. Here I do ...
Tirumuru Ketha's user avatar
0 votes
0 answers
13 views

SAS EG running wrong file

I've been having a weird problem. Every so often, I'll run a program in SAS EG that's part of a project, and SAS EG will, for reasons unclear to me, run a different file in that project, instead of ...
N0DuckingWay's user avatar
0 votes
1 answer
383 views

How to import sas table using proc import

Hi everyone i am trying to import a sas table with proc import statement as headers are in record2 i am using the following code proc import datafile="WORK.FINAL_1" out=...
sra's user avatar
  • 167
0 votes
1 answer
53 views

add counter of values for only 1 record in sql/sas

Hello every one i have a table with only 1 record i want to count the number of times a particular value is there (counter) eg in table 1 we have 3 goals in table2 we have from goal1 to goal 3 ,...
sra's user avatar
  • 167
0 votes
1 answer
50 views

Select Columns From Values of other sql statement

My requirement is to to get only select columns which are the values of sql statement Proc SQL; Create table Sorting_Initial_1 as select * rom SASHELP.VCOLUMN where libname = 'WORK' and ...
sra's user avatar
  • 167
1 vote
4 answers
483 views

How do I loop through table records in SAS?

I am new to SAS and trying to solve the following scenario: Scenario: A loan (123) has more than 2 transactions on a given transaction date. And, each record has a columns: ID, Trans_Amt, LoanNo, etc. ...
Dileep's user avatar
  • 11
0 votes
2 answers
188 views

How to calculate sum of values per column except one column to have total values per each column in PROC SQL / SAS Enterprise Guide?

I have table (with only numric columns) in SAS Enterprise Guide like below: YEAR | COL1 | COL2 -------|-------|------ 2021 | 20 | 10 2022 | 25 | 30 2023 | 5 | 1 And I need to sum ...
dingaro's user avatar
  • 2,292
0 votes
1 answer
368 views

How to select duplicates rows with duplicates in each column in SAS Enterprise Guide?

I have time in SAS Enterprise Guide like below: COL1 COL2 COL3 10 12 44 15 8 2 10 12 44 And I need to select duplicated rows --> select duplicate rows, but only those where duplicates occur in ...
dingaro's user avatar
  • 2,292
0 votes
1 answer
44 views

How to select only these rows where values in all column all the same in SAS Enterprise Guide?

I have time in SAS Enterprise Guide like below: COL1 | COL2 ------|-------- 12 | 12 15 | 8 10 | 10 ... |.... And I need to select only these rows where values in all column all the same, ...
dingaro's user avatar
  • 2,292
0 votes
1 answer
290 views

How to remove characters after defined character in PROC SQL in SAS Enterprise Guide?

I have table in SAS Enterprise Guide like below which are the result of below query: proc sql; create table work.table1 as select COL2, COL2 from my_table ;quit; COL1 | COL2 ---...
dingaro's user avatar
  • 2,292
0 votes
2 answers
50 views

Flag accounts on the basis of Previous entry

I'm doing a case study for which I need some help. A person is applying for Visa and can apply through any medium. We would like to understand which method did person opt for before coming to Office (...
sunnyday's user avatar
0 votes
1 answer
415 views

How to calculate mean values per values in other column in one PROC SQL query in SAS Enterprise Guide?

I have query in PROC SQL with result as table in SAS Enterprise Guide like below: My query: proc sql; create table work.my_table as select ID , COUNTRY , VALUE from library1.table1 ;quit; Result of ...
dingaro's user avatar
  • 2,292
0 votes
3 answers
50 views

Flag accounts on the basis of reapplication logic ( case of multiple entries by one person)

I'm doing a case study for which I need some help. Background - There are a bunch of people who have applied for Visa and have made multiple applications through different channels. I have to find out ...
sunnyday's user avatar
0 votes
2 answers
193 views

DOS commands in SAS Enterprise Guide

I'd like to run some DOS commands in SAS Enterprise Guide. I did it in 9.3 and used the X command. For example: x 'mydir'; X is disabled in Enterprise Guide, as far as I can tell. Mine hangs when I ...
Dan's user avatar
  • 19
-1 votes
2 answers
187 views

How to create 2 new columns with appropriate prefix based on values in columns with same prefix in SAS Enterprise Guide / PROC SQL?

I have table in SAS Enterprise Guide like below: ID | COUNT_COL_A | COUNT_COL_B | SUM_COL_A | SUM_COL_B -----|-------------|-------------|-----------|------------ 111 | 10 | 10 | ...
dingaro's user avatar
  • 2,292
0 votes
1 answer
111 views

How to create new columns with names of columns with values in descending order in SAS Enterprise Guide / PROC SQL?

I have table in SAS Enterprise Guide like below: ID | COL_A | COL_B | COL_C -----|-------|-------|------ 111 | 10 | 20 | 30 222 | 15 | 80 | 10 333 | 11 | 10 | 20 444 | 20 | ...
dingaro's user avatar
  • 2,292
0 votes
1 answer
89 views

How to create column with name of column with the highest value per each ID in SAS Enterprise Guide / PROC SQL?

I have table in SAS Enterprise Guide like below: ID | COL_A | COL_B | COL_C -----|-------|-------|------ 111 | 10 | 20 | 30 222 | 15 | 80 | 10 333 | 11 | 10 | 20 444 | 20 | ...
dingaro's user avatar
  • 2,292
0 votes
1 answer
57 views

How to aggregate number of occure each value per column in table in SAS Enterprise Guide?

I have table in SAS Enterprise Guide like below: COL1 | COL2 | COL3 -----|-------|------ 111 | A | C 111 | B | C 222 | A | D 333 | A | D And I need to aggregate abve table to ...
dingaro's user avatar
  • 2,292
-1 votes
2 answers
331 views

SAS Enterprise Guide - How can I download a ZIP file from a website, extract its contents and run it?

I would like to have a task to download a continuously updated .ZIP data file from a specific website, extract its contents and run the file inside. I am looking for a program code that performs these ...
er1kjanos's user avatar
0 votes
1 answer
243 views

Impossible to delete table in SAS Enterprise Guide

I can't process to deleting my table. I get this error: "ERROR: File SASUSER.MCO.DATA is not a SAS data set." I've tried many ways to delete but neither works. Thanks for felp! tested with (...
Ghada 's user avatar
0 votes
1 answer
41 views

How to aggretage col1 per ID and val1 per ID and values in col1 in SAS Enterprise Gude or PROC SQL?

I have table in SAS Enterprise Guide like below: ID | COL1 | VAL1 | ----|------|------| 111 | A | 10 | 111 | A | 5 | 111 | B | 10 | 222 | B | 20 | 333 | C | 25 | ... | ....
dingaro's user avatar
  • 2,292
0 votes
1 answer
218 views

Copy a directory with SAS EG

Is it possible to copy a directory in SAS EG Every day when I run my SAS job I have to manually copy a folder on my harddrive. S:\Oko\Likviditet\Likviditetsstyring\LCR\Daglig LCR - Axiom\Daglig LCR\...
Christoffer's user avatar
0 votes
1 answer
198 views

SAS EG append new data and overwrite already existing rows

My goal is to update this table called DAGLIGEKORREKTIONER_lib_xlsx: Here i a sample of my data. Don't mind the cmd prompt it is only to cover sensitive data. I then have a table with a similar ...
Christoffer's user avatar
1 vote
4 answers
364 views

How to fill missing values in numeric columns by using 0 in one table base on existing these columns in other tables in SAS Enterprise Guide?

I have tables in SAS Enterprise Guide like below: TABLE 1 COL1 | COL2 | ... | COLn -----|------|------|------- 123 | | ... | xxx | AAA | ... | xxx 122 | BCC | ... | xxx ... | ... | ...
dingaro's user avatar
  • 2,292
0 votes
1 answer
396 views

How to take max value from one column for each value in second column in table with many other columns in SAS Enterprise Guide?

I have table in SAS Enterprise Guide like below: COL1 - date COL2 - numeric COL1 | COL2 | COL3 | COL4 | COL5 --------- |-------|-------|------|------- 01APR2021 | 11 | XXX | XXX | XXX ...
dingaro's user avatar
  • 2,292
0 votes
2 answers
305 views

SAS/PROC SQL: Remove initial zeros from an alphanumeric field

I need to remove some initial zeros from a field (it appears as an alphanumeric one in the DB) like this: cod_acometida 000000000003391901 000000000008271401 000000000007696901 000000000005504701 ...
Javier Blanco's user avatar
0 votes
2 answers
163 views

Getting only the newest data from a table in SAS EG in an efficient way

I have a table which is updated at irregular intervals; I need to always retrieve the newest data set from the table. I will know the data is the newest if the column PERIODAG_D (timestamp vraiable) ...
Christoffer's user avatar
0 votes
2 answers
140 views

What is the meaning of .WORK in SAS EG and can it be removed from my table names without consequences

When SAS EG creates a query in the query builder it puts "work." in front of tables here is an example: %_eg_conditional_dropds(WORK.QUERY_FOR_UNL_OBLIGATIONSBEHOLDN); PROC SQL; CREATE ...
Christoffer's user avatar
0 votes
1 answer
107 views

Creating a link in SAS EG

I have been unable to find any documentation on creating links in a SAS EG process flow. Here is an example what I mean by link: The ones with the dotted lines are created by right clicking and ...
Christoffer's user avatar
0 votes
2 answers
360 views

SAS Enterprise Guide export as step in process path selection

As part of the SAS Enterprise Guide export as a step in process the outhput file location is very tedious to select. Is there any faster way to do it than clicking through all the folders on my ...
Christoffer's user avatar
0 votes
1 answer
61 views

How to count distribution in numbers and percent of binary column in table?

i have table in SAS Enterprise Guide like below: Below table DOES NOT have duplicates in ID column. ID | TARGET ----|-------- 123 | 0 456 | 0 777 | 1 889 | 0 122 | 1 And I would like to ...
unbik's user avatar
  • 188
0 votes
1 answer
419 views

How to remove special accents of some language from table in SAS Enterprise Guide?

I have table in SAS like below: col1 ---------- A꣟ ABCóó śdźcąę ... Of course I have also many more columns in my table, but I need to remove accents from letters in above table , so as a result ...
unbik's user avatar
  • 188
0 votes
1 answer
488 views

Why real time is much higher than "user" and "system" CPU TIME combined?

We have a batch process that executes every day. This week, a job that usually does not past 18 minutes of execution time (real time, as you can see), now is taking more than 45 minutes to finish. ...
Elton Rodrigues's user avatar
0 votes
5 answers
374 views

Not all %include in a SAS program are executed and I don't get any error message

I want to schedule a project monthly, but my SAS server is installed on Linux, so I thought of creating a program as a master, which would execute each of these programs using the %include function. ...
MarcosDM's user avatar
0 votes
2 answers
71 views

How to create binary column base on values in other column and drop duplicates in SAS Enterprise Guide 4GL / PROC SQL?

I have table in SAS Enterprise Guide like below: ID - numeric COL1 - numeric ID COL1 123 1 123 0 123 0 444 1 444 0 778 0 And I need to aggregate above table and create column 'TARGET': ...
unbik's user avatar
  • 188
0 votes
1 answer
275 views

Max date and difference in days in Table in SAS Enterprise Guide?

I have table in SAS Enterprise Guide like below: Data type: ID - numeric DT - date OF_1 - character OF_2 - character Values are not sorted in original table, but it could be if it is important for ...
dingaro's user avatar
  • 2,292
0 votes
1 answer
84 views

How to aggregate character data by assigning weights to them in SAS Enterprise Guide or SAS PROC SQL?

I have Table in SAS Enterprise Guide like below. Data type: ID - numeric GROUP - character (only PRI or CON values) ID GROUP 8945 CON 9567 PRI 9567 PRI 284 CON 284 CON 284 PRI And I need to ...
dingaro's user avatar
  • 2,292
0 votes
1 answer
170 views

How to aggregate table to take minimum VALUE for each combination of 2 other columns in SAS Enterprise Guide?

I have table in SAS Enterprise Guide like below: Data types: ID - numeric DT - date EVENT - character VALUE - numeric Values are not sorted in my real dataset, but it can be sorted if it is ...
unbik's user avatar
  • 188
-2 votes
1 answer
141 views

How to calculate difference between dates of changes in 2 columns in SAS Enterprise Guide?

I have table in SAS Enterprise Guide like below. Data types and meaning: ID - numeric - ID of client DT - date - date of change OFFER_1 - charcter - current offer OFFER_2 - character - offer after ...
unbik's user avatar
  • 188
0 votes
1 answer
83 views

How to check max difference in dates between events and create new column in SAS Enterprise Guide?

I have table in SAS Enterprise Guide like below. Data types and meaning: ID - numeric - ID of client DT - date - date of change OFFER_1 - charcter - current offer OFFER_2 - character - offer after ...
unbik's user avatar
  • 188
-1 votes
1 answer
262 views

How to fill column using values in 2 other columns in PROC SQL / SAS code in SAS Enterprise Guide?

I have table in SAS Enterprise Guide like below: Data types: VAL1 - character ID - numeric VAL2 - character (with only 3 possible values: P, C, S) ID EVENT GRADE 123 NY P 123 NY P 123 NY S 55 ...
unbik's user avatar
  • 188
0 votes
1 answer
51 views

How to choose more important value from one column for value in corresponding column in SAS Enterprise Guide?

I have table in SAS Enterprise Guide like below: VAL1 - character ID - numeric VAL2 - character (with only 3 options: P, C, S) VAL1 ID VAL2 P1 123 P P1 123 P P1 123 S S2 44 C S2 44 S GG 44 P ...
unbik's user avatar
  • 188
0 votes
2 answers
574 views

How to count how many time some value appeard with defined ID in PROC SQL in SAS Enterprise Guide?

I have Table in SAS Enterprise Guide like below: Data type: ID - numeric SERVICE - character ID SERVICE 123 P1 123 P1 123 G 444 AB 56 c2 And I need to know how many time each ID bought each ...
unbik's user avatar
  • 188
0 votes
3 answers
244 views

What is the difference between single and double qoutes in SAS and why does single quotes fail when I import data

What is the difference between single and double quotes in SAS, I have noticed they somtimes act different and somtimes simmilar. As an example I just discoverd using single quotes when importing csv ...
Christoffer's user avatar
0 votes
1 answer
126 views

Macro variable is not printing the table value but instead the column name

I want to assign these table values to macro variables: This is how I assign the table value to the macro variable: PROC SQL; CREATE TABLE Format_YYYYMM_tbl AS SELECT t1.str_perdag_SAS_default ...
Christoffer's user avatar
0 votes
1 answer
326 views

How to create 0/1 flag witch infrom whether values were changed between 2 column in some dates in PROC SQL in SAS Enterprise Guide?

I have table in SAS Enterprise Guide like below. Table presents history of clients and his eventually changes of services used (columns: BEFORE, AGAIN). ID and DT are not sorted, but could be if it is ...
dingaro's user avatar
  • 2,292
0 votes
1 answer
293 views

How to create flag 0/1 inform whether was changed or not during 4 months between two columns in PROC SQL in SAS Enterprise Guide?

I have table in SAS Enterprise Guide like below: name of table: table123 date typ: ID - numeric DT - numeric VAL1 - string VAL2 - string ID DT VAL1 VAL2 123 20210523 PR P 123 20211222 P P 222 ...
dingaro's user avatar
  • 2,292
0 votes
1 answer
34 views

Macro only stores part of the string

I create my variable like this: data Concat_var; Table_periode_MDR = CAT("\\Afdeling\HS-OKO\Oko\Likviditet\Likviditetsstyring\LCR\Indberetning\2022\",&Periode,"\RLI\...
Christoffer's user avatar
0 votes
2 answers
140 views

How to create flag inform whether was some change in two columns on ID in PROC SQL in SAS Enterprise Guide?

I have table in SAS Enterprise Guide like below: ID | val1| val2 ----|-----|----- 123 | M | M 123 | M | P 123 | P | P 444 | PR | PR 444 | PR | PR 567 | PR | M 567 | M | M 99 | PR | P ...
dingaro's user avatar
  • 2,292

1
2 3 4 5
9