I use sas university edition (sas studio 3.6 + sas 9.04.01M4P ) and have some problems with PROC IML list of lists :
L=[list1, xx , tab2] a mix of everything.
The selection of an item of a list of lists with [ ] and L$2 is impossible, yet documentated in SAS/IML® 14.3 User’s Guide, p.146
.
I tried these commands with several examples picked into "SAS_IML User's Guide Example Programs" ...
This simple one doesn't work :
proc iml ;
LL = [100, "Q"];
quit;
with : ERROR 22-322: Syntax error, expecting one of the following: un nom, une chaîne entre guillemets, une constante numérique,
une constante date temps, une valeur manquante.
ERROR 76-322: Syntax error, statement will be ignored.
I guess i missed something or my SAS UE version of proc IML is too old (how to check it is IML 14.3 ???)
I guess that's it, and I have to wait ...
Can you reference the online documentation, page 146 is useless for a webpage.
You can run PROC SETINIT; RUN; to see what version of SAS/IML, but SAS UE has T-1 version, so it's not the latest but it's pretty up to date.
HI,
here is the on line reference :
using [ ], $ and lists of everything lists seems OK !
Lists should handle character values, as of the latest releases:
https://blogs.sas.com/content/iml/2017/03/29/lists-sasiml.html
OK, but PROC SETINIT; RUN; doens't inform on IML version...
But I guess it's definitely N-1 i.e. 14.2 for IML ???
@frdauph wrote:
OK, but PROC SETINIT; RUN; doens't inform on IML version...
But I guess it's definitely N-1 i.e. 14.2 for IML ???
Then it would be PROC PRODUCT_STATUS; RUN;
Right, thanks a lot
proc iml ;
LL = [100, "Q"];quit;
I don't think you can have both numeric and character in a matrix.
The documentation page the @Reeza posted seems to say that you need to use the List.... functions to modify the list.
proc iml;
L = ListCreate(2); /* L is two-item list */
call ListSetItem(L, 1, 1:3); /* 1st item is 1x3 vector */
call ListSetItem(L, 2, {4 3, 2 1}); /* 2nd item is 2x2 matrix */
Actually that code from the documentation does not work in SAS 9.4 (TS1M3) .
2 proc iml; NOTE: IML Ready 3 L = ListCreate(2); ERROR: Invocation of unresolved module LISTCREATE. statement : ASSIGN at line 3 column 1 3 ! /* L is two-item list */ 4 call ListSetItem(L, 1, 1:3); ERROR: Invocation of unresolved module LISTSETITEM. statement : CALL at line 4 column 1 4 ! /* 1st item is 1x3 vector */ 5 call ListSetItem(L, 2, {4 3, 2 1}); ERROR: Invocation of unresolved module LISTSETITEM. statement : CALL at line 5 column 1 5 ! /* 2nd item is 2x2 matrix */
The list feature was introduced in SAS 9.4M4 (SAS/IML 14.2).
The new syntax that uses brackets and dollar signs is a feature of SAS 9.4M5 (SAS/IML 14.3).
Use this documentation page when you need to select earlier versions of the software.
I believe that the SAS University Edition will update to 9.4M5 soon. Possibly December or January.
@Rick_SAS wrote:
The list feature was introduced in SAS 9.4M4 (SAS/IML 14.2).
The new syntax that uses brackets and dollar signs is a feature of SAS 9.4M5 (SAS/IML 14.3).
Use this documentation page when you need to select earlier versions of the software.
I didn't notice any talk about LIST feature in the What's new in .... pages.
Did I miss it?
@Tom Follow the link that I provided. Lists are the first item in the 14.3 "What's New" and the second item in the 14.2 "What's New" sections.
I guess that's it, and I have to wait ...
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.