Date: Fri, 22 Aug 2003 16:56:53 +0200
Reply-To: "Groeneveld, Jim" <jim.groeneveld@VITATRON.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Groeneveld, Jim" <jim.groeneveld@VITATRON.COM>
Subject: Re: Renaming a .lst file in batch
Content-Type: text/plain; charset="iso-8859-1"
Try renaming to .TXT, also useful for opening in Word. But as I see you rename output files from a Unix system, tranfer it to a Windows system and view them with Word. For Word .DOC files are not plain text files, all readable ascii.
However, such file types between Unix and DOS systems are not completely compatible. In Unix ascii files (which they actually are) use end-of-line characters LF (LineFeed, ascii value 10) only, while in DOS and Windows en-of-line characters are the CRLF pair (CarriageReturn and LineFeed, ascii-13 and ascii-10). So before viewing them you would have to convert between both systems. There are many (small) utilities for doing that, often called Unix2Dos (or Dos2Unix for the other way).
I hope one of these suggestions may help you finding a solution.
Regards - Jim.
Y. (Jim) Groeneveld MSc
Biostatistician Science Group
6825 MJ Arnhem
Phone: +31/0 26 376 7365
(replace _NO_ and _SPAM_ by dots)
From: Eric [mailto:leavemealone@HOTMAIL.COM]
Sent: Friday, August 22, 2003 16:15
Subject: Renaming a .lst file in batch
I'm sure somebody should be able to figure this out quickly, but I've
been stuck on this for a while and am finally searching out some help.
I've got a program which creates several listings of various types
(data null output, procedural output and several proc sql queries at
the end). After the end of the SAS statements I have a Unix command
that renames the file to .doc from .lst and then emails the file to me
(for now while I'm testing). The .lst file appears to be incomplete
when it is renamed as the .doc file does not contain everything in the
.lst file. Specifically, the .doc file ends mid-sql query. I've tried
the Unix command "Sleep" with varying lengths of time to try and delay
things enough for the listing to be completed, but so far it's not
working. In the meantime I've changed the program so that the output
is generated using ods html, but I'd like to send it as something the
recipient can see as an attachment and click on it to automatically
open it in Word. I can't easily use the rtf destination as the program
uses lots of legacy code using line pointers and such to format the
output such that when the .rtf file is opened in Word it wraps bady
even when using landscape orientation and I'd rather not play around
with all of the spacing.