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 (August 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: Eric <leavemealone@HOTMAIL.COM>
Content-Type: text/plain; charset="iso-8859-1"

Hi Eric,

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 Vitatron B.V. Meander 1051 6825 MJ Arnhem The Netherlands Phone: +31/0 26 376 7365 Jim_NO_Groeneveld@Vitatron_SPAM_com (replace _NO_ and _SPAM_ by dots)

-----Original Message----- From: Eric [mailto:leavemealone@HOTMAIL.COM] Sent: Friday, August 22, 2003 16:15 To: SAS-L@LISTSERV.UGA.EDU 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.

Any suggestions?

Cheers,

Eric


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