Date: Thu, 29 Sep 2005 15:19:51 -0500
Reply-To: "Oliver, Richard" <roliver@SPSS.COM>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Oliver, Richard" <roliver@SPSS.COM>
Subject: Re: [BULK] File handle and File Type Mixed
Content-Type: text/plain; charset="us-ascii"
A macro name in a quoted string will not be expanded. You want to concatenate the macro value with the filename string, as in:
NAME=!pathd + '\filename.txt'
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Stephen Johnson
Sent: Thursday, September 29, 2005 12:53 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: [BULK] File handle and File Type Mixed
Importance: Low
I am attempting to set up some database preparation macros and production syntax and trying to debug my initial few lines of code. Not sure where I have gone wrong.
The first two lines of code are in a "master" syntax file that I am using to define path names and files.
DEFINE !pathd ( ) 'M:\Directory1\Directory2' !ENDDEFINE.
FILE HANDLE Prepare
/NAME= '!pathd \filename.txt'
/LRECL=20000.
It then progresses to a second syntax file that begins with (the data set contains information that I need to split into three separate files based on client responses to column 37):
FILE TYPE MIXED FILE = Prepare
/ RECORD = #test 37 (F)
/ WILD = WARN.
I keep being told that it can not find the file Prepare.
Any help would be appreciated.
Stephen Johnson