pspp-users
[Top][All Lists]
Advanced

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

Re: PROBLEM CREATING A DATE VARIABLE


From: Ricardo Mejias
Subject: Re: PROBLEM CREATING A DATE VARIABLE
Date: Sun, 7 Mar 2021 12:51:52 +0000

My version of PSPP is GNU pspp 1.4.1-g79ad47 and I am on Windows 10.  BirthDate is Date and ResidenceZipcode is String.



I used this code and I still got the total number of records of 15,782,637.
GET  /FILE = "E:\GNU_PSPP\FloridaTotalsFiles\SelectedAndAddedFields_20210209.sav".
N 100.

I reran the code up to the line where it crashes and it crashed again.
GET /FILE = "E:\GNU_PSPP\FloridaTotalsFiles\SelectedAndAddedFields_20210209.sav".
FILTER OFF.
USE ALL.
SELECT IF(NOT MISSING(BirthDate)).
STRING ResidenceZipcodes (A5).
COMPUTE ResidenceZipcodes=SUBSTR(ResidenceZipcode,1,5).
DELETE VARIABLES ResidenceZipcode.
NUMERIC EndDate (F10).       /*Worked up to here.  Crashes after that*/
COMPUTE EndDate = YRMODA(2021, 01, 31).
EXECUTE.


From: Alan Mead <amead@alanmead.org>
Sent: Saturday, March 6, 2021 11:31 PM
To: Ricardo Mejias <ricardomejias@hotmail.com>
Subject: Re: PROBLEM CREATING A DATE VARIABLE
 
This page describes selecting cases: https://www.ibm.com/support/knowledgecenter/SSLVMB_sub/statistics_reference_project_ddita/spss/base/syn_n_of_cases_overview.html . Suposedly, this will only read 100 cases:

GET FILE='/data/city.sav'.
N 100.

What version of PSPP are you using? YOu can see it if you select Help > About:



What types are BirthDate and ResidenceZipcode? I ran your script and it ran fine, but it had errors that prevented some of the lines from executing. But the lines that you think are causing trouble seemed to execute correctly:



-Alan


On 3/6/2021 8:33 PM, Ricardo Mejias wrote:
I restarted the computer and re-ran this code and it crashed in the same place again.  If you can show me what code I need to use to select the first 100 records of a file, I will do that for you to try this with my file.  I already looked that up and tried it but it also crashed.

GET /FILE = "E:\GNU_PSPP\FloridaTotalsFiles\SelectedAndAddedFields_20210209.sav"
FILTER OFF.
USE ALL.
SELECT IF(NOT MISSING(BirthDate)).
STRING ResidenceZipcodes (A5).
COMPUTE ResidenceZipcodes=SUBSTR(ResidenceZipcode,1,5).
DELETE VARIABLES ResidenceZipcode.
NUMERIC EndDate (F10). /*Worked up to here.  Crashes after that*/
COMPUTE EndDate = YRMODA(2021, 01, 31).
EXECUTE.



From: Alan Mead <amead2@alanmead.org>
Sent: Saturday, March 6, 2021 8:23 PM
To: Ricardo Mejias <ricardomejias@hotmail.com>; pspp-users@gnu.org <pspp-users@gnu.org>
Subject: Re: PROBLEM CREATING A DATE VARIABLE
 
Sounds like PSPP or psppire is crashing, which shouldn't be happening.

But I cannot replicate the issue. I opened a dataset in PSPP version GNU pspp 1.4.0-gc3c044 on Windows and I executed these lines:

NUMERIC EndDate (F10).                     /*Worked up to here.  Crashes on the next line*/
COMPUTE EndDate = YRMODA(2021, 01, 31).
execute.

And PSPP operated as expected. I see a new variable, EndDate, with a value of 160086 for all cases.

How sure are you that your copy crashes with YRMODA()?

It's also possible that your PSPP entered an unstable state for whatever reason. Maybe if you reboot your computer and restart PSPP it will not re-occur?

I guess if it does continue to occur and you cannot send information to replicate the problem, I'd try running PSPP in batch mode from the command line, because if it is crashing, you will probably see an error message that you can report and which may allow the problem to be identified. Here's what I had to type:

"C:\Program Files (x86)\PSPP\bin\pspp.exe" error.sps

(WITH the double quotes).

-Alan


