I'd like a statement, that I'll call DECLARE, that functions as NUMERIC
when a numeric format is given, and STRING when a string format is given. I think that would be syntactically unambiguous. It would be neater to have DECLARE RespBnry (A8) /* Binary rep. of "RESPONSES" /#BinPlce (F2) /* N, for binary digit (2**n) /#BinDigt (F1) /* Value (0/1) of binary digit /#Analyze (F3) /* Remaining part of number /#BinChar (A1) /* Character rep. of #BinDigt */. instead of STRING RespBnry (A8) /* Binary rep. of "RESPONSES" */. NUMERIC #BinPlce (F2) /* N, for binary digit (2**n) /#BinDigt (F1) /* Value (0/1) of binary digit /#Analyze (F3) /* Remaining part of number */. STRING #BinChar (A1) /* Character rep. of #BinDigt */. |
At 12:57 PM 12/15/2006, Richard Ristow wrote:
>I'd like a statement, that I'll call DECLARE, that functions as NUMERIC >when a numeric format is given, and STRING when a string format is given. As long as we're in the suggesting business, I'd like a format type for strings named 'autofit', that would automatically adjust the width of a string field to its longest length in any extant case. I can't find anything like that in Ver. 12, but maybe it has been added since then. The default value would be width=0 (or maybe width = 1?), if there are no records (i.e., in a new database), or if all records for this field are blank. Of course, this would not be an acceptable parameter for fixed width data list statements, but would be permissible for comma-delimited Data Lists. This would be an especially valued feature for "Comment" fields, where the amount of space needed for comments is initially unknown. It would also be handy in the "Data View" window to have the "Display" width be 'autofit' On the other hand, it may be necessary to include a 'MAX = nnn' parameter, or to have a default MAX parameter, such as MAX=255. Or is this already available in a place I haven't looked? Bob in HI Robert M. Schacht, Ph.D. <[hidden email]> Pacific Basin Rehabilitation Research & Training Center 1268 Young Street, Suite #204 Research Center, University of Hawaii Honolulu, HI 96814 |
While suggestions are being made, I would like there to be a print
format that wrapped within a field. "this is a very long variable with a lot of words in it it goes on and and on and on. There is a group for garrulous people. It is called On and On and On Anon." it could be displayed in the data view or printed as something like depending on the format provided or the width ot the column in data view. this is a very long variable with a lot of words in it it goes on and and on and on. There is a group for garrulous people. It is called On and On and On Anon. Art Kendall Social Research Consultants Bob Schacht wrote: > At 12:57 PM 12/15/2006, Richard Ristow wrote: > >> I'd like a statement, that I'll call DECLARE, that functions as NUMERIC >> when a numeric format is given, and STRING when a string format is >> given. > > > As long as we're in the suggesting business, I'd like a format type for > strings named 'autofit', that would automatically adjust the width of a > string field to its longest length in any extant case. I can't find > anything like that in Ver. 12, but maybe it has been added since then. > > The default value would be width=0 (or maybe width = 1?), if there are no > records (i.e., in a new database), or if all records for this field are > blank. Of course, this would not be an acceptable parameter for fixed > width > data list statements, but would be permissible for comma-delimited Data > Lists. This would be an especially valued feature for "Comment" fields, > where the amount of space needed for comments is initially unknown. It > would also be handy in the "Data View" window to have the "Display" width > be 'autofit' > > On the other hand, it may be necessary to include a 'MAX = nnn' > parameter, > or to have a default MAX parameter, such as MAX=255. > > Or is this already available in a place I haven't looked? > > Bob in HI > > Robert M. Schacht, Ph.D. <[hidden email]> > Pacific Basin Rehabilitation Research & Training Center > 1268 Young Street, Suite #204 > Research Center, University of Hawaii > Honolulu, HI 96814 > > |
In reply to this post by Bob Schacht-3
Well, as another addition to the Christmas wishing list:
SPSS have replaced the "pin selected columns" functionality with "split screen". Though splitting the screen is often very useful, it is something different; it doesn't "pin" a column. For instance I often use the "variable" utility to "go to" a variable. This brings me to the variable in the left window, where I usually want my Case-id fixed or pinned. Well; Saint Nicholas (in the Netherlands we give each other presents twice in december) already gave me a better functionality of "sets" in version 15.0, but it would be very nice to find the old "pin selected columns" under the christmas tree. And hm, maybe the (pinned) columns can get beautiful colors. Merry Christmas Antoon Smulders -----Oorspronkelijk bericht----- Van: SPSSX(r) Discussion [mailto:[hidden email]] Namens Bob Schacht Verzonden: zaterdag 16 december 2006 1:39 Aan: [hidden email] Onderwerp: Suggest: "Autofit" Format At 12:57 PM 12/15/2006, Richard Ristow wrote: >I'd like a statement, that I'll call DECLARE, that functions as NUMERIC >when a numeric format is given, and STRING when a string format is given. As long as we're in the suggesting business, I'd like a format type for strings named 'autofit', that would automatically adjust the width of a string field to its longest length in any extant case. I can't find anything like that in Ver. 12, but maybe it has been added since then. The default value would be width=0 (or maybe width = 1?), if there are no records (i.e., in a new database), or if all records for this field are blank. Of course, this would not be an acceptable parameter for fixed width data list statements, but would be permissible for comma-delimited Data Lists. This would be an especially valued feature for "Comment" fields, where the amount of space needed for comments is initially unknown. It would also be handy in the "Data View" window to have the "Display" width be 'autofit' On the other hand, it may be necessary to include a 'MAX = nnn' parameter, or to have a default MAX parameter, such as MAX=255. Or is this already available in a place I haven't looked? Bob in HI Robert M. Schacht, Ph.D. <[hidden email]> Pacific Basin Rehabilitation Research & Training Center 1268 Young Street, Suite #204 Research Center, University of Hawaii Honolulu, HI 96814 |
In reply to this post by Bob Schacht-3
An autofit format as outlined here would be extremely difficult to do in SPSS, because it would require a completely different internal organization of the Virtual Active File. But, doing it the other way around is practical. That is, you start with some maximum width, pass the data, and then shrink the string size down to the minimum required.
In fact, there is an example of doing this with programmability in the SPSS Data Management book, which is available as pdf or hard copy. (You can find a link to this on SPSS Developer Central www.spss.com/devcentral.) I don't remember whether the example is in the current edition - the 3rd - or in the soon forthcoming 4th edition. HTH Jon Peck -----Original Message----- From: SPSSX(r) Discussion on behalf of Bob Schacht Sent: Fri 12/15/2006 6:39 PM To: [hidden email] Subject: [SPSSX-L] Suggest: "Autofit" Format At 12:57 PM 12/15/2006, Richard Ristow wrote: >I'd like a statement, that I'll call DECLARE, that functions as NUMERIC >when a numeric format is given, and STRING when a string format is given. As long as we're in the suggesting business, I'd like a format type for strings named 'autofit', that would automatically adjust the width of a string field to its longest length in any extant case. I can't find anything like that in Ver. 12, but maybe it has been added since then. The default value would be width=0 (or maybe width = 1?), if there are no records (i.e., in a new database), or if all records for this field are blank. Of course, this would not be an acceptable parameter for fixed width data list statements, but would be permissible for comma-delimited Data Lists. This would be an especially valued feature for "Comment" fields, where the amount of space needed for comments is initially unknown. It would also be handy in the "Data View" window to have the "Display" width be 'autofit' On the other hand, it may be necessary to include a 'MAX = nnn' parameter, or to have a default MAX parameter, such as MAX=255. Or is this already available in a place I haven't looked? Bob in HI Robert M. Schacht, Ph.D. <[hidden email]> Pacific Basin Rehabilitation Research & Training Center 1268 Young Street, Suite #204 Research Center, University of Hawaii Honolulu, HI 96814 |
Free forum by Nabble | Edit this page |