BookmarkSubscribeRSS Feed
MikkelMandrup
SAS Employee

For this #juletip I wanted to write something about Viya and CAS actions, since there are  a lot of posts on that subject on the community sites. As many others, I have been testing and playing with the OpenAIs ChatGPT system since the launch in late November.

So in this Juletip, I am going to get ChatGPT to assist me. The ChatGPTs tips for working with CAS actions in Viya, with some seasonal spirit added,are as following:

 

 

  1. with a clear understanding of the task you want to accomplish. This will help you design your action in a logical and effective way, just like Santa's elves plan out the production of all those toys!
  2. Use the CAS documentation and examples to familiarize yourself with the available actions and their syntax. There are many actions available in Viya, and understanding their capabilities and limitations will help you choose the best ones for your task, just like Santa's elves choose the right tools and materials for each toy they make.
  3. Use named parameters when calling actions. This will make your code more readable and easier to maintain, just like how a nicely wrapped present is easier to open and enjoy!
  4. Use the cas.table function to create a table object that can be passed to actions as a parameter. This will allow you to easily manipulate and transform data within your action, just like how Santa's elves can customize and personalize each toy to the specific wishes of each child.
  5. Use the cas.ret_action_status function to return the status of your action. This will allow you to debug your action and understand how it is executing, just like how Santa's elves test and refine each toy to make sure it meets the highest quality standards.
  6. Test your action thoroughly before deploying it. This will help you catch any errors or bugs and ensure that your action is working as expected, just like how Santa's elves triple-check each toy before it goes into the sleigh on Christmas Eve.

 

When you are finished with reading the tips, you should be able to earn some bragging rights in the upcoming SAS Bowl on CS Actions hosted by @joeFurbee. You can register for the event here:

https://communities.sas.com/t5/Upcoming-Events/SAS-Bowl-XXVII-CAS-Actions/ev-p/850201

  

One thing that are very popular is to use ChatGPT to generate Poems, so here’s one about CAS actions.

 

CAS actions, oh so fine,

Helping us solve problems with ease and shine.

 

From data manipulation to analytics galore,

They make our work easier, and so much more.

 

With named parameters and cas.table too,

Our code is cleaner and easier to review.

 

And when we use cas.ret_action_status,

We know exactly what's happening, no fuss.

 

So as the holiday season approaches with cheer,

Let's take a moment to be grateful for CAS actions, my dear.

 

I hope you found these tips usefuland that it brought a little bit of holiday cheer to your, when working CAS actions in Viya! Merry Christmas and happy coding!

 

Take a look at the winter/spring 2023 program and events for FANS and other SAS users!
www.sas.com/fans | #SASFANS #sasnordicusers

sas-innovate-2024.png

📢

ANNOUNCEMENT

The early bird rate has been extended! Register by March 18 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

Register now!

Discussion stats
  • 0 replies
  • 648 views
  • 3 likes
  • 1 in conversation