showing current date and time at SPO file

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

showing current date and time at SPO file

Vicent Giner-Bosch
Hello.
 
I want to execute a "SORT CASES BY" for a big data set. I am interested in
calculating how long does it take.
 
I would like to know if it is possible, by means of syntax, to tell SPSS to
show current date and time at the SPO file. Something like "Current time is
....".
 
I am working with SPSS 14.0.
 
Thank you very much in advance.
 
Merry Christmas.  
--
Vicent Giner Bosch
 
ESTADIS - Statistics, Data Mining and Optimization Group
 
Polytechnic University of Valencia
 
Department of Applied Statistics, Operations Reseach and Quality
 
Camí de Vera, s/n
 
46022 Valencia, Spain
 
Tel.: +34 96 387 7490  /  +34 96 387 7007 - Ext. 74948  /  +34 630306621
74948
 
Fax: +34 96 387 7499

====================To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: showing current date and time at SPO file

Oliver, Richard
The system variable $time will give you the current date and time, as in:
 
compute currentTime=$time.
formats currentTime (datetime20).
 
But to find out how long a sort takes, try:
 
set messages on.
sort cases by sortvarname.
 
The resulting output in the Viewer window will include the amount of time the sort took.

________________________________

From: SPSSX(r) Discussion on behalf of Vicent Giner Bosch
Sent: Tue 12/25/2007 5:36 AM
To: [hidden email]
Subject: showing current date and time at SPO file



Hello.

I want to execute a "SORT CASES BY" for a big data set. I am interested in
calculating how long does it take.

I would like to know if it is possible, by means of syntax, to tell SPSS to
show current date and time at the SPO file. Something like "Current time is
....".

I am working with SPSS 14.0.

Thank you very much in advance.

Merry Christmas.
--
Vicent Giner Bosch

ESTADIS - Statistics, Data Mining and Optimization Group

Polytechnic University of Valencia

Department of Applied Statistics, Operations Reseach and Quality

Camí de Vera, s/n

46022 Valencia, Spain

Tel.: +34 96 387 7490  /  +34 96 387 7007 - Ext. 74948  /  +34 630306621
74948

Fax: +34 96 387 7499

=======
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

====================To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: showing current date and time at SPO file

Fry, Jonathan B.
An easy way to get $time (among other things) displayed is

SHOW $VARS.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Oliver, Richard
Sent: Wednesday, December 26, 2007 9:48 AM
To: [hidden email]
Subject: Re: showing current date and time at SPO file

The system variable $time will give you the current date and time, as in:

compute currentTime=$time.
formats currentTime (datetime20).

But to find out how long a sort takes, try:

set messages on.
sort cases by sortvarname.

The resulting output in the Viewer window will include the amount of time the sort took.

________________________________

From: SPSSX(r) Discussion on behalf of Vicent Giner Bosch
Sent: Tue 12/25/2007 5:36 AM
To: [hidden email]
Subject: showing current date and time at SPO file



Hello.

I want to execute a "SORT CASES BY" for a big data set. I am interested in
calculating how long does it take.

I would like to know if it is possible, by means of syntax, to tell SPSS to
show current date and time at the SPO file. Something like "Current time is
....".

I am working with SPSS 14.0.

Thank you very much in advance.

Merry Christmas.
--
Vicent Giner Bosch

ESTADIS - Statistics, Data Mining and Optimization Group

Polytechnic University of Valencia

Department of Applied Statistics, Operations Reseach and Quality

Camí de Vera, s/n

46022 Valencia, Spain

Tel.: +34 96 387 7490  /  +34 96 387 7007 - Ext. 74948  /  +34 630306621
74948

Fax: +34 96 387 7499

=======
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=======
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: showing current date and time at SPO file

Albert-Jan Roskam
I often use:

define @time () show n. !enddefine.

and then '@time.' scattered throughout the syntax.
Just using 'show n.' or 'show $vars.' would work
equally well, of course.

Cheers!!
Albert-Jan


--- "Fry, Jonathan B." <[hidden email]> wrote:

