Date: Thu, 26 Apr 2007 16:24:07 -0400
Reply-To: "F. J. Kelley" <jkelley@UGA.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "F. J. Kelley" <jkelley@UGA.EDU>
Subject: Re: Converting SPSS program syntax to SAS syntax
Content-Type: text/plain; charset=us-ascii
A while back I had a 750+ line SPSS (pre-SPSSx) pgm that was similiar. Data was from 1980 (sent by ICPSR; I believe at the time they provided access for Osiris and SPSS). I dug up an ancient SPSS on the mf and had to work on the cataloged proc (plus "punch" a deck of usage stats).
These pgms can be quite long and parsing the labels is not always so easy (altho, heck, SPSS did it in fortran, no one's choice for character processing)
--Joe
---- Original message ----
>Date: Thu, 26 Apr 2007 20:10:00 +0000
>From: toby dunn <tobydunn@HOTMAIL.COM>
>Subject: Re: [SAS-L] Converting SPSS program syntax to SAS syntax
>To: SAS-L@LISTSERV.UGA.EDU
>
>And what is the problem with converting this to SAS code again?
>
>The Value Labels are formats in SAS.
>
>And I am not wholly sure I would have the variables labels iterate what the
>question was verbatum. Seems to me that that should be something for
>external documentation.
>
>
>Toby Dunn
>
>You can see a lot by just looking. ~Yogi Berra
>
>Do not seek to follow in the footsteps of the wise. Seek what they sought.
>~Matsuo Basho
>
>You never know what is enough, until you know what is more than enough.
>~William Blake, Proverbs of Hell
>
>
>
>
>
>From: Charlie Axilbund <caxilbund@IASINFO.COM>
>Reply-To: Charlie Axilbund <caxilbund@IASINFO.COM>
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: Re: Converting SPSS program syntax to SAS syntax
>Date: Thu, 26 Apr 2007 12:55:26 -0700
>
>On Thursday 26 April 2007 12:23:39 pm data _null_; wrote:
> > Can you post an example of the "program" that the application is
> > writing. Sounds like an interesting problem to write something that
> > extracts the data/meta data you need to read the data into SAS.
>
>Here is a relatively short one. I've included the biggest problems -- the
>overlong value label
> (state is 741 columns) and the overlong variable label -- qbr3 is 384 or
>so columns.
>
>GET DATA /TYPE = TXT
> /FILE = 'xxv07014.dat'
> /FIXCASE = 1
> /ARRANGEMENT = FIXED
> /FIRSTCASE = 1
> /VARIABLES =
> /1
> uuid 0-15 A16
> date 16-31 A16
> markers 32-95 A64
> record 96-102 F7.0
> status 103-103 F1.0
> vlist 104-104 F1.0
> practice 105-105 F1.0
> qa 106-107 F2.0
> vzone 108-108 F1.0
> qbr0 109-109 F1.0
> qbr1 110-110 F1.0
> qbr2 111-111 F1.0
> qbr3 112-112 F1.0
>
>..
>
>VALUE LABELS
>status 1 'Not qualified' 2 'Overquota' 3 'Qualified'/
>vlist 1 'SSI' 2 'Mall Facility'/
>practice 1 'Real Interview' 2 'Practice Interview'/
>qa 1 'Alabama' 2 'Alaska' 3 'Arizona' 4 'Arkansas' 5 'California' 6
>'Colorado' 7 'Connecticut' 8 'Delaware' 9 'District of Columbia' 10
>'Florida' 11 'Georgia' 12 'Hawaii' 13 'Idaho' 14 'Illinois' 15 'Indiana' 16
>'Iowa' 17 'Kansas' 18 'Kentucky' 19 'Louisiana' 20 'Maine' 21 'Maryland' 22
>'Massachusetts' 23 'Michigan' 24 'Minnesota' 25 'Mississippi' 26 'Missouri'
>27 'Montana' 28 'Nebraska' 29 'Nevada' 30 'New Hampshire' 31 'New Jersey' 32
>'New Mexico' 33 'New York' 34 'North Carolina' 35 'North Dakota' 36 'Ohio'
>37 'Oklahoma' 38 'Oregon' 39 'Pennsylvania' 40 'Rhode Island' 41 'South
>Carolina' 42 'South Dakota' 43 'Tennessee' 44 'Texas' 45 'Utah' 46 'Vermont'
>47 'Virginia' 48 'Washington' 49 'West Virginia' 50 'Wisconsin' 51
>'Wyoming'/
>vzone 1 'Pacific' 2 'Mountain' 3 'Central' 4 'Eastern'/
>qbr0 1 'An advertising agency' 0 'NO TO: An advertising agency'/
>qbr1 1 'A movie studio or Home Video company' 0 'NO TO: A movie studio or
>Home Video company'/
>qbr2 1 'A company involved with the exhibition or distribution of movies or
>video' 0 'NO TO: A company involved with the exhibition or distribution of
>movies or video'/
>qbr3 1 'A market research company or department' 0 'NO TO: A market research
>company or department'/
>..
>
>VARIABLE LABELS
>uuid 'Respondent identifier'
>date 'Completion time and date'
>markers 'Acquired markers'
>record 'Record number'
>status 'Respondent status'
>vlist 'Track list'
>practice 'Please select whether this is a real interview or practice
>interview.'
>qa 'Please indicate which state you reside in?'
>vzone 'Time Zones'
>qbr0 'AN ADVERTISING AGENCY - Do you or does any member of your immediate
>family work in any of the following professions?'
>qbr1 'A MOVIE STUDIO OR HOME VIDEO COMPANY - Do you or does any member of
>your immediate family work in any of the following professions?'
>qbr2 'A COMPANY INVOLVED WITH THE EXHIBITION OR DISTRIBUTION OF MOVIES OR
>VIDEO - Do you or does any member of your immediate family work in any of
>the following professions? Some times variable labels are too long for SAS -
>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
>qbr3 'A MARKET RESEARCH COMPANY OR DEPARTMENT - Do you or does any member of
>your immediate family work in any of the following professions?'
>..
>
>
>
>
>--
>Charlie Axilbund
>caxilbund@iasinfo.com
>
>_________________________________________________________________
>Need a break? Find your escape route with Live Search Maps.
>http://maps.live.com/default.aspx?ss=Restaurants~Hotels~Amusement%20Park&cp=33.832922~-117.915659&style=r&lvl=13&tilt=-90&dir=0&alt=-1000&scene=1118863&encType=1&FORM=MGAC01
|