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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1576 views
  • 1 like
  • 2 in conversation