> An easy way to get $time (among other things)
> displayed is
>
> SHOW $VARS.
>
> -----Original Message-----
> From: SPSSX(r) Discussion
> [mailto:[hidden email]] On Behalf Of
> Oliver, Richard
> Sent: Wednesday, December 26, 2007 9:48 AM
> To: [hidden email]
> Subject: Re: showing current date and time at SPO
> file
>
> The system variable $time will give you the current
> date and time, as in:
>
> compute currentTime=$time.
> formats currentTime (datetime20).
>
> But to find out how long a sort takes, try:
>
> set messages on.
> sort cases by sortvarname.
>
> The resulting output in the Viewer window will
> include the amount of time the sort took.
>
> ________________________________
>
> From: SPSSX(r) Discussion on behalf of Vicent Giner
> Bosch
> Sent: Tue 12/25/2007 5:36 AM
> To: [hidden email]
> Subject: showing current date and time at SPO file
>
>
>
> Hello.
>
> I want to execute a "SORT CASES BY" for a big data
> set. I am interested in
> calculating how long does it take.
>
> I would like to know if it is possible, by means of
> syntax, to tell SPSS to
> show current date and time at the SPO file.
> Something like "Current time is
> ....".
>
> I am working with SPSS 14.0.
>
> Thank you very much in advance.
>
> Merry Christmas.
> --
> Vicent Giner Bosch
>
> ESTADIS - Statistics, Data Mining and Optimization
> Group
>
> Polytechnic University of Valencia
>
> Department of Applied Statistics, Operations Reseach
> and Quality
>
> Camí de Vera, s/n
>
> 46022 Valencia, Spain
>
> Tel.: +34 96 387 7490  /  +34 96 387 7007 - Ext.
> 74948  /  +34 630306621
> 74948
>
> Fax: +34 96 387 7499
>
> =======
> To manage your subscription to SPSSX-L, send a
> message to
> [hidden email] (not to SPSSX-L), with no
> body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send
> the command
> INFO REFCARD
>
> =======
> To manage your subscription to SPSSX-L, send a
> message to
> [hidden email] (not to SPSSX-L), with no
> body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send
> the command
> INFO REFCARD
>
> =====================
> To manage your subscription to SPSSX-L, send a
> message to
> [hidden email] (not to SPSSX-L), with no
> body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send
> the command
> INFO REFCARD
>



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page.
http://www.yahoo.com/r/hs

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: showing current date and time at SPO file

Albert-Jan Roskam
In reply to this post by Fry, Jonathan B.
The methods below use an ECHO command in a macro to
display the time. Both methods are ugly (IMHO), but if
you just import the Python code (or INSERT the spss
syntax), it already looks nicer. The Python method
offers much more flexibility.

Cheers!!
Albert-Jan

* Python/SPSS method.
begin program.
import spss, time
macroName = "the_time"
spss.SetMacroValue(macroName, " echo ' *** " +
time.asctime() + " *** ' ")
end program.

the_time.

* SPSS syntax method.
define the_time2 ()
do if $casenum = 1.
compute #time = $time.
formats #time (datetime20).
print / "*** ", #time, "***".
end if.
exe.
!enddefine.

the_time2.


display macros.








--- "Fry, Jonathan B." <[hidden email]> wrote:

> An easy way to get $time (among other things)
> displayed is
>
> SHOW $VARS.
>
> -----Original Message-----
> From: SPSSX(r) Discussion
> [mailto:[hidden email]] On Behalf Of
> Oliver, Richard
> Sent: Wednesday, December 26, 2007 9:48 AM
> To: [hidden email]
> Subject: Re: showing current date and time at SPO
> file
>
> The system variable $time will give you the current
> date and time, as in:
>
> compute currentTime=$time.
> formats currentTime (datetime20).
>
> But to find out how long a sort takes, try:
>
> set messages on.
> sort cases by sortvarname.
>
> The resulting output in the Viewer window will
> include the amount of time the sort took.
>
> ________________________________
>
> From: SPSSX(r) Discussion on behalf of Vicent Giner
> Bosch
> Sent: Tue 12/25/2007 5:36 AM
> To: [hidden email]
> Subject: showing current date and time at SPO file
>
>
>
> Hello.
>
> I want to execute a "SORT CASES BY" for a big data
> set. I am interested in
> calculating how long does it take.
>
> I would like to know if it is possible, by means of
> syntax, to tell SPSS to
> show current date and time at the SPO file.
> Something like "Current time is
> ....".
>
> I am working with SPSS 14.0.
>
> Thank you very much in advance.
>
> Merry Christmas.
> --
> Vicent Giner Bosch
>
> ESTADIS - Statistics, Data Mining and Optimization
> Group
>
> Polytechnic University of Valencia
>
> Department of Applied Statistics, Operations Reseach
> and Quality
>
> Camí de Vera, s/n
>
> 46022 Valencia, Spain
>
> Tel.: +34 96 387 7490  /  +34 96 387 7007 - Ext.
> 74948  /  +34 630306621
> 74948
>
> Fax: +34 96 387 7499
>
> =======
> To manage your subscription to SPSSX-L, send a
> message to
> [hidden email] (not to SPSSX-L), with no
> body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send
> the command
> INFO REFCARD
>
> =======
> To manage your subscription to SPSSX-L, send a
> message to
> [hidden email] (not to SPSSX-L), with no
> body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send
> the command
> INFO REFCARD
>
> =====================
> To manage your subscription to SPSSX-L, send a
> message to
> [hidden email] (not to SPSSX-L), with no
> body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send
> the command
> INFO REFCARD
>



      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD