BookmarkSubscribeRSS Feed
dprasa8
Calcite | Level 5

Hi -

Iam getting input files in excel format into my local machine. Every time I am manually copying files into UNIX box using winscp tool. I am doing this because Sas eg is configured on UNIX.

Is there a way to read files from windows(local) from Sas Eg which is connected to UNIX.??

Thanks in advance!!

Durga.

5 REPLIES 5
Patrick
Opal | Level 21

Manually yes using the EG import wizard.

mfab
Quartz | Level 8

Yes, either manually via file import or you could have a look here:

http://blogs.sas.com/content/sasdummy/2012/12/06/copy-files-in-sas-eg/

pcapazzi
Pyrite | Level 9

Here are the only two options I can think of. Both involve installing software.

Try looking at SAS/Access (this solution would be installed on your local machine - closest to what you're looking for I think)

http://www.sas.com/en_us/software/data-management/access.html

You can also look at implementing Samba on the UNIX system. (this would be installed on the UNIX server and you'd have to configure it to connect to your local machine).

https://www.samba.org/

dprasa8
Calcite | Level 5

Thank You for the response.

Here is my actual requirement.

Steps:

1) I get my input files in local machine(windows)

2) Need to run VBA code to read multiple input file and make one file

3) Need to read input file from SAS EG( from Unix env)

4) run some sas logic and create  output Excel file

5) export into windows and run vba code to format the report

6) Send report in email as attachment.

currently we are doing this steps manually. Now i would need to automate it.

Since i am using SAS EG i am struggling to copy files from windows to unix automatically vice versa .Another issue is DDE is not working in SAS EG to run VBA codes.

Can any one help me on this to understand the best possible solution.

Thanks.

pcapazzi
Pyrite | Level 9

Based on what you're telling me I think you may go another route.

I also use the Putty suite of applications. Two components that would play a role in what you want to do is PLINK (to send a script to execute) and PSCP to copy files. Since the beginning and end of your process requires VBA then I think it's best to create a BAT file that will do the following: execute the VBA script in #2, transfer the files using PSCP for #3, execute the SAS logic (.sas file) using PLINK to transfer and execute an shell script from your machine for #4, download the exported Excel file using PSCP for #5 and execute the VBA code, and finally for #6 I would hope you can email the end result using VBA.

http://www.chiark.greenend.org.uk/~sgtatham/putty/

Minus the VBA components I use the above process every week.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 3224 views
  • 3 likes
  • 4 in conversation