SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
Expand all | Collapse all

Extract substrings from variable and place in new variables

  • 1.  Extract substrings from variable and place in new variables

    Posted Thu February 03, 2022 08:47 PM

    What does the (a20) mean here? I understand the rest of the code.

    string n1 to n4 (a20).






    #SPSSStatistics
    #Support
    #SupportMigration


  • 2.  RE: Extract substrings from variable and place in new variables

    Posted Thu February 03, 2022 09:49 PM

    The a20 specifies the number of bytes for the string, so n1 to n4 would each hold 20 bytes, which would be 20 characters if the characters are all plain alphabetic or numeric characters but somewhat less with accented or international scripts.






    #SPSSStatistics
    #Support
    #SupportMigration