An Idea Exchange for SAS software and services

by Super User
on ‎07-27-2015 01:47 PM

Allowing variable lists such as VAR: or an array call assign (1, of AVAR(*)) as well.

by PROC Star
on ‎07-27-2015 08:54 PM

Yes, all the usual function syntaxes will be supported, like VAR-VAR3 and VAR1--VAR3 too.

Also, we probably need 2 functions, one for strings:

call assignc('1', of AVAR

  • , VARX12, VARY1-VARY3);
  • by PROC Star
    on ‎08-27-2015 07:56 PM

    The first argument could even be a variable name, so we copy its value, rather than a literal value.

    by Respected Advisor
    on ‎11-23-2015 12:32 PM

    Why just one value?  It could support syntax similar to that used to initialize array elements.


    call assign(1:5,of var1-var5)


    You can do it now with CALL SDTIZE but it will probably need a CALL MISSING first and in my limited testing was slower than I had hoped.  And doesn't support a range of values.


    24         data _null_;
    25            array scalar[4];
    26            put (scalar[*]) (=);
    27            call stdize('missing=',1,'none',of scalar[*]);
    28            put (scalar[*]) (=);
    29            run;
    scalar1=. scalar2=. scalar3=. scalar4=.
    scalar1=1 scalar2=1 scalar3=1 scalar4=1
    by Regular Contributor
    on ‎08-15-2016 12:48 PM
    Idea Statuses
    Top Liked Authors