BookmarkSubscribeRSS Feed
xiaokai
Calcite | Level 5

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? 

2 REPLIES 2
Quentin
Super User

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.

The Boston Area SAS Users Group is hosting free webinars!
Next up: Joe Madden & Joseph Henry present Putting Power into the Hands of the Programmer with SAS Viya Workbench on Wednesday Nov 6.
Register now at https://www.basug.org/events.
xiaokai
Calcite | Level 5
Hi Quentin, thanks for quick reply.
I am using the same user account in both EG and putty.
There is a empty Excel file generated by EG,I checked there is no records.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 403 views
  • 0 likes
  • 2 in conversation