bugPSPP - Bugs: bug #27417, Add Files not implemented

 
 

bug #27417: Add Files not implemented

Submitted by:  None
Submitted on:  Thu 10 Sep 2009 03:13:43 PM UTC  
 
Category: System/Portable File I/OSeverity: 5 - Average
Status: FixedAssigned to: None
Open/Closed: ClosedRelease: None
Effort: 0.00

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 10 Sep 2009 05:06:29 PM UTC, comment #1:

ADD FILES is already implemented for the upcoming 0.7.x release of PSPP, so I'm closing this bug.

Ben Pfaff <blp>
Project Administrator
Thu 10 Sep 2009 03:13:43 PM UTC, original submission:

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.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by blp (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 10 Sep 2009 05:06:29 PM UTCblpStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1