
10-09-2023
mohamed_zaki
Barite | Level 11
Member since
08-11-2014
- 490 Posts
- 85 Likes Given
- 60 Solutions
- 194 Likes Received
This widget could not be displayed.
-
Latest posts by mohamed_zaki
Subject Views Posted 1727 08-26-2016 08:39 PM 1960 08-26-2016 08:36 PM 2414 08-25-2016 06:35 PM 1390 08-24-2016 11:57 AM 4841 08-07-2016 07:20 PM 1605 04-07-2016 08:52 PM 2464 03-20-2016 02:32 AM 5699 03-01-2016 06:19 AM 3014 02-29-2016 09:13 AM 7175 02-28-2016 05:38 PM -
Activity Feed for mohamed_zaki
- Got a Like for Re: Multiple conditions in one if statement. 11-24-2024 10:53 AM
- Got a Like for Re: How to assign a unique ID number to each group of identical values in a column?. 10-28-2023 05:00 PM
- Got a Like for Re: How to assign a unique ID number to each group of identical values in a column?. 03-17-2022 03:19 PM
- Got a Like for Re: Is there a procedure to check whether missing data are missing completely at random or missing at random?. 09-21-2021 06:33 PM
- Got a Like for Re: Multiple conditions in one if statement. 11-28-2020 01:39 AM
- Got a Like for Re: How to assign a unique ID number to each group of identical values in a column?. 08-20-2020 01:15 PM
- Got a Like for Re: functions. 10-29-2019 08:18 AM
- Got a Like for Re: How to assign a unique ID number to each group of identical values in a column?. 08-28-2019 11:06 PM
- Got a Like for Re: How to assign a unique ID number to each group of identical values in a column?. 05-14-2019 05:44 AM
- Got a Like for Re: Filling gap in a panel data. 04-28-2019 07:48 AM
- Got a Like for Re: How to assign a unique ID number to each group of identical values in a column?. 03-01-2019 02:11 PM
- Got a Like for Re: Sum Statement. 02-14-2019 04:57 PM
- Got a Like for Re: PROC Export: Replacing sheet error. 11-22-2018 09:04 AM
- Got a Like for Re: proc glm: class vs. absorb. 06-18-2018 09:57 PM
- Got a Like for Re: SAS Miner: export train cluster results. 06-18-2018 03:02 AM
- Got a Like for Re: proc glm: class vs. absorb. 10-29-2017 10:35 PM
- Got a Like for Re: Grand total in proc report not working. 10-16-2017 04:54 PM
- Got a Like for Re: You can only BREAK on GROUPing or ORDERing variables when doing PROC REPORT. 09-18-2017 11:42 AM
- Got a Like for Re: Find Week within a Month. 09-13-2017 09:03 AM
- Got a Like for Re: How to assign a unique ID number to each group of identical values in a column?. 05-28-2017 11:56 AM
-
Posts I Liked
Subject Likes Author Latest Post 3 2 1 3 3 -
My Liked Posts
Subject Likes Posted 1 01-22-2016 05:32 AM 1 09-16-2014 10:27 AM 1 02-25-2016 01:09 PM 1 12-12-2015 09:41 AM 1 12-13-2015 07:32 PM
02-25-2016
12:56 PM
1 Like
Because the variable length is already defined by the set statment as in the original data set.
When it will be 12? if the length statment come before the set statament. So order is very important here.
And if you have practicing SAS programming you will know that if you run this programe you will get a warning.
WARNING: Length of character variable jobcode has already been set.
Use the LENGTH statement as the very first statement in the DATA STEP to declare the length of a character variable.
And not 8 for two reasons the one mentioned above plus this length is not defined any where in the data step or the original data and it is char not number. where if it is number the max length is 8.
... View more
02-25-2016
12:37 PM
1 Like
None.
To write to a file you need a DATA step with a FILE statement and a PUT statement.
So they are all wrong.
C and D are wrong for that plus that DSD and DLM are not specification parameter of the put statment but the File statments.
After that you need to be aware of the differeance between DLM and DSD and which will let you have the delimiter you specify.
Writing a SAS Dataset To a Text File
So this questions is copied wrong.
... View more
02-25-2016
11:14 AM
It is just typo... sorry
... View more
02-25-2016
11:00 AM
Try
call symput ('id', put(id,z6.));
with run_&id
... View more
02-24-2016
04:10 AM
data Dte;
input birthdate $10.;
cards;
Jan1975
1977
021978
run;
data want ;
set Dte;
format date date9.;
if length(birthdate)=4 then date=input('11JUL'!!trim(birthdate),date9.);
else if length(birthdate)=6 then date=
input(substr(birthdate,1,2)!!'JUL'!!substr(birthdate,3,4),date9.);
else if length(birthdate)=7 then date=input('11'!!trim(birthdate),date9.);
run;
... View more
02-23-2016
07:06 PM
Your code should work. It may be other thing in your full code or with the data. I suggest you open new thread and post sample data with your full code. Then we could be more helpful.
... View more
02-23-2016
06:57 PM
Are you sure that the column txn exists in table1 and table2?
Also, what you trying to do exactly?
... View more
02-23-2016
06:31 PM
data have;
input id date yymmdd10. time TIME.;
format time time.;
cards;
100020005 2015-08-27 08:36
100020005 2015-08-27 11:32
100020005 2015-08-27 14:51
100020008 2015-10-01 08:23
100020008 2015-10-01 10:56
100020008 2015-10-01 15:32
140020004 2014-12-18 13:13
140020002 2014-09-30 14:45
140020002 2014-09-30 17:20
;
run;
proc sort data=have;
by id date time;
run;
data want;
set have;
retain f;
by id date time;
if first.date then f=1;
if f=1 then point='PRE';
else if f=2 then point= '2H';
else if f=3 then point='7H';
f+1;
drop f;
run;
... View more
02-23-2016
11:49 AM
I understand all what you said. I was once working for SAS partner and yes we was forced to take the exams. I think that was good for the company profile with SAS. From my experience I advise you after carefully studying "Base Programming Prep Guide" and solve all the exercises at the end of each chapter. To spend good amount of time on the exam questions online because it will really make difference in passing the exam. I met people really understand and practiced all the topics in the exam and yet not able to pass it. And also people with years of experience in SAS and almost hardly pass the exam too. And I am sure that you figured out after solving some questions this time that it is almost the same questions you saw in the exam and even not updated from years. And sorry to say that but I met people not fully aware of the exams topics, without experience, and very hardly can write job or task in SAS. But they got > 90% in the exam, as they went through the exam dump several times and studied what the exam tricks and focus points.
Regarding it focus on reading from file or text, I cannot say this is bad thing, as this is very important in academia and research where many dataset are in this form. Even if it is not in industry. And even making practicing and testing easier and less time consuming.
But the general advice _based on myself and colleges experience_ spend time on the online previous questions or take SAS Certification Practice Exam: Base Programming for SAS 9.
What I hope in the future and as SAS expand their certifications set to improve the exams and make beta versions to the test and get people feedback and maybe experienced SAS community members could be good for that.
Regarding SAS for real world situations i think other gave you good advices and i post about that in the future too.
All the best
... View more
02-22-2016
07:55 PM
data want ;
set have;
by id;
retain ttype pflag;
if first.id then do; ttype=type; pflag=0; end;
else if (type ne ttype) and (pflag=0) then do; output; pflag=1;end;
keep id;
run;
... View more
02-22-2016
07:32 PM
3 Likes
proc sql ;
select id
from have
group by id
having count(distinct type)>1
;
quit;
... View more
02-22-2016
07:23 PM
1 Like
data test;
input yy;
sasdate=mdy(1,1,yy);
format sasdate year.;
datalines;
70
;
run;
... View more
02-22-2016
06:35 PM
You may need to
select distinct a.var1
if the value could be repeated in each column more than one time. Or you will end up by long list.
... View more
02-22-2016
12:33 PM
1 Like
data want;
set d;
if cmiss(of _all_) then delete;
run;
... View more
02-21-2016
07:22 PM
1 Like
data test;
input DOB $ ;
dt = input('01/'!!DOB,ddmmyy10.);
format dt mmyys. ;
datalines;
3/2011
;
run;
... View more