Re: urgent : Convert SAS array in to sas variables
Why would you want to do what you ask? What you are asking would create
the variable for all observations, but the variables' values would be
missing values for every observation except the one on which it is based.
On Sat, 3 May 2008 23:34:44 -0700, Shailesh <shailesh.tewari@GMAIL.COM>
>In my dataset I have an array variable , say A which has values like
>Observation 1 - A= 23 ,A=34, A=45
>Observation 2 - A= 23 ,A=34, A=45
>I want to create sas variables which should have name A61, A62 , A63,
>Similarly for second observation these would be A71, A72,
>A73 , A74.........
>in the same datastep.
>Any help ?
...urgent : Convert SAS array in to sas variables
In my dataset I have an array variable , say A which has values like
Observation 1 - A= 23 ,A=34, A=45
Observation 2 - A= 23 ,A=34, A=45
I want to create sas variables which should have name A61, A62 , A63,
Similarly for second observation these would be A71, A72,
A73 , A74.........
in the same datastep.
Any help ?
On May 4, 2:34=A0am, Shailesh <shailesh.tew...@gmail.com> wrote:
> In my dataset I have an array variable , say A which has values like
> Observation 1 - A=3D 23 ,A=3D34, A=3D45
> Observation 2 - A=3D 23 ,A=3D34, A=3D45
> I want to create sas variables which should have name A61, A62 , A63,
> A64 ..........
> Similarly for second observation these would be =A0 =A0 =A0 =A0 =A0 A71, A=
> A73 , A74.........
> in the same datastep.
> Any help ?
A SAS ARRAY is typically made up of variables, even if defined as
_TEMPORARY_. Please share more code to explain how you have
constructed the SAS DATA step logic thus far.
You could introduce DATA step logic that reads observations and uses
the _N_ value and a SAS variable counter to determine an ARRAY index/
subscript value for assigning a new variable of your choice. Here is
a very, very obscure (it makes unstated assumptions) DATA step
example, however it demonstrates the use of input and output ARRAYs
and a computed index variable to assign a parti...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: Converting Macro Variable to a SAS Dataset Variable #2
Sounds like you should address this at the step where you create the macro
variable; instead of creating a macro variable, create a dataset (or a
dataset variable). (I assume this is related to your other query, which
indicates that you create this macro variable in PROC SQL).
Can you post some code and sample data for how you arrive at &p1 in the
On Wed, Mar 18, 2009 at 10:22 AM, Siddharth Jain <email@example.com>wrote:
> If I have a macro variable p1 where %put <<p1>>; results in <<p1>>
> How do I bring value of p1 to a dataset. Can I make a dataset variable
> has the same values as of p1.
> Thanks in advance for your help,
...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: MVS Merge Variable Data Using SAS Merge or SAS SQL JOIN #2
You may want to consider using nested queries to create the keys that you
need to join the tables? That gives the SQL compiler a way to bound the
search space. For example,
create table temp as
from (select <key transformation>,* from small) as t1
left join (select <key transformation>,* from large) as t2
on t1.<transformed key> EQT t2.<transformed key>
Now the SQL compiler has two keys from the same domain that it can index or
use as sort keys. This method works with composite keys as well. Just make
sure that the <transformed key> v...Re: SAS Sample 1728 Was ---> Re: SAS Sample 1727 #2
I am not sure that the SI Tech Support examples should have all the error
checking that Chang wanted to throw in the macro. The examples should be
clear concise and easy to read and get going, as well as be illistrative.
Too much error checking in an example well is just over kill and even
detrimental to an example. However, any code solution on the SI Tech
Support web sit should follow basic rules of good practices and sound
advice. Such as with thier macros having atleast a somewhat good Macro
Look at Example SAS Sample 1728:
The first method well lets say is soooo bad...Re: suggest: improve SAS Deployment Wizard for SAS v9.2, phase 2
Subject: Re: v9.2 phase 2, page update
"Make the installation of SAS BI Server easier!"
Just remember that the majority of us are still just installing only
SAS Foundation v9.2, and possibly Enterprise Guide v4.2
My rant/suggestion to Tech Support has been addressed.
I have added notes about my conversation with Tech Support
to this sas community wiki page:
summary: if you have Build # greater than or equal to 28
then you can dispense with ForceInstall.
Ronald J. Fehd, IT Spec
HelpDesk Level 3: SAS
CDC S...Re: What r the data types in SAS? in Base SAS , and SAS SQL
> From: Amar Mundankar
> Sent: Tuesday, July 21, 2009 8:10 AM
> To: firstname.lastname@example.org
> Subject: What r the data types in SAS? in Base SAS , and SAS SQL
> Hi all,
> What are the different data types in Base SAS and SAS SQL??
character, lengths from 1 to 32,000+
numeric: lengths from 2 to 8
dates are a subtype of numeric
and are identified by their date, datetime, or time formats
the new proc TSPL (Table Server Processing Language)
supports ANSI data types: bigint, tinyint, etc.
http://s...Re: Running SAS jobs sequentially in batch mode
> Note that unless you clean up work datasets and any macro variables
created by each production job, subsequent jobs will not be starting in
a pristine environment. It may be a good idea to include a new program
between each production job to kill all work datasets and query
sashelp.vmacro to create %symdel statements to delete macro variables.
Would you be kind enough to give sample statements to do the CLEANING
1211 Avenue of the Americas
New York, NY 10036
From: SAS(r) Discussion [m...Re: SAS/DMS library default library allocations using SAS V8.2 on #2
The library allocations have to be stored <somewhere>, otherwise you
wouldn't continue to get the prompt. You can look under your userid to see
if it's there (though I suspect you've already done that), but a better
question would be directed at the SAS sysadmin--ask them where these
profiles/customizations are stored (the sasuser.profile is the generic
one--your personal one is concatenated along with it). You may be able to
see your session info under your userid tso log (shows usage information),
though off the top of my head I can't remember if it captures al...Re: Converting from SAS 5 to SAS 9 #5
I did try V8 before I sent the posting just to be sure that V5toV6 was not
available and I too, found it not there. I see that Dale did not find it in
a V6.12 installation. I just ran a mainframe 6.09E job and the proc is
there. I find it odd that it would not be available in 6.12 since this is a
V6 proc. The spelling is
<michaelraithel@W To: SAS-L@LISTSERV.UGA.EDU
Sent by: "SAS(r) Subject: Re: Converting...Re: Difference Between PC SAS and UNIX SAS #2
I cannot give a complete list by any means for these two systems but there
are functions listed in TS486 that are specific to windows and afaik, Sleep
is one of these. I suggest that you look at the Companion to the ...
Operating System in the online docs for each of these and compare the two
Environmental Specialist III
Dominion, Environmental Biology
4111 Castlewood Rd
Richmond, VA 23234
Phone:804-271-5313, Fax: 804-271-2977
Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU
Difference Between PC SAS and UNIX
Please respond to
Whether there is any difference between PC SAS and UNIX SAS from the
functionality or user point of view.
If there is a difference , kindly can you mention it.
Thanks for the help in advance.
CONFIDENTIALITY NOTICE: This electronic message contains
information w...Re: converting sas transport files into sas datasets
Once you have assigned an xport libname you can read it in like a
libname out xport 'C:\Documents and Settings\kdt\Desktop\class.xpt';
*- Create xport file;
*- Create work file from xport file;
> Hello All,
> Could anyone please give me the code for converting sas transport
> files into sas datasets. thanks in advance.
...Re: SAS 8.2 = SAS 8.02 ?
On Mon, 6 Dec 2004 10:29:57 -0500, Igor Kurbeko
>Are SAS releases 8.2 and 8.02 one and the same?
>I wanted to apply hot fix for SAS Release 8.2 (TS2M0) B2BB97.
>But we use SAS 8.02
SAS releases 8.2, 8.02, and 8e refer to the same thing Release 8.2
(TS2M0), at least on Windows platform and likely so in other platforms.
It seems an outcome of the development and marketing not in sync -- which
is much frequent happening in the industry. Like Java 2 is in fact Java
1.2 and above, ms off...Re: Converting from SAS 5 to SAS 9 #10
1985 ... Technology milestones...
First SAS System release for PC DOS (Base SAS and SAS/RTERM software) is
Micro-to-mainframe link (SAS/C Compiler) is introduced for PCs linking to
DDS Data Extraction
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Nat
Sent: Friday, December 17, 2004 7:01 AM
Subject: Re: Converting from SAS 5 to SAS 9
I must beg to differ- A pc DOS version of SAS was announced...Re: EWMA in base SAS / or SAS/STAT? #2
>From: Michael Murff <mysasbox@GMAIL.COM>
>Reply-To: Michael Murff <mysasbox@GMAIL.COM>
>Subject: EWMA in base SAS / or SAS/STAT?
>Date: Wed, 11 Oct 2006 18:57:15 -0600
>I'm wondering if others are aware of open source coding for Exponentially
>Weighted Moving Average (EWMA) or other advanced time series smoothers (eg.
>holt winters) in base SAS? Just putting out a feeler in the hope that I
>don't have to reinvent the wheel :-)
I'm guessing you're still in that SQC ...Re: Deleting SAS Data from a SAS DATASET #2
Chandra - this isn't my expertise area - I'm sure others may have better
ideas but I'll make three comments.
If your datasets have a large number of variables, in your datastep
method a WHERE clause will be more efficient - the IF statement causes
each record to be fully read before it can be selected for deletion. A
WHERE clause would only read the single variable in the case of records
that meet the criteria for deletion.
where snap_dt ne "&end_dt"d;
You probably would be better off changing your data model though - my
first thought would to be to store your data as separate yearly or
monthly files and then access them with a view of the past two years or
24 months. With each month or year you would delete the oldest file and
change the view one time period forward.
*set up the data;
data time1 time2 time3 time4;
do i = 1 to 100;
do t = 1 to 4;
if t=1 then output time1;
if t=2 then output time2;
if t=3 then output time3;
if t=4 then output time4;
*three successive example views;
data filet1 / view=filet1;
set time1 time2;
data filet2 / view=filet2;
set time2 time3;
data filet3 / view=filet3;
set time3 time4;
One more thought - since the data are appended - if the file is not
reordered and you have the record counts from each append - then you can
use firsto...Re: Convert text variable to SAS date #2
Drat Harry. I wanted to answer that one. :-)
...Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year.
I took the advanced exam this April because I wanted a relatively
systematic way of assessing my knowledge of SAS in a short time span.
For that purpose, it was worth it.
Since I learn SAS by doing new tasks, or re-doing old tasks in a new
way, I assume my knowledge of SAS is uneven, even though I am regarded
as productive, and frequently creative in using SAS to solve our group's
I passed the test, with lower subscores on the components that I
expected to be weakest on. I thought many of the questions made me
think about some fundamental, sometimes subtle, features of the
lan...Re: search SAS data set from SAS code #2
The answer to your question depends on your operating system. In Windows,
there's the Search tool. In Unix/Linux, you can use grep
240 314 4400 x1374
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
04/19/2005 11:13 AM
Please respond to myr_rose
Subject: search SAS data set from SAS code
Suppose I have a sas permanent data set which was created early, I know
the library path but I couldn't remember in which s...Re: SAS Intrnet question, passing macro variables to SAS.
You have to mask tokens that appear in pairs. In your example precede the single quote (') with a % sign.
&libdata=test&citystate=%str(%'Birmingham, AL%',%'Dothan, AL%',%'Huntsville,AL%')
From: Michael L. Davis [mailto:michael@BASSETTCONSULTING.COM]
Sent: Friday, January 28, 2005 5:13 AM
Subject: Re: [SAS-L] SAS Intrnet question, passing macro variables to SAS.
Hello Jia and other SAS-L Friends,
I'm not sure I know the answer but I have some ideas. However, first, I
have a question. Are you building the URL outside of an HTML form? If you
are, the following link on the SAS web site might interest you:
You might also want to look at the following link:
Look at the section titled "Specifying Name/Value Pairs in a URL".
Most likely, the ampersands might be playing a role. SAS/IntrNet strips
off "unsafe characters" unless you tell it not to do so. Please see:
Part of that link states:
The APPSRV_UNSAFE function returns the complete, original value of an input
name/value pair. Normally unsafe characters (see the UNSAFE option) are
stripped from input values before creating the input macro variables. This
is done so that macro variables may be freely used in a a...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: SAS-Related Friday Gift For All SAS-Lers #2
One more tip about the Book: *Seafood, Pictures, Facts, and Nutrition
Information; you don't have to download the whole book to browse its pages.
Just point your Browser at: www.warpraptor.com and navigate to **
AtlantaFishMarketBookTable_Of_Contents.pdf. Open this document and use the
Table of Contents found there (starting on page 3) to access all the
sections by clicking the individual Table of Contents items. If you choose
the COMPARATIVE SPECIES NUTRITION SUMMARIES item, the legend for the
nutrition data graphics will be found on page two of this same document.*
*On Fri, Jul 24...