bugPSPP - Bugs: bug #57752, SAVE with /RENAME fails under...

 
 

bug #57752: SAVE with /RENAME fails under certain circumstances

Submitter:  None
Submitted:  Thu 06 Feb 2020 09:29:18 AM UTC
   
 
Category:  Syntax Parser Severity:  1 - Wishlist
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 20 Jun 2020 07:06:41 PM UTC, comment #2: 

I pushed a fix for this.

John Darrington <jmd>
Group administrator
Sun 09 Feb 2020 08:57:07 AM UTC, comment #1: 

This is really a limitation rather than a bug.   The TO convention does not work with /RENAME

However the example provided does reveal that the parameters in the error message have been inadvertently transposed.  I've pushed a fix for that.

John Darrington <jmd>
Group administrator
Thu 06 Feb 2020 09:29:18 AM UTC, original submission:  

pspp (GNU PSPP) 1.3.0-g65c0ae on x86_64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz GenuineIntel GNU/Linux.

Syntax:
SET PRINTBACK = ON.
DATA LIST LIST /A B C.
BEGIN DATA
1 2 3
4 5 6
END DATA.

  • This works.

SAVE OUTFILE = "test1.sav"
 /RENAME=(A C = v1 v3).
LIST.

  • This fails.

SAVE OUTFILE = "test2.sav"
 /RENAME=(A B C = v1 TO v3).

Output:
SET PRINTBACK = ON.
DATA LIST LIST /A B C.

Reading free-form data from INLINE.
+--------+------+
|Variable|Format|
+--------+------+
|A       |F8.0  |
|B       |F8.0  |
|C       |F8.0  |
+--------+------+

BEGIN DATA
1 2 3
4 5 6
END DATA.

  • This works.

SAVE OUTFILE = "test1.sav"
 /RENAME=(A C = v1 v3).

LIST.

    Data List
+----+----+----+
|  A |  B |  C |
+----+----+----+
|1.00|2.00|3.00|
|4.00|5.00|6.00|
+----+----+----+

  • This fails.

SAVE OUTFILE = "test2.sav"

test.sps:17: error: SAVE: Number of variables on left side of `=' (1) does not
match number of variables on right side (3), in parenthesized group 1 of RENAME
subcommand.

 /RENAME=(A B C = v1 TO v3).

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jmd (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-06-20 jmd StatusNone Fixed
        Open/ClosedOpen Closed
    2020-02-09 jmd Severity5 - Average 1 - Wishlist

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code