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
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

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!

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
  • 710 views
  • 0 likes
  • 2 in conversation