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 webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.
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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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