10-09-2018
ankitk321
Fluorite | Level 6
Member since
08-03-2018
- 15 Posts
- 2 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by ankitk321
Subject Views Posted 2067 10-09-2018 03:43 AM 2097 10-08-2018 08:20 AM 805 10-02-2018 01:22 AM 1971 09-11-2018 08:43 AM 1981 09-11-2018 08:26 AM 1993 09-11-2018 08:03 AM 2003 09-11-2018 07:56 AM 10422 09-05-2018 06:21 AM 846 08-30-2018 11:34 AM 2364 08-06-2018 04:00 AM -
Activity Feed for ankitk321
- Posted Re: zip SAS dataset in sas studio on SAS Programming. 10-09-2018 03:43 AM
- Posted zip SAS dataset in sas studio on SAS Programming. 10-08-2018 08:20 AM
- Posted _Error_ in Proc copy on SAS Programming. 10-02-2018 01:22 AM
- Posted Re: Please help me to resolve below code on SAS Programming. 09-11-2018 08:43 AM
- Posted Re: Please help me to resolve below code on SAS Programming. 09-11-2018 08:26 AM
- Posted Re: Please help me to resolve below code on SAS Programming. 09-11-2018 08:03 AM
- Posted Please help me to resolve below code on SAS Programming. 09-11-2018 07:56 AM
- Posted Want to quote the string in macro variable on SAS Programming. 09-05-2018 06:21 AM
- Posted Kindly help to resolve this code on SAS Programming. 08-30-2018 11:34 AM
- Liked Re: Odd use of %STR() at execution time_new for mkeintz. 08-07-2018 02:26 AM
- Posted Re: Kindly Help to resolve code on SAS Programming. 08-06-2018 04:00 AM
- Posted Re: Odd use of %STR() at execution time_new on SAS Programming. 08-06-2018 03:59 AM
- Liked Re: Odd use of %STR() at execution time_new for Tom. 08-06-2018 03:59 AM
- Posted Re: Kindly Help to resolve code on SAS Programming. 08-04-2018 12:52 AM
- Posted Re: Kindly Help to resolve code on SAS Programming. 08-03-2018 11:03 AM
- Posted Odd use of %STR() at execution time_new on SAS Programming. 08-03-2018 10:57 AM
- Posted Kindly Help to resolve code on SAS Programming. 08-03-2018 08:14 AM
-
Posts I Liked
Subject Likes Author Latest Post 1 2
10-09-2018
03:43 AM
Hi, Thanks for the information you have shared.By using the 1st link we can make zip file only for one CSV. But I want to create zip file for more than 50 SAS dataset number can increase. If you can suggest an alternative or share any other code it will be a great help. Regards Ankit
... View more
10-08-2018
08:20 AM
Hi All, I want to create a Zip file using a sas code and want to move all the dataset available in a particular location or library into a zip file and then delete all the dataset outside the zipfile using SAS studio. If any one have any code for the same kindly help me. We are running the code on Linux server(If this information help). It will be a great help. Regards Ankit
... View more
10-02-2018
01:22 AM
Hi All, I want some alternative for _Error_ in proc copy. I want to copy all dataset from one library to another library and while doing so,if any error occurred I want to use the do and if condition to control the code. For example-: Proc copy in=libname1 out=libname2; if_error_=1 then do; %message(call a macro); %put(" THere is a error while copying"); end; run; I know _error_ will work with dataset. But not sure either it will work with procedure or not.If anyone can suggest me the alternative for the same it will be a great help. Thanks Ankit
... View more
09-11-2018
08:43 AM
My bet, Thanks you are right its working. Thaks a ton for your help
... View more
09-11-2018
08:03 AM
63 %let DATA_PULL_TYPE=NA/Dummy; 64 65 %macro datapultyp_chng; 66 %let DATAPULLTYPES= %sysfunc(compress("&DATA_PULL_TYPE"," ")); 67 %If %Upcase(&DATAPULLTYPES.) = BLINDED %then %do; 68 %let DataPullType= 'Real(BlindBreak)'; 69 %end; 70 %else %If %Upcase(&DATAPULLTYPES.) = UNBLINDED %then %do; 71 %let DataPullType= 'Real(Unblinded)'; 72 %end; 73 %else %If %nrstr(%Upcase(&DATAPULLTYPES.)) = NADUMMY %then %do; 74 %let DataPullType= 'NA/Dummy'; 75 %end; 76 %put &DataPullType; 77 %mend datapultyp_chng; 78 %datapultyp_chng; MLOGIC(DATAPULTYP_CHNG): Beginning execution. MLOGIC(DATAPULTYP_CHNG): %LET (variable name is DATAPULLTYPES) SYMBOLGEN: Macro variable DATA_PULL_TYPE resolves to NA/Dummy SYMBOLGEN: Macro variable DATAPULLTYPES resolves to NA/Dummy ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: %Upcase(&DATAPULLTYPES.) = BLINDED ERROR: The macro DATAPULTYP_CHNG will stop executing. MLOGIC(DATAPULTYP_CHNG): Ending execution. 79 80 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; SYMBOLGEN: Macro variable GRAPHTERM resolves to GOPTIONS NOACCESSIBLE;
... View more
09-11-2018
07:56 AM
%let DATA_PULL_TYPE=NA/Dummy %macro datapultyp_chng; %let DATAPULLTYPES= %sysfunc(compress("&DATA_PULL_TYPE"," ")); %If %Upcase(&DATAPULLTYPES.) = BLINDED %then %do; %let DataPullType= 'Real(BlindBreak)'; %end; %else %If %Upcase(&DATAPULLTYPES.) = UNBLINDED %then %do; %let DataPullType= 'Real(Unblinded)'; %end; %else %If %nrstr(%Upcase(&DATAPULLTYPES.)) = NADUMMY %then %do; %let DataPullType= 'NA/Dummy'; %end; %put &DataPullType; %mend datapultyp_chng; %datapultyp_chng; *I am geeting error in resolving the above mentioned code;
... View more
09-05-2018
06:21 AM
%let name=AE,DM,ED,KK,OO,GG; * there could be n number of comma seprated values; *result required; String='AE','DM','ED','KK','OO','GG' Note-we have to take care that name can have min one value or max 100 comma separated values. If anyone have any resolution.Kindly help me on the same. Regards Ankit
... View more
08-30-2018
11:34 AM
%if (%upcase(%trim("&Include_Exclude")) NE "INCLUDE") OR (%upcase(%trim("&Include_Exclude")) NE "EXCLUDE") OR (%upcase(%trim("&Include_Exclude")) NE "ALL DATASETS") %then %do; %message(Fatel Error:Values in Include/Exclude Dataset is not correct^20); %goto exit; %end; value of Include_Exclude macro variable is "Include". I want if value is not equal to INCLUDE then exit macro. but it is not getting resolved and not giving correct result I have tried following-: 1.Removing quotes from the macro variable and the value. for example --> (%upcase(%trim(&Include_Exclude)) NE INCLUDE) 2. I have tried removing trim But still not able to get the desired result. Kindly help me to solve the same.
... View more
08-06-2018
04:00 AM
I got the solution for the same......I thanks everyone of you for your support and guidance.
... View more
08-04-2018
12:52 AM
These are the dataset name and key , I am getting from Oracle and it was written in such a way in a coloumn in Oracle table. I have to fetch them from SQL and then break them in dataset and key. I can not do any change in Oracle. I have to do changes in SQL only. I don't know how should I append it.i want them as macro variable and need to pass them further in next piece of code. Looking forward for your help. Regards Ankit
... View more
08-03-2018
11:03 AM
Thanks for the help it was really usefull....but i have one small issue in this, I am unable to use --> %let string=%nrstr(a,123;b,321;c,456;d,789;e,888); the above line as it is coming from other call symput variable which i am getting from a dataset. So how will I apply %nrstr there.
... View more
08-03-2018
10:57 AM
After removing the %str from the below code it will not work and my values is coming from a call symput macro variable.Kindly help me how to resolve the same. I want to use it as ----> %let string=a,123;b,321;c,456;d,789;e,888; %global string; %let string=%str(a,123;b,321;c,456;d,789;e,888); %put "&string."; options mprint mlogic symbolgen; %macro test; %let word_cnt = %eval(%sysfunc(countc("&string.",';'))+1);/* Problem in this line */ %let count= &word_cnt; %put &word_cnt.; */ %do i = 1 %to &word_cnt.; %let var&i=%sysfunc(trim(%qscan(&string.,&i,%str(';')))); /* Problem in this line...rest every thing is fine */ %put &&var&i; %end; %do j=1 %to 5; %let dataset_key&j= %scan(%quote(&&var&j),1,%str(",")); %let dataset_Name&j= %scan(%quote(&&var&j),2,%str(",")); %put &&dataset_key&j; %put &&dataset_Name&j; %end; % put &string; %mend test; %test;
... View more
08-03-2018
08:14 AM
%global string; %let string=%nrstr(a,123;b,321;c,456;d,789;e,888); %put "&string."; options mprint mlogic symbolgen; %macro test; %let word_cnt = %eval(%sysfunc(countc(%nrbquote("&string."),%str(';')))+1);;/* Problem in this line */ %let count=%eval(word_cnt); %put &word_cnt.; %do i = 1 %to &word_cnt.; %let var&i=%trim(%qscan(%superq("&string."),&i,%str(';' ))); /* Problem in this line...rest every thing is fine */ %put &&var&i; %end; %do j=1 %to &word_cnt.; %let dataset_key&j= %scan(%quote(&&var&j),1,%str(',')); %let dataset_Name&j= %scan(%quote(&&var&j),2,%str(',')); %put &&dataset_key&j; %put &&dataset_Name&j; %end; % put &string;*/; %mend test;
... View more