Re: Unable to read Unicode file into SAS file
Another possibility is that proc import isn't correctly getting the right
formats and informats. If you already know what those formats and
informats should be, you can always copy, paste and edit (from the log)
the data step that resulted from the proc import run, adjusting any
incorrect formats and informats and then just run it as a data step.
Also, while I don't think it would make any difference, your proc import
contains two "datafile=chr" statements.
On Tue, 19 Jan 2010 21:06:11 +0530, Cherish K <c4cherish@GMAIL.COM> wrote:
>From MS SQL, I ext...Re: How to convert a RTF file into a PDF file with SAS statements? #2
If you have Word and Acrobat, use DDE to drive Word.
On Mon, 23 May 2005 06:15:33 -0700, Lei Zhang <lzhang9830@YAHOO.COM> wrote:
> Does anyone know how to convert a RTf file into a PDF file by using
>SAS statements, or within SAS system? Any suggestion will be very
...Re: Autoexec.sas file Dm"pgm;zoom;"; doesnot wrk in SAS 9.2 #2
The PGM is the editor window up through v6.12
but also still exists today.
For the Enhanced Editor you can use:
dm editor 'zoom' wedit ;
Hope this is helpful.
Investment Business Intelligence
Investment Management & Research
Global Leaders in Multi-Manager Investing
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Ace
Sent: Wednesday, October 14, 2009 5:49 AM
Subject: Re: Autoexec.sas file Dm"pgm;zoom;"; doesnot wrk in SAS...Re: Reading RTF files with SAS
It works great! Thanks! I'm up and running now.
On Wed, Mar 18, 2009 at 6:37 PM, Arthur Tabachneck <firstname.lastname@example.org>wrote:
> I've never looked at the macro, but take a look at:
> On Wed, 18 Mar 2009 18:32:33 -0400, Jake <johbee@GMAIL.COM> wrote:
> >Does anyone know if SAS can read RTF files? The reason I need
> >to do this is to get a list of Titles from all the output in a bundled rtf
> >vs. doing it manually.
> >Thanks, for any information (publications, etc)
...Re: how to read this file into sas #2
Read the file in its orginal form and Proc Transpose is one alternative...
On Thu, 14 Sep 2006 17:09:52 -0700, liuyuanpku@GMAIL.COM wrote:
>Hi, I just got a problem to read a txt file into sas. The structure of
>the data in txt file is:
>1 3809 3810 3811 3812
>2 3814 3815 3816
>3 3817 3818 3819 3820
>When I read it into sas, I want it in the following structure:
>How can I get this sas data?
>Thank...Re: Is it possible to read a sas dataset NOT using sas? #2
I think SPSS and DBMSCopy can read SAS datasets. Also for sure WPS.
On Tue, 18 Mar 2008 06:43:44 -0700, RolandRB <rolandberry@HOTMAIL.COM>
>Is it possible to read a sas dataset NOT using sas and have
>observations and variables etc. rather than having meaningless chunks
...Re: Reading PDF Files into SAS #2
You have received several responses that speak of using some external tool
to do a pdf to text conversion and then, presumably, you would parse the
text with SAS. These responses depend on the PDF having been produced by a
pdf writer and not by the file being a scanned image. In the later case,
you would need to use an OCR reader to convert the pictures to text.
Do you need to do only a few conversions or many and will this be an
ongoing task? If you are only going to do an occasional conversion, I
would use the Save As Text which is found in Adobe Acrobat Reader 7.0 and
maybe earlier. However, if this is a larger project, I would (and have)
used an external program to do the conversions. I have a paper from several
years ago posted at
This describes how I used a tool that converted one pdf at a time and
controlled this from within the SAS program. Since that time, I have had a
similar project and was not able to get the pdf converter that I used
earlier to work. However, I found one available on line that converted all
of the pdfs in a folder in one pass I was able to eliminate all of the SAS
calls that ran the external process. I ran that particular job from home
since there are restrictions on using unapproved tools here at work and I
do not recall the name of the converter.
Environmental Specialist III
Dominion, Environmental Biology
4111 Ca...Re: read excel files into SAS #2
A quick way to solve it is to use DDE, which you can specify the first
row to be read as data and specify the informat as well.
On 8/8/05, Joan Zhao <email@example.com> wrote:
> I found a problem when I read a excel file into SAS. The initial seceral
> rows(more than 8 rows) of one of the column in this file are blank and then
> follwed by numeric numbers. In this column, most cells are empty. When SAS
> read in this file by no matter what approach(SAS/ACCESS--import procedure
> or OLEDB), nothing in this column is read in. The generated SAS dataset is
> empty....Re: Unix SAS: How to save log file while in SAS session? #2
On Wed, 18 Aug 2004 12:18:03 -0500, Duck-Hye Yang <dyang@CHAPINHALL.ORG>
>I am using SAS Unix Display manager.
>I put together single small sas programming files in one giant sas
>I need to save log and output files AFTER each single small programming
>The problem is that I do not know how to save log and output while in SAS
>Below is the outline of what I'd like to do:
>DM 'clear log';
>DM 'clear output';
>SAS 1 programming start here
>x 'file "SAS...Re: Read SAS date from log/turning it into SAS datetime value #2
Hi Richard, Rich
The datestyle Rich0850 finds, occurs in the log produced by a batch-sas
session - and doesn't appear on an interactive-sas session log.
Where you can anticipate the use for later parsing of the log, I would
reccommend - as Richard (Richard A. DeVenezia <radevenz@IX.NETCOM.COM>)
did - insert into the autoexec, a statement to generate a more-easily read
datetime. In all my sessions, (keeping altlogs of all interactive sessions
has proved very very useful, time and again) I have this statement at the
end of the autoexec.......
%put starting (contract/project/applicatio...Re: Reading SAS data sets on UNIX by non-SAS apps #2
Following on Richard's thoughtful suggestions, the Affinium system would
likely capture data from csv files. SAS PROC EXPORT produces them quickly,
and loading them into external systems works faster for relatively basic
data structures and data formats, in my experience, than xml parsing.
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of John
Sent: Monday, October 18, 2004 10:10 AM
Subject: Reading SAS data sets on UNIX by non-SAS apps
I have SAS data sets on AIX that we need to read with Unica's Affinium
campaign management software, also on a UNIX box. (Let's not get into why
we didn't go with the SAS Solution.) SAS Institute doesn't supply an ODBC
driver for the UNIX environment, and the Affinium implementors don't want to
use the SAS SQL Library for C and or deal with APIs. Other that dumping the
SAS data sets as flat files, can anyone suggest a solution?
Thanks in advance for the help.
...Re: Creating SAS datasets from reading a file #2
Couldn't you accomplish what you want by using Proc SQL to crete two macro
variables and then use those variables in a data step? E.g.,
proc sql noprint;
select distinct "dwproject_"||state,
"if state eq '"||state||"' then output"||
into :data_st separated by ' ',
:if_st separated by ' '
On Fri, 11 Jul 2008 15:08:19 -0400, SUBSCRIBE SAS-L Chandra Gadde...Re: read files on mainframe from pc sas #2
you don't say what version of SAS is in use on either the
mainframe or the pc.
if you license SAS/Connect, you can connect to the mf and
xfer the data. If you do now, you can save the data in
transport format (xport/cport), download to the pc and read
it. On the mf, ignore any conventions your systems folks
have told you about optimal blocking and use lrecl=80,
blksize=8000 and recfm=fb.
---- Original message ----
>Date: Sat, 8 Jan 2005 16:38:46 -0600
>From: kukda <mkukda@COX.NET>
>Subject: read files on mainframe from pc sas
>Is t...Re: reading multiple excel files into SAS #2
* READ ALL EXCEL FILES WITH SAME STRUCTURE *
* FROM A FOLDER INTO SAS USING MACRO *
* DATE: SEP-29, 2005 *
%macro ReadXls(dir =3D , out =3D );
* MACRO PARAMETERS: *
* DIR: FOLDER WHERE DATA IS STORED *
* OUT: NAME OF OUTPUT DATA TABLE *
/* DELETE TABLE WITH SAME NAME AS OUTPUT DATA */
/* MANIPULATION THE STRING OF FOLDER PATH */
dir1 =3D...Re: suggest: improve SAS Deployment Wizard for SAS v9.2, phase 2 #2
> From: A Little Birdie
> I just searched the SAS-L archives (should have done that
> first) and found references to these two pages:
> Have you seen this page?
> http://support.sas.com/kb/35/631.html <---<<< NICE!
> It looks like it addresses your needs, and might be something
> nice to add to the SASCo...Re: How can I read old SAS system file? #2
Duck-Hye Yang <dyang@CHAPINHALL.ORG> wrote:
> How can I read this old file named "crnlink.ssd01"?
> The following code did not work:
> libname master '/match/peoplematch/';
> proc print data=master.crnlink (obs=100);run;
That's a SAS V6 data set. You should have looked at the log and seen
what the error was. Try this variant of your own code:
libname master v6 '/match/peoplematch/';
proc print data=master.crnlink (obs=100);run;
However, you may not have the path to the directory specified quite
...Re: How to read a period in a variable from a file to SAS dataset #2
On Mon, 28 Jul 2008 02:01:10 -0700, =?ISO-8859-1?Q?Rune_Runnest=F8?=
>This is the file with the fileref MYFILE:
>DOKTITTEL: this is the first record
>DOKTITTEL: this is the third record
>I want the second record to be '.', not ' '.
>How can I obtain that?
>filename myfile "d:\tem...Re: How to Read PDF/RTF data in to SAS datasets #2
On Tue, 28 Nov 2006 14:50:49 GMT, John I <not@HOTMAIL.COM> wrote:
>Frank Poppe wrote:
>> John I schreef:
>>> Richard A. DeVenezia wrote:
>>> > "Susiyanto, Dwi (GE Money)" wrote:
>>> >> Hi SAS experts,
>>> >> I have data of account list (that is like text file) in PDF/RTF
>>> >> format. If i looked in RTF/PDF , it will show the column and account
>>> >> list (including header of report), but when i do to copy paste to
>>> >> text file (by using edi...Re: PC SAS 9.1
If you run SAS in batch mode the dir the .sas file is in will by default be
the dir where the .log and .lst files will be left.
Regards - Jim.
Jim Groeneveld, Netherlands
Statistician, SAS consultant
My computer remains home while I will attend PhUSE 2006 in Dublin.
On Tue, 12 Sep 2006 09:23:15 -0400, Jon Hayward <jhayward1@BABSON.EDU>
>Is there a setting in PC SAS so that whichever directory I save my .sas
>file to, SAS will automatically go there when I want to save my .log
>and .lst files?
>Currently...Re: Reading multiple .RPT files from a Folder into SAS dataset #2
It should not be hard, if
1. You have a reliable technique for reading *one* of the files.
2. The 30 files have a common structure.
Focus on #1 first. You are getting ahead of yourself if you don't have a
On Sat, 24 Jun 2006 08:01:04 -0700, SAS-1 <emailto.nishant@GMAIL.COM> wrote:
>I have a folder containg around 30 .RPT ASCII text files and I need to
>read all of them into a single SAS dataset. The .rpt files are huge and
>doing the Import individually might be a time consuming effort. Is
>there a method of reading files from a folder one by one ...Re: R vs. SAS (was Replacement for SAS (SPSS vs. SAS, redux)) #2
Sounds like R is the SAS equivalent of Linux .. who are incidentally in all
sorts of a copy left/right mess at the moment.
On Thu, 5 Feb 2004 09:39:37 -0500, Peter Flom <flom@NDRI.ORG> wrote:
>I use both SAS and R; I"ve used SAS for 10 or 15 years, R for about 6
>months - 1 year.
>Each has strengths and weaknesses; I'd not like to give up either.
>Strengths of SAS (esp. compared to R)
>Tech support - I have SAS tech support's phone number and our license
>number memorized. They're great.
>SAS-L - There's also an R-help list...Re: How to read data from stata file(.dta) in SAS 9.0 #2
by the way: if you still get errors, install a actual SAS version. The
below is for 9.1.3
On Mon, 28 Sep 2009 10:04:31 -0400, Gerhard Hellriegel
>try the following (adapt your dataset names):
>proc import out= hsb2 datafile = "c:\data\hsb2.dta";
>proc contents data=hsb2;
>On Mon, 28 Sep 2009 00:25:37 -0700, kondal <kondal717@GMAIL.COM> wrote:
>>I used following code to read data from stata file ( SAS 9.0) bu...Re: Reading MS Word ".doc" files into SAS #2
Maybe you can download a shareware (there are many out there), then
batch convert them to txt files. A data step to read in all the txt files,
and keep only the first few lines would very easy to write.
DDE is another option of course, but need a bit more coding.
On Fri, 18 Apr 2008 14:35:30 -0400, Jake Bee <johbee@GMAIL.COM> wrote:
>These are acutally .doc (not .rtf) -- Thanks again for any information.
>On 4/18/08, Brian <firstname.lastname@example.org> wrote:
>> On Apr 18, 1:43 pm, joh...@GMAIL.COM (Jake Bee) wrote:
>> > Dear SAS-L:
>...Re: Trouble using DDE to read text from a Word file into SAS #2
As far as I know, SAS reads tables when doing DDE. I'm not sure what happens with straight text.
Can you run your job by manually opening the DOC and then issuing the DDE commands. If they work at this point, then I would guess that you are not opening your doc properly.
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Paul Miller
Sent: Wednesday, September 02, 2009 2:04 PM
Subject: Trouble using DDE to read text from a Word file into SAS
Hello fellow DDE users,
I want to read text from a word...