BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi all


I'm trying to use the "File Name" type parameter in a Stored Process within Enterprise Guide. It basically creates a Browse button.

When i click on this button, it shows me only files and directories of my local machine. The stored process should turn on the server side, so this button becomes completely useless. I need to see files on server and not on my local machine.

Is there an option for that?
Othewise, what is the purpose of this type of parameter?

Thank's
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
I tested this parameter type a while ago and found that if I clicked "My Network Places" that I could choose files on a server machine. What happened is that (assuming my server was visible from "My Network Places"), I could choose a file and the returned name would be something like:
\\sashq\Shared Folders\bi_share\filename.ext

If your servers are not visible through My Network Places, then I am not sure how you make the Browse window work any differently. This seems like a question for Tech Support.

It's not entirely clear to me how/why you want to use the File Name type of parameter...if you let the users pick a file from a server, how would you guarantee that they would pick the file that your Stored Process was expecting to get? How would you use the filename?? In an INFILE statement?? In a FILE statement??

For example, what if these were two files on the server:
\\sashq\Shared Folders\bi_share\xyz.dat and
\\sashq\Shared Folders\bi_share\xyz_other.txt

and if they pick xyz.dat, everything works fine, but xyz_other.txt is a text file that is just "read me" documentation. Somebody might click on the wrong file name and cause the stored process program NOT to run. How do you control for something like that???

I think that your best bet for help with this question is to contact Tech Support and explain to them what your stored process needs to do and which client applications you are going to run the stored process from. They can help you figure out whether the File Name parameter type will work to do what you want to do.

cynthia
deleted_user
Not applicable
Hi,


No, servers are not visible on "My Network Places".

This stored process is not mine but owned by the user himself. Basically, he needs to read some files sended by other applications.

The user's question is simple: Stored Process is executed on the server side and it can't see at any moment files on the local machine, so what is the real utility of this kind of parameter? In which case it can be used?


Thanks
Cynthia_sas
SAS Super FREQ
Hi:
It has always been my understanding that the Stored Process Server and the Workspace server did not have any visibility of files on the user's local machine.

So, for example, if someone sends you a file of data and you save it to c:\temp\month7.dat, you cannot run a Stored Process against the local file as long as it is "down" on your local machine. You need to upload the file to a server location and in most instances, the Stored Process program would probably be hardcoded to look for a file with the name:\\srvname\dir\month&mm..dat where the macro variable &mm was set by the stored process program logic or by a simple input parameter for month.

Of course, this means that one month you couldn't name the datafile "mnth7.dat" and the next month call it "month8.dat" and then "mon9.dat" -- there would have to be some structure and regularity to the file names. However, this is not an answer as to WHY or HOW you'd use the File Name Parameter type.

When I was working on the stored process course, I could never figure out a good use-case for this parameter type. I've been working with Stored Processes and teaching the material ever since the first stored process course. All I can do to contribute to this discussion is share my experience that when questions come back to me about stored processes, I don't get questions about folks wanting to use the File Name parameter type.

If the user is insistent on some kind of answer for how or why one might use this parameter type in a stored process, you might ask Tech Support whether they have an example.

cynthia

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
  • 3 replies
  • 757 views
  • 0 likes
  • 2 in conversation