SET Options Used Only in Command Processor



Controlling the Version of Output Files


WRITE-OLD-VER      (Y/N) or (Number/N)

 WRITE-VER (Number)


By default, except for Stata, a particular output file type will be written using the latest version supported by Stat/Transfer.  For example SAS Version 9 files will be written if SAS is specified.


If Stata is specified as the output file type, Stata Version 16 files will be written by default.  Users of older versions may see an error message, "File is not in Stata format" generated when Stata sees the newer file type.  If you see this, simply select an older format and repeat your transfer.


To write a file for a previous version of a particular file type, use either of the SET commands:


SET WRITE-OLD-VER (Y/N) or (Number/N)

WRITE-VER (Number)


where Number is the version number of the output file that you wish to use.  The number will be useful if you wish to precisely control the version of SPSS or Stata files.


If you use the first form of the SET command, Stat/Transfer will use the next-to-the-last version of the output file type you have selected.  For example, if you have selected a SAS output file,


  set write-old-ver y


would tell Stat/Transfer to write a SAS Version 8 output file.


If you wished to create a Stata 5 output file, you would use


  set write-ver 5


Note that you can use either form if you wish to use the next-to-the-last version.



Reset Variable Selection Statement


     DROP-KEEP       (Clear/Save)  


If data are transferred from more than one input file during a single session, then you need to specify the variables that are to be transferred from each file, using the KEEP or DROP variable selection command. The DROP-KEEP options of the SET command allow you to reuse or clear the variable selection command.


Input Files Specified Separately


If the input files are specified with separate COPY commands (that is, without using wildcards), then the default behavior is that you must give a separate KEEP or DROP variable selection statement before each COPY command.  This corresponds to the option 'Clear' for DROP-KEEP.


However, if the same variables are to be transferred from each file, you can specify that the same KEEP or DROP command apply to all input files that follow, until another KEEP or DROP command is encountered.  To do so use the SET command


   set drop-keep save


If Stat/Transfer encounters errors in the Drop/Keep statement it will continue.  You can tell it to stop by using the SET command

   set dk-continue N


Input Files Specified with Wildcards

If the input files are specified with wildcards, then the default behavior is that the KEEP or DROP variable selection command you give before a COPY command applies to all of the files specified in that command. Thus the default when files are specified with wildcards is 'Save'.


If you set the DROP-KEEP option to 'Clear', then the variable selection statement will apply only to the first file.  All of the other files given by the wildcard specification will transfer all of their variables.


Note that the default changes depending on whether or not the input file specification contains wildcards.  The default is 'Clear' for no wildcards and 'Save' for wildcards.



Set Byte Order for S-PLUS and SPSS Output Files


   BYTE-ORDER       (HL/LH)


By default, under Windows Stat/Transfer will write files in low-high byte order for S-PLUS and SPSS output files.  Unix machines vary in their byte order.   DEC Alpha and Intel processors are low-high byte order, other Unix machines are high-low.  You can change the default in order to write a file appropriate for a Unix machine with the second byte order.


For example, if you wish to produce an S-PLUS file suitable for a Sun machine, you would use the SET command


   set byte-order hl