set mprint on.
spssinc split dataset splitvar = state /OUTPUT DIRECTORY= "C:\state_files" DELETECONTENTS = NO FILENAME = "state_${state}_16AtoB_dropped_records" /OPTIONS NAMES =VALUES PRINTLIST=YES . Currently the ${state} inserts the State's two digit fips code in the file name, e.g., 06="California". There is a value label associated with the two digit fips code and I am wondering how difficult it would be to insert the value label rather than the two digit fips code in the file name. I can't seem to figure it out. I am guessing I would need to weave a concat statement in there somewhere....? Any help would be appreciated......Thanks. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Administrator
|
Very simple. Use VALUELAB function and then the resulting variable for
splitvar. DATA LIST FREE / code. BEGIN DATA 04 06 END DATA. VALUE LABELS code 04 'Cali' 06 'Nevada'. STRING ValLab (A8). COMPUTE ValLab=VALUELABEL(code). LIST. code ValLab 4.00 Cali 6.00 Nevada SUBSCRIBE SPSSX-JohnF wrote > set mprint on. > spssinc split dataset splitvar = state > /OUTPUT DIRECTORY= "C:\state_files" DELETECONTENTS = NO > FILENAME = "state_${state}_16AtoB_dropped_records" > /OPTIONS NAMES =VALUES PRINTLIST=YES . > > Currently the ${state} inserts the State's two digit fips code in the file > name, e.g., 06="California". There is a value > label associated with the two digit fips code and I am wondering how > difficult it would be to insert the value label > rather than the two digit fips code in the file name. I can't seem to > figure it out. I am guessing I would need > to weave a concat statement in there somewhere....? > > Any help would be appreciated......Thanks. > > ===================== > To manage your subscription to SPSSX-L, send a message to > LISTSERV@.UGA > (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD ----- Please reply to the list and not to my personal email. Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
To use the value labels instead of values just change the OPTIONS subcommand: /OPTIONS NAMES=LABELS On Fri, Sep 15, 2017 at 9:13 AM, David Marso <[hidden email]> wrote: Very simple. Use VALUELAB function and then the resulting variable for |
Free forum by Nabble | Edit this page |