On 3/6/2021 6:06 PM, Ricardo Mejias wrote:
The code below is applied to a file that already contains several variables, to which I want to add two more that I create (but it is too large to go through email and my attempts to select the first 100 records is not working either).  When the code gets to COMPUTE EndDate = YRMODA(2021, 01, 31)., the program crashes with all of its windows disappearing from the screen.

What am I doing wrong and what do I have to do to correct it?

GET /FILE = "E:\GNU_PSPP\FloridaTotalsFiles\SelectedAndAddedFields_20210209.sav"
FILTER OFF.
USE ALL.
SELECT IF(NOT MISSING(BirthDate)).

STRING ResidenceZipcodes (A5).
COMPUTE ResidenceZipcodes=SUBSTR(ResidenceZipcode,1,5).
DELETE VARIABLES ResidenceZipcode.

NUMERIC EndDate (F10).                     /*Worked up to here.  Crashes on the next line*/
COMPUTE EndDate = YRMODA(2021, 01, 31).
FORMAT EndDate (ADATE10).
COMPUTE AgeInMonths = DATEDIFF(EndDate,BirthDate,'days') / (365.25*12).



From: Pspp-users <pspp-users-bounces+ricardomejias=hotmail.com@gnu.org> on behalf of pspp-users-request@gnu.org <pspp-users-request@gnu.org>
Sent: Saturday, March 6, 2021 12:00 PM
To: pspp-users@gnu.org <pspp-users@gnu.org>
Subject: Pspp-users Digest, Vol 177, Issue 6
 
Send Pspp-users mailing list submissions to
        pspp-users@gnu.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.gnu.org/mailman/listinfo/pspp-users
or, via email, send a message with subject or body 'help' to
        pspp-users-request@gnu.org

You can reach the person managing the list at
        pspp-users-owner@gnu.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Pspp-users digest..."


Today's Topics:

   1. Re: Re: PSPP for windows. (Harry Thijssen)


----------------------------------------------------------------------

Message: 1
Date: Fri, 5 Mar 2021 21:25:20 +0100
From: Harry Thijssen <pspp4windows@gmail.com>
To: pspp-users <pspp-users@gnu.org>, Alan Mead <amead2@alanmead.org>
Subject: Re: Re: PSPP for windows.
Message-ID:
        CAMMrg9T14ARGayXSauZ_MhyMTv9NeP6Ld-+N9AW7O5XU-UtT4w@mail.gmail.com"> <CAMMrg9T14ARGayXSauZ_MhyMTv9NeP6Ld-+N9AW7O5XU-UtT4w@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

>
> Date: Thu, 4 Mar 2021 19:31:19 -0600
> From: Alan Mead <amead2@alanmead.org>
> To: Gunnar Horrigmo <gunnar.horrigmo@usit.uio.no>, pspp-users@gnu.org
> Subject: Re: PSPP for windows.
>
[...]

> Harry Thijssen had set up a process to cross-compile PSPP on Linux to
> produce a windows package (and I think he also wrote the nullsoft
> installer).


Thanks Alan, but I don't earn the credits for the Nullsoft installer. I am
just a user of it. :-)

Stay safe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnu.org/archive/html/pspp-users/attachments/20210305/896bdab0/attachment.html>

------------------------------

Subject: Digest Footer

_______________________________________________
Pspp-users mailing list
Pspp-users@gnu.org
https://lists.gnu.org/mailman/listinfo/pspp-users


------------------------------

End of Pspp-users Digest, Vol 177, Issue 6
******************************************

-- 

Alan D. Mead, Ph.D.
President, Talent Algorithms Inc.

science + technology = better workers

http://www.alanmead.org

The irony of this ... is that the Internet is
both almost-infinitely expandable, while at the
same time constrained within its own pre-defined
box. And if that makes no sense to you, just
reflect on the existence of Facebook. We have
the vastness of the internet and yet billions
of people decided to spend most of them time
within a horribly designed, fake-news emporium
of a website that sucks every possible piece of
personal information out of you so it can sell it
to others. And they see nothing wrong with that.

-- Kieren McCarthy, commenting on why we are not 
                    all using IPv6

-- 

Alan D. Mead, Ph.D.
President, Talent Algorithms Inc.

science + technology = better workers

https://talalg.com


Ginsberg's Theorem:

0. There is a game.
1. You can't win.
2. You can't break even.
3. You can't even get out of the game.



reply via email to

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