LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2003)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 30 Sep 2003 12:59:28 -0500
Reply-To:     "Marks, Jim" <Jim.Marks@lodgenet.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Marks, Jim" <Jim.Marks@lodgenet.com>
Subject:      Re: Reading a data set
Content-Type: text/plain; charset="iso-8859-1"

Lou:

Have you tried the wizard to open your data? (It has worked for me, using delimited files).

It will generate GET DATA syntax, similar to this (not tested):

GET DATA /TYPE = TXT /FILE = 'C:\temp\file.dat' /FIXCASE = 1 /ARRANGEMENT = FIXED /FIRSTCASE = 2 /IMPORTCASE = ALL /VARIABLES = /1 V1 0-6 F7.2 V2 7-18 A12 V3 19-27 A9 V4 28-31 F4.2 V5 32-33 A2 V6 34-37 A4 V7 38-48 A11 V8 49-71 A23 . CACHE. EXECUTE.

(The help file notes that GET DATA counts from column 0, while DATA LIST counts from column 1 !)

For the DATA LIST command, you might try:

1) changing the first variable definition to 1 (rather than 1 - 1) 2) changing all variable definitions to Ax (where x is the width-->

DATA LIST FILE='C:\ALARF03.dat' /f00001 (A1) f00002 (A5) f00003 (A5) f00004 (A20) f00005 (A4) .

(I don't know if #2 makes a difference, but the first one is called out in the syntax manual.)

Good luck

Jim Marks Senior Market Analyst LodgeNet Entertainment Corporation

-----Original Message----- From: Cohen, Lou [mailto:Lou.Cohen@bhsala.com] Sent: Tuesday, September 30, 2003 10:15 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Reading a data set

I am having trouble reading a very large data set (many,many variables) and hoping someone could assist me.

According to the vendor, the data set is not a fixed record format. It has 3225 records with a record length of 31871. It is on CD in ASCII format. I have data documentation, i.e., layout field position, etc. Below is an example of syntax written to read the file. The problem is that I am unable to read all the data. More than half the fields come up empty (missing). The vendor verified that data exists in those fields.

Is there something in the DATA LIST statement that should be changed? Thanks in advance for your assistance.

DATA LIST FILE='C:\ALARF03.dat' / f00001 1 - 1 (A) f00002 2 - 6 (A) f00003 7 - 11 (A) f00004 12 - 31 (A) f00005 32 - 35 (A)

Lou Cohen Director, Strategic Planning & Research Baptist Health System 3500 Blue Lake Drive Birmingham, Alabama 35283-0605 (205) 715-5736


Back to: Top of message | Previous page | Main SPSSX-L page