BookmarkSubscribeRSS Feed
karthikraop
Fluorite | Level 6

Hello,

 

I was playing around GIT integration in SASEG, cloned a repository and ran simple data step, committed the code and pushed to the repository. I see the code got updated in the repository but surprisingly I see my data vanished from SAS. 

 

Here is the code I submitted 

 

data sashelp.cars;

run;

 

data sashelp.class;

run;

 

After pushing the above code to the repository, I tried to re run the code in SASEG then I got message in SAS log saying no variables to display in sashelp.cars and sashelp.class. I thought the data might have uploaded in my repository but I don't see any data in my repository. 

 

Please help.

 

Thank You,

Karthik. 

2 REPLIES 2
jimbarbour
Meteorite | Level 14

@karthikraop wrote:

 

data sashelp.cars;

run;

@karthikraop,

 

When you code "Data" followed by a SAS dataset name, that is your output.  Input comes from a Set statement.  When you code a Data step without a Set statement, you're telling SAS to wipe out (delete) whatever data is in the SAS dataset name.  The reason you don't have any data is that you deleted it.  I'm surprised though that SAS let you write to the SAShelp Library.  It should have been set up as Read Only.

 

If I were to work with SAShelp.Cars, I would first create a copy in the Work Library.  See code below.  Notice how there is a Set statement.  The Set statement is your input SAS dataset.  The Data statement is your output SAS dataset.

DATA	WORK.Cars;
	SET	SASHELP.Cars;
RUN;

Jim

karthikraop
Fluorite | Level 6
Hello Jim,

Your response is super helpful.

Thank You,
Karthik.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 1000 views
  • 1 like
  • 2 in conversation