Hi,
I used X statement to run a sh file in EG. This sh file uses for pulling data from datalake and save the data as several Excel files.
When I use the putty to run the sh file, it takes around 15 mins to get all the Excel files.
However, when I use the X statement, SAS only runs 1 second and stops when get one the Excel files. ( the one file only has file name, does not have any rows in it) .
I want to get all the Excel files with complete data. How can I fix the issue?
You might want to add some logging to the shell script.
When you run X from EG, it sounds like the shell script is at least running, right? This means you have XCMD turned on, and the shell script is accessible to the SAS server. You might check if it could be a permissions issue. When you connect to the server via putty, are you using the same user account as is used when EG connects to the SAS server?
If you delete the Excel file and run the shell script via the X statement, are you sure it generates an empty Excel file?
As a debugging script, you might want to create a 'helloWorld' shell script which just creates a .txt file or something. And make sure you can get that working both from putty and EG. Just to make sure that SAS is successfully running the shell script.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.