BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi Chris and everybody

I’m developing a custom task for EG4.1, and in my VB.NET code I’m trying to use the ISASTaskConsumer2.ShowInputDataSelector or ISASTaskConsumer2.ShowDataSelector methods so that the end user can select a data source for input.

Here are the sample codes:
Dim mycookie As String = ""

Dim dsarray As ISASTaskData() = _consumer.ShowInputDataSelector(Me, DataSelectionMode.SingleInput, ServerAccessMode.AnyServer, "", "", "", mycookie)


Dim dnarray As ISASTaskDataName() = _consumer.ShowDataSelector(Me, DataSelectionMode.SingleInput, ServerAccessMode.OneServer, "local", "SASUSER", "SASUSER.", "")

I observe that, after the “Open” screen is displayed:

1. If I select the input data set from an existing SAS Library (“SASUSER.mydataset” for example), an array containing the dada set is properly returned, and I can use it in my program.


2. But, if I try to navigate and select the input data set from the file system (“C:\Myfolder\mydataset.sas7bdat” for example) a null value is returned in the case of _consumer.ShowInputDataSelector, while an array with zero element is returned in the case of _consumer.ShowDataSelector.

So selecting the input data set is OK from a SAS library, but not from the file system.
On the other hand, my end users want to be able to select input data from the file system, not only from a library.

I’m wondering if the problem is caused by settings, by my VB code, or if it is a problem with the ISASTaskConsumer2 class.

Thanks for any help,

Maurice
1 REPLY 1
ChrisHemedinger
Community Manager
Maurice,

I think that you are running into a side effect of a data selection "loophole" in our API. Really, the API doesn't have complete support for selecting a file from the host file system -- only for selecting a data file from a SAS library. However, if you navigate back up from the starting directory to the full server list, then drill back down into the server, you suddenly see the "Files" choice alongside the "Libraries" choice. Oops!

This is what you want, I know, but I think it's a bug in the software that allows you to do this. Then when the selection is made and control returns to your task, the result set is empty, since the API isn't meant to handle this case.

We already have a defect tracked internally to address this in our next version.

Chris
Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1 reply
  • 777 views
  • 0 likes
  • 2 in conversation