9/6/2023 0 Comments Notepad++ download pdx catCAT calls and functions are based on other SAS® functions: TRIM/TRIMN (removes trailing blanks for a character field) LEFT (left justifies a character field) STRIP (a newer function that combines TRIM and LEFT functions) BOTH CAT calls and functions run faster than the equivalent concatenation routines. In Version 9.2, the CATQ function was added. stcounty=CATS(put(state,z2.),put(county,z3.)) citystzip=CATX(', ',city,statecode,zip) Version 9 introduced four new functions (CAT, CATS, CATT, and CATX) and three new call routines (CALL CATS, CALL CATT, and CALL CATX) that replace the clunky syntax shown above, and add some enhanced capability to character string concatenation. ![]() Introduction Introduction Do the following snippets of SAS® code look familiar? length stcounty $ 5 citystzip $ 60 stcounty=trim(left(put(state,z2.)))|| trim(left(put(county,z3.))) citystzip=trim(left(city))||', '||trim(left(statecode))||‘, '||trim(left(zip)) Results: stcounty=25002 citystzip=CAMBRIDGE, MA, 02138 Now there's an easier way! Leave those vertical bars behind and explore the purrfectly fabulous feline functions (and call routines). Presentation on theme: "Purrfectly Fabulous Feline Functions"- Presentation transcript:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |