**Possible to convert SAS syntax code to SPSS code?**I had a user ask me this yesterday, and I don't know if there is a
easy way to do this "conversion". They have been long, long time SAS
users, but need to do some equivalent work in SPSS. Brute force would be
difficult as some of their programs are long and sophisticated.
Thanks,
Necia A. Black, Ph.D. e-mail: black@buffalo.edu
246 Computing Center Web URL:http://www.acsu.buffalo.edu/~black
SUNY-Buffalo FAX: (716) 645-3734
Buffalo, New York 14260 Ph...

**Re: Possible to convert SAS syntax code to SPSS code?**necia <black@BUFFALO.EDU> wrote:
> I had a user ask me this yesterday, and I don't know if there is a
> easy way to do this "conversion". They have been long, long time SAS
> users, but need to do some equivalent work in SPSS. Brute force would
be
> difficult as some of their programs are long and sophisticated.
The easy way: grad students. :-)
There is no automatic converter. A lot of features of the SAS data step
just don't translate, anyway. A lot of the SQL and database management
features don't translate directly, either. A lot of the macro ...

**Converting SAS Code to Stata**Hello All,
Is there a way to convert a SAS code into Stata? I have about 500 lines of
SAS code that I would to convert into Stata. I appreciate any of your
suggestions.
My guess is that if you don't know both SAS and Stata, then
you need to find someone that does, and they would attempt
to rewrite the SAS code into Stata. I don't know of any
automatic code generators to do this for you- you have to
have a *person* to do this. SAS can save datasets that
Stata can use- .dta files.
-Mary
--- okie_dude2003@YAHOO.COM wrote:
From: Kris <okie_dude2003@YAHOO.COM>...

**Converting SAS code to SQL**Is there a software or guide that could help me in converting SAS scoring
code into SQL.
Thanks,
Sajeel
Sajeel,
As far as I know no there isn't. There is a book scheduale to be released
soon I think on credit scoring. I doubt there ever will be as there are
several methods and steps to build a scoring model. The last time I did
this I used SQL to build the input and report data sets and used SAS stat to
do the stats work.
Toby Dunn
From: sajeel manzoor <sajeelmanzoor@HOTMAIL.COM>
Reply-To: sajeel manzoor <sajeelmanzoor@HOTMAIL.COM>
To: SAS-L@LISTSERV.UGA.EDU
Subject...

**Re: Converting SAS code**Maybe, you could improve the performance of your SAS algorithms.
Sometimes very simple changes make significant performance
improvement. Doing so would seem easier than rewriting in a new
language. Poorly optimized algorithms probable run about the same
speed in any language.
If you would tell the group about the overall process we could
probably help you improve your existing SAS programs. The code
snippet you supplied does not proved much information.
On 11/28/09, Håkan Lane <hlane@cls.dk> wrote:
> We have reached a point where our SAS code is taking enormous
> amoun...

**Re: Converting SAS code #3**In addition to what has already been said, I seen several items that suggest some tuning could help. I should add that I have not really looked at this with the care needed for careful analysis.
First, you have a keep statement in a data step and I have to wonder whether there are many more variables that are brought from your original set that could be dropped in the Set statement.
Next, you test on first.aar but you have ugenr in the BY statement. This is unnecessary in the BY statement.
You set a length for the variable CRAM but it is not included in the Keep statement.
You invoke optio...

**Re: Converting SAS code #2**Håkan:
I agree with Data _NULL_'s comment that you may likely get
more cost-effective benefits by improving your algorithms in SAS
rather than recoding in another language.
For instance, in the code you provided, DATA A is generated
as in intermediate input to DATA B, after which A is deleted;
You might save resources by generating A as a view rather than
as a dataset.
And A is being generated with all values of PNR, even though
when you merge it with other datasets, you filter on
WHERE mod(pnr,10)=&pnrcif;
So why put all the other values of PNR in A (whether as
a view or a ...

**Re: Converting SAS code to SQL**Sajeel,
As far as I know no there isn't. There is a book scheduale to be released
soon I think on credit scoring. I doubt there ever will be as there are
several methods and steps to build a scoring model. The last time I did
this I used SQL to build the input and report data sets and used SAS stat to
do the stats work.
Toby Dunn
From: sajeel manzoor <sajeelmanzoor@HOTMAIL.COM>
Reply-To: sajeel manzoor <sajeelmanzoor@HOTMAIL.COM>
To: SAS-L@LISTSERV.UGA.EDU
Subject: Converting SAS code to SQL
Date: Mon, 5 Sep 2005 16:13:25 +0000
Is there a software or guide that could...

**Convert SAS code to S-Plus**This is the SAS code that i've got..
options pageno=1;
%macro loglinear(likelihood,dataset,pstar,yvar,xvar);
title2 "P* = &pstar";
%let p_max= &pstar;
%let maxit=1000;
%let crit=.0001;
%let p=0;
%do %while(%scan(&xvar,&p+1)^=);
%let p=%eval(&p+1);
%end;
data x (keep=intercep &xvar);
length intercep &xvar 8;
set &dataset;
intercep=1;
run;
data y ( keep = &yvar );
set &dataset;
run;
proc iml worksize=500000;
reset nolog noprint;
nbeta = &p + 1;
beta=j(nbeta,1,0);
sebeta=j(nbeta,1,0);
rbeta=j(nbeta,1,0);
rsebeta=j(nbeta,1,0);
...

**Convert SAS code into SPSS syntax**Hey guys, I am new to SPSS macro. Now I have some SAS code and try to
convert them to SPSS syntax.It is really an emergency. Could anybody
help me out? The SAS code are as follows:
1. %let a=10;
data new;
set old;
where b=%eval(&a-1);
run;
2.
%macro byweek(a, b);
proc summary data=&a.week;
by system cat name;
var absent enrolled;
output out=&b._out sum=&b._absent &b._enrolled;
run;
data &b._out2;
set &b._outs;
&b._rate=(&b._absent*100)/&b._enrolled;
keep system cat name
&b._absent &b._enrolled &b...

**Converting SAS code to SPSS script**Hi folks
Does anyone know a way (short of employing a consultant) to convert
SAS code to SPSS (11.5) script?
I have 3000 lines of SAS script that does some fuzzy matching.
Converting it manually is taking too long because the program is very
involved and the files I'm trying to match are 2.6m records each so
it's not a small job.
Is there a feature of SPSS / SAS or a download that will convert from
SAS to SPSS?
Cheers
Rob
...

**Re: Converting SAS Code to Stata 13017**> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Joe
> Matise
> Sent: Monday, December 07, 2009 2:18 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Re: Converting SAS Code to Stata
>
> Probably outside of my expertise then [I'm a data person, not a stat
> person], but you certainly could run that in batch:
> * Construct dataset with your model information, so, 100 rows [or
> whatever]
> and the appropriate variables that differentiate each run
> * Use CALL EXECUTE to run a macro that has your ...

**Re: Converting SAS Code to Stata 131944**I have a pretty good understanding of Base SAS and SAS macros, but I have
never used Stata. The only reason why I am compelled to use Stata (which
is located on a server) is that for the SAS program that I have written and
the data that needs to be processed, my PC would not work or in other words
the processing speed will not be good enough. It seems that there is no
easy way to convert a SAS program to Stata. Thanks!!
...

**Re: Converting SAS Code to Stata 280829**Could you run it in batch overnight? Or is this something that would take a
week to run? I can't imagine STATA would be much if any faster than SAS
except for the server's speed, so perhaps something like this could be
attempted? How much data are you processing [events/rows/etc.]? What sort
of desktop time are you currently using to run it?
In any event, you might try posting your code and what it's supposed to do;
on the list we often find that it's possible to significantly speed up code
by making a few fairly common modifications. 500 lines isn't much, so ...

**Convert SAS code to S-Plus #2**I have no idea of SAS and just a little of S-Plus!Does anyone know how i
can convert a code that i've got in SAS into an S-Plus or Matlab code????
HELP!!!!
...

**Help in SAS code- convert to .sav file**Hi,
Is there any SAS code for converting a SAS data set to a SPSS (.sav) file. I did work by using the SPSS commands 'get sas data' but I wanted to know whether there is any method to convert the dataset into .sav file without using SPSS (using SAS codes).
-Premalatha
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Sorry, I know of plenty of ways to get SPSS data into SAS, but once I have=
=20
my data in SAS I have never bothered to wonder how to get it into SPSS.=20
<Uh-oh, ...

**SAS code to convert all text fields to Upcase**Hi,
I need help to have a SAS macro that can convert all texts in all character
fields in a dataset into upcase. The code can identify the character fields
in the dataset, and then convert the texts in these fields into upcase.
Thanks for your help
Frank
Frank,
Here's one solution....note this does NOT upcase formatted variables
proc contents data=libname.ds_name out=work.contents(keep=name type varnum)
noprint;
run;
proc sort data=work.contents;
by varnum;
run;
data _null_;
set work.contents end=eof;
where type = 2; /* 1 - num, 2 - char */
call symput('v'||trim(l...

**Re: Converting SAS code to SQL #2**Sajeel:
As we have seen earlier on SAS-L, the term 'scoring' has many different
meanings in statistics and computing. The SQL CASE ...WHEN ... THEN ...
ELSE ... clause in a SELECT statement is analogous to IF ... THEN ... or
SELECT ... statements in Data step programs. The SQL SELECT list can
contain complex arithmetic expressions and functions [ SELECT (X1*b1 +
X2*b2 + ...) AS estimate FROM .... ]. If you are asking how to use
summary functions in SQL, take a look at GROUP BY ... HAVING ...
clauses. For anything else, you'll have to provide more detail on what
you are trying to do...

**Re: Converting SAS code to SQL #3**sajeelmanzoor@HOTMAIL.COM wrote:
>Is there a software or guide that could help me in converting SAS scoring
>code into SQL.
I don't know whether you're talking about building a scorecard, or
scoring data after creating a predictive model in one of the SAS
statistical procs.
If your goal is to convert SAS code for *building* a scorecard or
computing a predictive model into SQL, then forget it. You might
as well ask to convert Adobe Photoshop into SQL.
If your goal is to take a previously-built scorecard and use SQL to
apply it, then you shouldn't have a problem. You can c...

**Re: Converting SAS Code to Stata #5**Probably outside of my expertise then [I'm a data person, not a stat
person], but you certainly could run that in batch:
* Construct dataset with your model information, so, 100 rows [or whatever]
and the appropriate variables that differentiate each run
* Use CALL EXECUTE to run a macro that has your parameters as macro
parameters
That could run overnight and produce all of your results, and then in the
morning you can do whatever you need to do to the results to make them
useful. It's quite possible that there are better ways to do this [and it
might be worth posting the specifics,...

**convert sql server code subquerey to sas** I have a hard time to convert tsql subquery to sas
Part of tsql
select
-----
SelectionDate = (select convert(varchar, pc.SelectionDate, 101) where
pc.selectiondate
> '01/01/1900'),
ConAssignedDate = (select top 1 convert(varchar, attributevalue, 101) frompxad
where pxad.prospectcaseid = a.prospectcaseid and attributeid = 223),
ReferralDate = (select convert(varchar, pc.referraldate, 101) where
pc.referraldate
> '01/01/1900' and a.workflowstatus in (370,400,450,500,650)),
OpenedDate = (select convert(varchar, pc.OpenedDate, 101) where pc.OpenedDate
> '01/01/1...

**Re: Converting SAS Code to Stata #2 131946**On Mon, 7 Dec 2009 15:14:22 -0600, Joe Matise <snoopy369@GMAIL.COM> wrote:
>Could you run it in batch overnight? Or is this something that would take
a
>week to run? I can't imagine STATA would be much if any faster than SAS
>except for the server's speed, so perhaps something like this could be
>attempted? How much data are you processing [events/rows/etc.]? What sort
>of desktop time are you currently using to run it?
>
>In any event, you might try posting your code and what it's supposed to do;
>on the list we often find that it's...

**Re: Converting SAS Code to Stata #3 131948**On Mon, 7 Dec 2009 16:18:12 -0600, Joe Matise <snoopy369@GMAIL.COM> wrote:
>Probably outside of my expertise then [I'm a data person, not a stat
>person], but you certainly could run that in batch:
>* Construct dataset with your model information, so, 100 rows [or whatever]
>and the appropriate variables that differentiate each run
>* Use CALL EXECUTE to run a macro that has your parameters as macro
>parameters
>
>That could run overnight and produce all of your results, and then in the
>morning you can do whatever you need to do to the results t...

**Re: Converting SAS Code to Stata #3 1617295**You don't say what type of SAS code you have. Is using PMML an option for
you?
Philip Rack
MineQuest, LLC
SAS & WPS Consulting and WPS Reseller
Tel: (614) 457-3714
Web: www.MineQuest.com
Blog: www.MineQuest.com/WordPress
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Kris
Sent: Monday, December 07, 2009 3:01 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Converting SAS Code to Stata
Hello All,
Is there a way to convert a SAS code into Stata? I have about 500 lines of
SAS code that I would to convert into Stata. I appreciate any of your
s...