Desktop productivity for business analysts and programmers

Automating EG

Reply
New Contributor
Posts: 2

Automating EG

Hi All,

Apologies if this question has already been answered.

I want to know few steps to remove out manual work and dependency. I have EG installed on server and in one of the code it refers to file on windows which cannot be imported/exported to/from EG to shared drive or windows. Is there a way to remove the manual work which is using import wizard or any external FTP client.

Also how to remove dde and any alternative for this? please respond to my queries.

Thanks

Valued Guide
Posts: 2,111

Re: Automating EG

I think that you have misconstrued your architecture.

EG must run on a client (PC or Virtual Machine); the SAS executable must run on a "server" (either the same PC acting as a server, known as a "local server") or some sort of remote server.

The SAS server that runs the tasks must be able recognize the shared drive in order to import or export from/to it.  The is generally the case with a "local server" but often not with a remote server.

You can likely get away from DDE by using SAS/Access to PC Files, but you need to provide more detail about what is/is not working.

Community Manager
Posts: 2,692

Re: Automating EG

You might benefit from this custom task, which can help you to copy your data files to where they need to be for import operations:

There and back again: copying files in SAS Enterprise Guide - The SAS Dummy

Chris

Contributor
Posts: 39

Re: Automating EG

Hi Chris, this tool looks great! In trying out your task I'm attempting to copy a file from SAS to local computer and I receive the error the following error:

Downloading files from SAS session on "SASMain" to local machine "LIBP03P-4RCS3CA".

Using these settings:

  Source file specification: Files/DSSPricing/ADHOC/LMAC_Prem.csv

  Destination path: C:\My Data

  Overwrite existing files: No

  Resolve macro references in file paths: No

  Convert line endings for text files: No

ERROR: Object reference not set to an instance of an object.

I've tried at least 50 incarnations and obviously I don't have the correct syntax - could you possibly lend me a hand?

If I remove the source path and make it just "LMAC_Prem.csv" I get "ERROR: File LMAC_Prem.csv not a valid file" in case that helps

I believe our setup is on Unix and I'm using EG 4.3

thx,

Shelby

Community Manager
Posts: 2,692

Re: Automating EG

Shelby,

The Source File spec should be an absolute full path.  On UNIX this will always begin with a forward slash.  For example:

/dept/data/Files/DSSPricing/ADHOC/LMAC_Prem.csv

I'm sorry you get the "Object reference" error: that's a bug in the task, apparently.  But see if you can correct the source path and get better results.

Chris

Contributor
Posts: 39

Re: Automating EG

thanks Chris, I have tried starting with the slash. Is there a command in which I can perform to display the path in the log and then use that to populate the source spec? I have tried all "logical" paths that I can think of, so obviously I'm missing something, which is quite possibly specific to our install/configuration, so that's why I ask about the command. I have the feeling there's more at the beginning of the path that I need to add.

Regular Contributor
Posts: 180

Re: Automating EG

You have tried to use the PATHNAME Function?  See: SAS(R) 9.3 Functions and CALL Routines: Reference

Contributor
Posts: 39

Re: Automating EG

CTorres - you may be onto something; I ran the command for the LIB dsspr and returned "fname=/sasdss/actlibs/dsspr" however I cannot get it to work with a filename. Originally returned "...longer than 8 characters" then didn't return anything after shortening. SASMain is our server, which branches into "Libraries" and "Files". The file mentioned above is located under "Files", so do you know how I would use PATHNAME to return the actual path? thx

Regular Contributor
Posts: 180

Re: Automating EG

Shelby,

I think I missunderstood the problem so maybe PATHNAME is not the solution.

If I understand, you are able to see the .csv file from the EG session. In this case what you have to do is to findout the place (starting path) from where EG is able to view these files using the following procedure in SAS Management Console: Expand: Server Manager --> SASMain --> SASMain - Workspace Server (Properties) --> Options tab --> Advanced Options...  --> File Navigation. In this point you should see three options SAS System Root, System Root or Path. The one that is selected is the left missing part of your path.

Good luck.

Contributor
Posts: 39

Re: Automating EG

thanks, I see we have the console installed on vm; I'll just need to get some help from admin configuring the connection first.

Contributor
Posts: 39

Re: Automating EG

figured it out with help of one of our Admins.  SASMain/Files, in my situation, translates to "/users/groups/" so in this case the full path to the file in question above is "/users/groups/DSSPricing/ADHOC/LMAC_Prem.csv"

Tool works great, THANKS CHRIS!!

Ask a Question
Discussion stats
  • 10 replies
  • 676 views
  • 1 like
  • 5 in conversation