BookmarkSubscribeRSS Feed
NKormanik
Barite | Level 11

Greetings. I asked an online LLM to generate some SAS code for me. It did so. I haven't tried the code yet. The procedures contained in the code are listed below. I'm wondering if any of the procedures will be missing from SAS online, SAS Studio? Please explain limitations that exist, such as which procedures are missing, dataset size limits, code length limits, etc.

 

SAS Procedures Required In LLM-Generated Code:
proc assoc
proc cluster
proc corr
proc cvmodelfit
proc fcmp
proc glm
proc glmselect
proc hpensemble
proc hpforest
proc hplogistic
proc hpreduce
proc import
proc means
proc nlin
proc optmodel
proc print
proc score
proc sgplot
proc sql
proc stdize
proc surveyselect
proc transpose
proc tree

 

4 REPLIES 4
Patrick
Opal | Level 21

Don't expect generated code to fully work. Playing with ChatGPT I've had it even "invent" new procedures.

 

Below how you can figure out what's licensed, what's installed and the docu link with the info to which Product each Proc belongs.

/* list what's licensed */
proc setinit;
run;

/* list what's installed */
proc product_status;
run;

/* Documentation: SAS Procedures by Product */
/*
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/allprodsproc/p1vzipzy6l8so0n1gbbh3ae63czb.htm 
*/

Not sure what environment "SAS online" is. If there are any limitations other than the normal SAS ones then it should be documented for this specific environment. 

I suggest that you actually execute your code and see what happens. SAS will tell you if things are working or not ...and then it's up to you to debug and fix the generated code. 

 

PaigeMiller
Diamond | Level 26

Please explain limitations that exist, such as which procedures are missing, dataset size limits, code length limits, etc.

 

Alphabetical list of all SAS procedures in Base SAS 9.4 and Viya 3.4

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/allprodsproc/procedures.htm

 

As far as I know, SAS does not have data set size limits; the limit depends on your hardware. As far as I know, there is no code length limit in SAS, again it depends on your hardware and its unlikely you could write a program that is so long it wouldn't fit on your computer's disk.

--
Paige Miller
ChrisHemedinger
Community Manager

This list has a lot of procedures -- that must have been an impressive prompt that you fed to ChatGPT.

 

Many of the HP (high-performance) procedures probably are not available in SODA. However, most have non-HP versions that would functionally be the same.

 

Some of the "procs" in this list don't exist. CVMODELFIT, for example, is an option in PROC HPSPLIT. I don't think it exists as its own procedure.

 

Like others have said, I expect that ChatGPT probably didn't do a great job  of creating code that reflects good/best practices. I encourage you to use these forums to ask questions and leverage the wisdom of the crowd.

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
ballardw
Super User

Since your list of procedures includes Proc Import I strongly suggest that you isolate that bit and closely examine the output. Proc Import uses rules based on the content of a file for some sources to set variable types and can result in losing significant information such as leading zero in bank accounts/routing numbers because a field with all digits will be attempted to read as numeric and such won't maintain leading zeroes. Different files of supposedly identical structure can be read differently based on the content so variable lengths and types may change from file to file.

 

Proc "HPEnsemble" also appears to be phantom proc generated by ChatGpt (or whatever). The result at https://support.sas.com/en/documentation.html for Hpensemble is "No Results Found"

The results for "Proc Assoc" don't seem to find an actual procedure but the association node usage in Enterprise Miner.

 

I shudder to think what this is going to generate for Proc FCMP, which allows users to define functions for manipulating data in data steps.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 4 replies
  • 385 views
  • 2 likes
  • 5 in conversation