bug-gnu-pspp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PSPP-BUG: [bug #27417] Add Files not implemented


From: anonymous
Subject: PSPP-BUG: [bug #27417] Add Files not implemented
Date: Thu, 10 Sep 2009 15:13:44 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)

URL:
  <http://savannah.gnu.org/bugs/?27417>

                 Summary: Add Files not implemented
                 Project: PSPP
            Submitted by: None
            Submitted on: Thu 10 Sep 2009 03:13:43 PM UTC
                Category: System/Portable File I/O
                Severity: 5 - Average
                  Status: None
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None
                  Effort: 0.00

    _______________________________________________________

Details:

Looking at the input/output features of pspp, it seems that the unimplemented
ADD FILES command is a major feature -that is there is no convenient 'union'
command for system files.

Being new to PSPP it is not obvious how to program this feature but, perhaps
the suggestion that the ADD FILES is just a special cases of the MATCH FILES
may help.

ADD FILES can be replicated using MATCH FILES if each system file to be
'added' has a unique sequential ID variable - as in:

-------------------------------------------
** convert add files to match files .

add files
  /file='temp1'
  /file='temp2'
  .

get file 'temp1'.
compute FILEID=1.
save out='temp1'.
get file 'temp2'.
compute FILEID=2.
save out='temp2'.
match file
   /file='temp1'
   /file='temp2'
   /by=FILEID 
   /drop=FILEID .
list.




data list free/v1 v2.
begin data.
111 112
121 122
end data.
save out='temp1'.
data list free/v2 v3.
begin data.
212 213
222 223
end data.
save out='temp2'.
add files
  /file='temp1'
  /file='temp2'.
list.

OR

get file 'temp1'.
compute FILEID=1.
save out='temp1'.
get file 'temp2'.
compute FILEID=2.
save out='temp2'.
match file
   /file='temp1'
   /file='temp2'
   /by=FILEID 
   /drop=FILEID .
list.

should yield ...

      V1       V2       V3

  111.00   112.00      .
  121.00   122.00      .
     .     212.00   213.00
     .     222.00   223.00

-------------------------------------------
Note that if the ADD FILES has a BY clause for 'interleaving' this can be
emulated by adding the FILEID to the BY list.
-------------------------------------------

Clearly it is inefficient to read and write the files with a 'FILEID' added,
so, if a constant variable can be created on the fly during the read of each
system file in the ADD FILES, the MATCH FILE code can be 'easily' morphed into
an ADD FILES command code. 





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27417>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]