BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
frdauph
Fluorite | Level 6

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 ???)

 

1 ACCEPTED SOLUTION

Accepted Solutions
frdauph
Fluorite | Level 6

I guess that's it, and I have to wait ...

View solution in original post

12 REPLIES 12
Reeza
Super User

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.

frdauph
Fluorite | Level 6

HI,

 

here is the on line reference :

http://documentation.sas.com/?docsetId=imlug&docsetTarget=imlug_lists_syntax02.htm&docsetVersion=14....

 

using [ ], $ and lists of everything lists seems OK !

 

Reeza
Super User

Lists should handle character values, as of the latest releases:

https://blogs.sas.com/content/iml/2017/03/29/lists-sasiml.html

frdauph
Fluorite | Level 6

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 ???

Reeza
Super User

@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;

frdauph
Fluorite | Level 6

Right, thanks a lot

PaigeMiller
Diamond | Level 26

 proc iml ;
LL = [100, "Q"];

quit;

 

I don't think you can have both numeric and character in a matrix.

--
Paige Miller
Tom
Super User Tom
Super User

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 */

 

Rick_SAS
SAS Super FREQ

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.

Tom
Super User Tom
Super User

@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?

Rick_SAS
SAS Super FREQ

@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.

frdauph
Fluorite | Level 6

I guess that's it, and I have to wait ...

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

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
  • 12 replies
  • 2283 views
  • 0 likes
  • 5 in conversation