We’re smarter together. Learn from this collection of community knowledge and add your expertise.

How do I write my first custom task in SAS Studio 3.4?

by Community Manager ‎12-07-2015 04:38 PM - edited ‎12-07-2015 05:53 PM (1,077 Views)

If you need to create custom tasks for other SAS Studio users or convert an existing SAS program to a SAS Studio task, we've got a free ebook to help you. In the first two chapters of SAS Studio: Writing Your First Custom Task, you'll get an overview of SAS Studio tasks and learn the six steps to create and run basic custom tasks. The third and final chapter offers four additional steps to add dependencies.

 

Want to see someone create a task? At 2:48 in this SAS Tech Talk: SAS Studio Demonstration, SAS Software Development Manager Christie Corcoran tells you about provided tasks and at 4:28 shows you how it's done.

 

 

 

Other resources you’ll find helpful are:

 

For a complete list of SAS publications, go to www.sas.com/store/books.

Comments
by Trusted Advisor
on ‎12-07-2015 05:49 PM

Great demo by Christie on creating a custom task in SAS Studio! Also interesting to learn that SAS CEO, Dr Goodnight, has created a few Combinatorics and Probability tasks! 

 

I noticed that it was around 4:28 in the video when she starts talking about creating a custom task. Beforehand the discussion was about using SAS Studio and the provided tasks.

by Community Manager
on ‎12-07-2015 05:51 PM

Thanks, @MichelleH!

by Super Contributor
‎12-12-2015 01:22 PM - edited ‎12-14-2015 09:19 PM

Help!

 

I'm working through the PDF provided above and have run into a problem.  I've read through the PDF trying to figure out the issue, but I'm stumped.

 

I've compared my code to the documentation a dozen times and don't see a problem; however, when I try and run it, I get "Task runtime failed to initialize" and when I get more details I see:


Error creating options tab.
Error configuring UI Element.
Error processing container UI element for DATA.
Error processing element <Group>,rolesGroup.
Error processing element <RoleItem>,<unknown>.
TypeError: Cannot read property 'Roles' of undefined
Are you referencing an <OPTION> that does not exist?

 

I'm on Page 15 ("View the Data Source and Character Variable to convert Options") and can't go any further.  Any ideas?

 

Thanks - and so far this is very cool stuff :-)

Chris

 

<UPDATE>

In emailing with Steve Ludlow, from SAS Institute and who is currently working on a SGF paper on this topic, i found out what my error is - and boy is it a sneaky one!

 

I had:

 

<Role name="invarname" type="C" minvars="1" maxvars="1">

 

and it should be: 

 

<Role name="invarname" type="C" minVars="1" maxVars="1">

 

In a second place, I had:

 

<Datasource>

...

</Datasource>

 

and changed it to:

 

<DataSource>

...

</DataSource>

 

It seems trivial and possibly even silly, but in doing some reading on the Apache Velocity Terminal Language and XML, <Datasource>, <DataSource>, <datasource> and <DATASOURCE> are all completely different.  

 

Anyway, back to writing Custom Tasks!

Chris

Contributors
Your turn
Sign In!

Want to write an article? Sign in with your profile.


Looking for the Ask the Expert series? Find it in its new home: communities.sas.com/askexpert.