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 (BASUG) is hosting an in person Meeting & Training on June 27!
Full details and registration info 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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 703 views
  • 0 likes
  • 2 in conversation