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
SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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