LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2004)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 14 May 2004 14:17:21 -0500
Reply-To:   "Marks, Jim" <Jim.Marks@lodgenet.com>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   "Marks, Jim" <Jim.Marks@lodgenet.com>
Subject:   Re: Filename with datevalue
Content-Type:   text/plain; charset="iso-8859-1"

Egon:

Here is one solution:

** sample data. DATA LIST FREE /id. BEGIN DATA 1 2 3 END DATA.

** add year month day to file. STR yr (a4) /mo day (a2).

COMPUTE yr EQ STRING(xdate.year($TIME),F4). COMPUTE mo EQ STRING(xdate.month($TIME),N2). COMPUTE day EQ STRING(xdate.mday($TIME),N2). exe.

** write save command with date to new syntax file. ** Edit the filename and path to fit your system. TEMPORARY. SELECT IF $CASENUM EQ 1. WRITE OUTFILE = 'c:\savewithdate.sps' /"SAVE OUTFILE ='c:\filename-"yr mo day ".sav.". EXE.

** delete date variables from data file. ADD FILE FILE = * /drop = yr mo day. EXE.

** run syntax file with save. INCLUDE FILE = 'c:\savewithdate.sps'.

Edit the filename and path to fit your system.

jim

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of Kraan, Egon Sent: Friday, May 14, 2004 1:27 PM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Filename with datevalue

I need to be able to save a file where part of the file name is julian date value. Does anyone have a script, macro, syntax, or anything else that can handle this?

SAVE OUTFILE='C:\dir\filename0413501.sav' /COMPRESSED.

where 0413501 is updated based on the actual datevalue.

Thanks

Egon

====================================== Egon Kraan Beech Acres Program Evaluation & Quality Improvement ekraan@BeechAcres.org http://www.beechacres.org


Back to: Top of message | Previous page | Main SPSSX-L page