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.
@karthikraop wrote:
data sashelp.cars;
run;
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
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.