Page 36 - SAS_manual
P. 36

Output:








               Use of scan in different ways:

               Program 4.7:


















               Output:










               By using –ve value of position scan will give the word from end of the sentence

               Here we are using ‘#’ as delimiter.

                                        Purpose:                                   Syntax
                  CAT      used to concatenate two or more strings        cat(string1,string2,….stringn)
                           used to concatenate two or more strings
                 CATT                                                    catt(string1,string2,….stringn)
                                after removing trailing blanks
                           used to concatenate two or more strings
                 CATS         after removing leading and trailing        cats(string1,string2,….stringn)
                                          blanks
                           used to concatenate two or more strings
                 CATX       after removing trailing blanks and use   catx("delimiter",string1,string2,….stringn)
                                         delimiter
               **we can use !! Or || in place of using CAT function.


                                                    SAS HANDBOOK | VISIT:: http://nikhilanalytics.com  36
   31   32   33   34   35   36   37   38   39   40   41