SYSFILE INFO creates a dataset called 'varinfo'. This dataset contains much
of the variable view. One solution would be to add columns with the custom attributes to the varinfo dataset. However, it does not contain the custom attributes. The context. I am trying to create Excel files so that NGO clients can edit variable names, labels, and custom attributes. They would then return the files so I can kludge the Excel files into syntax. Bruce has provided this list with syntax to put information from the variables view into Excel. That syntax uses SYSFILE INFO to create the varinfo dataset. However, that dataset does not include the information from custom attributes like (if and which MRSet the variable is in), (whether the variable is a filter question), (whether the question was specific to a country), or (comments). In the variables view, I can copy-and-paste the name and label to Excel. However, that does not work for custom attributes. Am I missing some GUI or syntax way to do this? Are there ways to paste columns from the variables view to the varinfo data set or to Excel? Is the only solution to copy-and-paste one cell at a time? ----- Art Kendall Social Research Consultants -- 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
Art Kendall
Social Research Consultants |
There are several ways to do this. CODEBOOK can display selected properties of variables, including custom attributes. DISPLAY ATTRIBUTES displays these but not other metadata. GATHERMD, an extension command, makes a dataset containing file names, variable names, labels, and specified custom attributes. It is meant for building a variable catalog for a set of files, but it can be used with a single file as well. These procedures vary a lot in how they display their information. Some will be more convenient than others. You might need to run more than one, creating datasets, and then merge appropriately. On Sat, Aug 15, 2020 at 9:31 AM Art Kendall <[hidden email]> wrote: SYSFILE INFO creates a dataset called 'varinfo'. This dataset contains much |
Thank you Jon.
The helpers on this list certainly help me avoid re-inventing the wheel. What worked. NEW FILE. DATASET NAME Dummy. GET FILE='C:\Users\Art\Desktop\P R O J E C T S\xxxxxxxxxx\test\Untitled13.sav'. DATASET NAME MyFile WINDOW=ASIS. DATASET ACTIVATE MyFile. DISPLAY ATTRIBUTES. DATASET CLOSE MyFile. GATHERMD/HELP. * See the ouptput file at the end for the list of attributes. * Custom attributes start with @ . * Remove the @ when copying attribute names to the GATHERMD command. * This is not set up to copy role measure width etc but you can . * copy&paste those columns from the variable view to columns of an Excel file. GATHERMD 'C:\Users\Art\Desktop\P R O J E C T S\xxxxxxxxxx\test\' /OPTIONS FILETYPES=spss ATTRLENGTH=256 DSNAME = target FILENAMEPATTERN="untitled13" /ATTRIBUTES Var.Grouping MR.Set Q.Filtering . DELETE VARIABLES source. ----- Art Kendall Social Research Consultants -- 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
Art Kendall
Social Research Consultants |
Free forum by Nabble | Edit this page |