SAS Viya

SAS Viya’s AI-based automation aligns to the needs and talents of your team, keeping both models and progress in motion across the analytics life cycle.
BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
SalihKilic
Fluorite | Level 6

Hello there, Community,

I programmed an interface using the SAS Viya Job Execution Web Application tool. It is an HTML form that includes complex JavaScript code to dynamically and manually capture user inputs. These inputs are then sent to SAS using the %JESBEGIN and %JESEND macros, either through global macros or macros stored in tables.

Following that, we include the relevant SAS programs, which are executed sequentially using %INCLUDE. These programs perform calculations, and once all operations are completed, the result is provided to the HTML form screen as an ODS output.

 

At this point, the form is fully developed to send inputs to SAS. However, I now need to retrieve data from a SAS library and dynamically update my input boxes based on that data, specifically a date range.

 

Currently, users input the bid period start and end dates, but the date range is hardcoded by us and periodically updated via a touch of JavaScript code. This approach is not sustainable. I want the date range to dynamically adjust based on a SAS library that we upload periodically, which contains the relevant date range. When our interface runs, it should automatically fetch the data from the SAS library and set the date range accordingly.

 

According to my research on SAS Viya 3.5, it's currently unable to retrieve data from our Job Execution HTML form web application, as this functionality is not available in that version.

Is there a solution to implement this functionality using SAS Viya 3.5?

 

If I have not explained my issue clearly enough or if you need more specific information, please feel free to ask. I will provide you with the information as soon as possible. Thank you in advance for your questions and answers.

 

Here is an example of my SAS Viya Job Execution HTML Form for the Bid Date Start and End Selection part:

 

format.gif

 

 

12.png

SalihKilic_0-1735029114463.png

 

SalihKilic_2-1735029156233.png

SalihKilic_3-1735029189485.png

SalihKilic_4-1735029217310.png

1 ACCEPTED SOLUTION

Accepted Solutions
SalihKilic
Fluorite | Level 6

Hello @JuanS_OCS ,

We are currently evaluating the SAS Viya 4 upgrade. As part of this process, I want to assess how practical it would be to proceed with APIs, JS libraries, or frameworks in Viya 3.5 for our HTML form’s future developments related to dynamic data and other needs. To put it simply, I was looking to gather insights from experienced users in this area.

 

Additionally, I needed to confirm whether there is a built-in solution available in Viya 3.5. Based on the answers provided and the documentation, we will now be able to make a more informed decision.

Thank you for your input and assistance!

View solution in original post

8 REPLIES 8
SalihKilic
Fluorite | Level 6

Thank you for your response, @DeMer  I will review my HTML forms along with the library, as you suggested.

Mike_Drutar
SAS Employee

Depending on where you are storing your reference data that contains the dates, you might also consider using the rowsets api to dynamically return the data you’re looking to retrieve.

 

The rowsets api can return paginated collections of rows and their cell's corresponding columns for a datasource.  It might take some refactoring of your current form (example: adding a few api get calls that include some sorting), but I would absolutely recommend reviewing these links:

Row Sets | SAS for Developers

SalihKilic
Fluorite | Level 6

Hey @Mike_Drutar 

Since SAS Viya 3.5 does not offer a built-in solution for my case, relying on additional developer-level enhancements may introduce unnecessary complexity to our existing setup. Moreover, beyond managing the date range dynamically, I foresee the need for several other dynamic implementations for the form, which could further complicate the process.

 

While solutions like Rowsets or custom-developed SAS Viya API Wrappers for JS would likely address my issue, the extensive development required would significantly increase complexity. Given this, it seems like a fully integrated built-in solution within SAS Viya 3.5 would be a more effective approach for my needs.

 

Nevertheless, I truly appreciate your insights. Thanks, Mike!

JuanS_OCS
Azurite | Level 17

Hi @SalihKilic ,

 

I am not sure how to help you. You are aware that SAS Viya 3.5 is not as evolved as SAS Viya 4 (and never will be), and you investigated and confirmed that the functionality you are looking for is not present. Still you receive some hel that could resolve the issue, yet you have a hard time accepting it as it adds complexity - and I understand it, however it does not make easy to provide you help.

 

My 2 cents to this matter, some options:

1- think about moving to SAS Viya 4

 

2- perhaps you could use a framework which, might initially look like adding complexity, in fact it would reduce it. Examples: SAS App Factory (not sure if it is compatible with Viya 3.5 though), h54s from Boemska or SASjs/Data Controller from 4GL Apps. You will notice a lot of similarities and a basic common concept among those.

 

3- Take a common developer approach: If you are able to create a webservice which internally would run a SAS job execution, and transfer data via json, you should be able to update the field dynamically. However, doing it on your own might not be the most fast or efficient way, or secure, so it could be frustrating to you. That is why some smart people created the frameworks indicated in #2, or why SAS continued the development of the SAS Job Execution capabilities in SAS Viya 4.

 

Perhaps you already considered those options. Then hearing why they are discarded could be interesting to understand your selection process and priorities.

SalihKilic
Fluorite | Level 6

Hello @JuanS_OCS ,

We are currently evaluating the SAS Viya 4 upgrade. As part of this process, I want to assess how practical it would be to proceed with APIs, JS libraries, or frameworks in Viya 3.5 for our HTML form’s future developments related to dynamic data and other needs. To put it simply, I was looking to gather insights from experienced users in this area.

 

Additionally, I needed to confirm whether there is a built-in solution available in Viya 3.5. Based on the answers provided and the documentation, we will now be able to make a more informed decision.

Thank you for your input and assistance!

JuanS_OCS
Azurite | Level 17

Hi @SalihKilic ,

 

thank you very much, for your explanation, and your mental process makes full sense.

 

Perhaps it would help you to reach out to this sub-community: https://communities.sas.com/t5/Developers/bd-p/developers 

And to your regional SAS account manager - perhaps a Customer Advisory could put you in contact with the right person.

 

Do check those frameworks, to see if they could have the potential to fulfill your required input!

SalihKilic
Fluorite | Level 6

I have already conducted various tests with SAS Viya API Wrappers for JS, and it looks like some other issues may arise. I anticipate potential challenges, including performance-related aspects. I also need to determine whether these issues stem from the configuration settings of Viya 3.5 during the current setup or if they are inherent limitations.

 

In addition, as I mentioned earlier, we are evaluating the migration to SAS Viya 4.0. However, if I face any issues in the future, I will definitely seek support through the sub-community you suggested.

 

Thanks for your valuable suggestions @JuanS_OCS 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Discussion stats
  • 8 replies
  • 3004 views
  • 9 likes
  • 4 in conversation