f



Re: urgent : Convert SAS array in to sas variables #2

On Sat, 3 May 2008 23:34:44 -0700, Shailesh <shailesh.tewari@GMAIL.COM> wrote:

>In my dataset I have an array variable , say A which has values like
>Observation 1 - A[1]= 23 ,A[2]=34, A[3]=45
>Observation 2 - A[11]= 23 ,A[12]=34, A[13]=45
>
>I want to create sas variables which should have name A61, A62 , A63,
>A64 ..........
>Similarly for second observation these would be           A71, A72,
>A73 , A74.........
>
>
>in the same datastep.
>
>Any help ?
>
>Regards,
>Shailesh

Arrays are DATA *step* structures. They do not exists in data *sets*. Please
post an example showing the data set you have and what you need (or think
you need).
0
hs
5/5/2008 8:05:35 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

0 Replies
914 Views

Similar Articles

[PageSpeed] 24

Reply:

Similar Artilces:

Re: urgent : Convert SAS array in to sas variables
Shailesh, 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. Art ----- On Sat, 3 May 2008 23:34:44 -0700, Shailesh <shailesh.tewari@GMAIL.COM> wrote: >In my dataset I have an array variable , say A which has values like >Observation 1 - A[1]= 23 ,A[2]=34, A[3]=45 >Observation 2 - A[11]= 23 ,A[12]=34, A[13]=45 > >I want to create sas variables which should have name A61, A62 , A63, >A64 .......... >Similarly for second observation these would be A71, A72, >A73 , A74......... > > >in the same datastep. > >Any help ? > >Regards, >Shailesh ...

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[1]= 23 ,A[2]=34, A[3]=45 Observation 2 - A[11]= 23 ,A[12]=34, A[13]=45 I want to create sas variables which should have name A61, A62 , A63, A64 .......... Similarly for second observation these would be A71, A72, A73 , A74......... in the same datastep. Any help ? Regards, Shailesh 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[1]=3D 23 ,A[2]=3D34, A[3]=3D45 > Observation 2 - A[11]=3D 23 ,A[12]=3D34, A[13]=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= 72, > A73 , A74......... > > in the same datastep. > > Any help ? > > Regards, > Shailesh 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 first place? -Joe On Wed, Mar 18, 2009 at 10:22 AM, Siddharth Jain <sjain@aveopharma.com>wrote: > If I have a macro variable p1 where %put <<p1>>; results in <<p1>> > 01,02,03,06 > > > How do I bring value of p1 to a dataset. Can I make a dataset variable > which > has the same values as of p1. > > > Thanks in advance for your help, > Siddharth > ...

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: > > http://www.sascommunity.org/wiki/Category:V9.2_Phase_2 > > http://www.sascommunity.org/wiki/V9.2_Phase_2_install_guide > > 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
A: 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, proc sql; create table temp as select * 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
Graham , 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 design. 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!" .... Ok w/me! 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: http://www.sascommunity.org/wiki/V9.2_Phase_2_install_guide 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: sas-l@uga.edu > 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://support.sas.com/documentation/cdl/en/tsag/30878/HTML/default/a003 065339.htm 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 and KILLING? Susie Li TV Guide 1211 Avenue of the Americas New York, NY 10036 Tel 212.852.7453 Email susie.li@tvguide.com -----Original Message----- 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
Mikeey 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 V5TOV6 Nat Michael Raithel <michaelraithel@W To: SAS-L@LISTSERV.UGA.EDU ESTAT.COM> cc: 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 systems. Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977 Suthakar Iyer <suthakariyer@YAH OO.COM> To Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU Discussion" cc <SAS-L@LISTSERV.U GA.EDU> Subject Difference Between PC SAS and UNIX SAS 06/05/2008 02:28 PM Please respond to suthakariyer@yaho o.com Hi, Whether there is any difference between PC SAS and UNIX SAS &nbsp;from the functionality or user point of view. &nbsp; If there is a difference , kindly can you mention it. &nbsp; Thanks for the help in advance. &nbsp; Suthakar &nbsp; &nbsp; ----------------------------------------- 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 normal dataset. libname out xport 'C:\Documents and Settings\kdt\Desktop\class.xpt'; *- Create xport file; data out.class; set sashelp.class; run; *- Create work file from xport file; data work.class; set out.class; run; 2008/12/17 <pramila.sami@gmail.com>: > 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 <ikurbeko@ATHEROGENICS.COM> wrote: >Hi, guys. > > > >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 Hi, Igor, 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
http://www.sas.com/presscenter/bgndr_history.html 1985 ... Technology milestones... First SAS System release for PC DOS (Base SAS and SAS/RTERM software) is immediate success. Micro-to-mainframe link (SAS/C Compiler) is introduced for PCs linking to mainframes. Paul Choate DDS Data Extraction (916) 654-2160 -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Nat Wooding Sent: Friday, December 17, 2004 7:01 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Converting from SAS 5 to SAS 9 Robin 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> >To: SAS-L@LISTSERV.UGA.EDU >Subject: EWMA in base SAS / or SAS/STAT? >Date: Wed, 11 Oct 2006 18:57:15 -0600 > >Hi, > >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 :-) > >TIA, > >M.M. 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. Data prod.Master_date; set prod.master_date; where snap_dt ne "&end_dt"d; run; 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; end; end; run; *three successive example views; data filet1 / view=filet1; set time1 time2; run; data filet2 / view=filet2; set time2 time3; run; data filet3 / view=filet3; set time3 time4; run; 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 problems. 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
Rose, The answer to your question depends on your operating system. In Windows, there's the Search tool. In Unix/Linux, you can use grep Bob Abelson HGSI 240 314 4400 x1374 bob_abelson@hgsi.com Rose <myr_rose@YAHOO.COM> Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> 04/19/2005 11:13 AM Please respond to myr_rose To: SAS-L@LISTSERV.UGA.EDU cc: Subject: search SAS data set from SAS code Hi All, 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.
Jia, You have to mask tokens that appear in pairs. In your example precede the single quote (') with a % sign. Try: &libdata=test&citystate=%str(%'Birmingham, AL%',%'Dothan, AL%',%'Huntsville,AL%') Nikhil Sardesai -----Original Message----- From: Michael L. Davis [mailto:michael@BASSETTCONSULTING.COM] Sent: Friday, January 28, 2005 5:13 AM To: SAS-L@LISTSERV.UGA.EDU 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: http://support.sas.com/faq/039/FAQ03925.html You might also want to look at the following link: http://support.sas.com/rnd/web/intrnet/dispatch82/input.html 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: http://support.sas.com/rnd/web/intrnet/dispatch82/srvusaf.html 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. Gerhard On Tue, 18 Mar 2008 06:43:44 -0700, RolandRB <rolandberry@HOTMAIL.COM> wrote: >Is it possible to read a sas dataset NOT using sas and have >observations and variables etc. rather than having meaningless chunks >of text? ...

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...

Web resources about - Re: urgent : Convert SAS array in to sas variables #2 - comp.soft-sys.sas

Variable - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Westpac interest rate rise is one of many variable loan rate rises
WESTPAC is not alone in hitting its owner-occupier customers with a surprise interest rate rise, as dozens of other variable rate home loans ...

Airbnb upgrades variable pricing tool for hosts
Online home rental group Airbnb is rolling out an upgraded variable pricing tool that automatically raises or cuts room rates based on supply ...

Commonwealth Bank raises variable home loan rates
Home owners' mortgage costs are set to rise by hundreds of dollars a year, after the Commonwealth Bank became the latest bank to hike interest ...

CBA lifts variable home loan rates to offset costs associated with stricter capital requirements
The Commonwealth Bank to lift its home loan interest rates independently of the Reserve Bank to partially offset costs associated with stricter ...

Washington Square Signs Spielbergs, Choi Joins Variable and More
... films and an episode of the HBO comedy series "Girls," on which he plays the role of Ray Ploshansky. New York-based creative collective Variable ...

Mozilla moves Firefox to variable release schedule
... schedule process "carefully" and learning "a lot" from it in the past years, Mozilla has announced that Firefox is now moving to a variable ...

"You have to ignore many variables to think women are paid less than men. California is happy to try." ...
Writes Sarah Ketterer in The Wall Street Journal in "The ‘Wage Gap’ Myth That Won’t Die" (which you can get to without subscribing if you Google ...

Staley: 'A lot of different variables...been a hard year'
... 41° Navigation Home Giants A's Sharks Warriors Kings 49ers Raiders Quakes Insiders More Tickets Shop Watch Staley: 'A lot of different variables...been ...

When your environment variables are showing
There are embarrassing moments in life. There is the teacher calling you out as a child in class as you stare out the window wistfully imagining ...

Resources last updated: 3/17/2016 6:44:36 AM