BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi, I need help.

I'm using EG 3 and currently I have created some SAS codes to be used in the process. How do I link a table to my created SAS codes? Right now when I execute the whole process the sas codes run even if a table that it is dependent on does not exist yet.

Thanks
7 REPLIES 7
MohamedS
Obsidian | Level 7
Hi JCruz,

what type of code you mean? if you using data step, proc steps then you should be linked to the tables and libraries.

you can share your code with us if it is not confidential.

regards,
deleted_user
Not applicable
Hi Mohamed

It's a data step actually, refer to the codes below.

DATA PASSION2;
SET PASSION1;
LENGTH _ID_INTERNAL $20.
KEY1 $100.
;


_ID_INTERNAL = INTERNAL_IDENTIFICATION_NUMBER;
KEY1 = _ID_INTERNAL||CC;

IF NRIC_FIN_NUMBER = ' ' AND RACE = ' ' AND GENDER = ' ' AND ECONOMIC_STATUS = ' ' AND
HIGHEST_EDUCATIONAL_LEVEL = ' ' THEN DO;
RACE = 'INFORMATION NOT AVAILABLE';
GENDER = 'INFORMATION NOT AVAILABLE';
ECONOMIC_STATUS = 'INFORMATION NOT AVAILABLE';
HIGHEST_EDUCATIONAL_LEVEL = 'INFORMATION NOT AVAILABLE';
END;

RUN;

When I execute the whole process flow, this data step is executed even if table PASSION1 is not yet prepared.

Thanks.
MohamedS
Obsidian | Level 7
Hi JCruz,

I suggest to restart all SAS Services and try to execute the code again. if the problem still exist, it means that there is a step within your process before this data step prepare the Passion1 table.

also, you can send me you log file to go through it to give you more help
deleted_user
Not applicable
1) I would recommend you have as part of your project an "Assign Library ..." object that creates an EGTASK libary for that project, pointing to an explicit directory for only that project. It makes maintenance and storage control easier.

2) You can link the table to the code by right clicking on the table and selecting the "Link to ..." menu option.

3) I would recommend changing your code to use:

[pre]
data EGTASK.passion2;
set EGTASK.passion1;
...
[/pre]

4) If you simply run the code task, it will run, independently of whatever else has happened. But, if you select the predecessor table, and select "Run branch from ..." EG will run the code set(s) in sequence, if the link is established (#2 above).
deleted_user
Not applicable
Hi

Problem is on EG 3 there is no "link to.." option when I right click the table.

Rgds
deleted_user
Not applicable
Ahhh,

My apologies, I accidentally ignored that you were on EG3.
The "Assign Library ..." option is a feature of EG4.

It has been over 2 years since I last used EG3, so unfortunately, I cannot be of help.

I would strongly recommend, if I may, to upgrade to 4.1. It is a huge, HUGE, improvement over 3. ! HUGE ! Although, I realize this doesn't help it, it will, a lot. Did I say "HUGE"? enough?

In my opinion, the solution to your problem is to upgrade to EG4.x
deleted_user
Not applicable
Haha thanks for the help, unfortunately the client does not have the budget to upgrade to E.G 4.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 989 views
  • 0 likes
  • 2 in conversation