03-07-2021
LearnByMistk
Obsidian | Level 7
Member since
09-29-2014
- 40 Posts
- 7 Likes Given
- 0 Solutions
- 5 Likes Received
-
Latest posts by LearnByMistk
Subject Views Posted 920 03-07-2021 06:24 AM 1089 03-03-2021 11:43 AM 3883 12-09-2020 01:06 PM 3912 12-09-2020 12:36 PM 3927 12-09-2020 12:24 PM 3214 02-20-2020 01:42 PM 3216 02-20-2020 01:41 PM 3228 02-20-2020 01:28 PM 3265 02-20-2020 12:31 PM 3282 02-20-2020 11:47 AM -
Activity Feed for LearnByMistk
- Posted Re: update all columns of specific naming convention across monthly dataset on SAS Programming. 03-07-2021 06:24 AM
- Liked Re: update all columns of specific naming convention across monthly dataset for yabwon. 03-07-2021 06:22 AM
- Posted update all columns of specific naming convention across monthly dataset on SAS Programming. 03-03-2021 11:43 AM
- Posted Re: SAS special character in column names on SAS Programming. 12-09-2020 01:06 PM
- Posted Re: SAS special character in column names on SAS Programming. 12-09-2020 12:36 PM
- Posted SAS special character in column names on SAS Programming. 12-09-2020 12:24 PM
- Posted Re: increment month in do loop macro on SAS Programming. 02-20-2020 01:42 PM
- Posted Re: increment month in do loop macro on SAS Programming. 02-20-2020 01:41 PM
- Posted Re: increment month in do loop macro on SAS Programming. 02-20-2020 01:28 PM
- Posted Re: increment month in do loop macro on SAS Programming. 02-20-2020 12:31 PM
- Posted increment month in do loop macro on SAS Programming. 02-20-2020 11:47 AM
- Liked Re: Import CSV into SAS for Kurt_Bremser. 05-21-2019 05:33 AM
- Liked Re: Import CSV into SAS for andreas_lds. 05-21-2019 05:33 AM
- Posted Import CSV into SAS on SAS Programming. 05-21-2019 04:50 AM
- Got a Like for memsize option while running sas via batch mode. 01-19-2018 03:24 AM
- Posted memsize option while running sas via batch mode on Administration and Deployment. 01-18-2018 11:29 PM
- Posted Re: datatype teradata to sas on SAS Programming. 03-06-2017 05:54 AM
- Posted datatype teradata to sas on SAS Programming. 02-28-2017 04:49 AM
- Got a Like for Re: Help SAS date code to distinguish dates and blanks. 01-24-2017 10:00 AM
- Posted Char to int var on SAS Programming. 07-25-2016 01:31 PM
-
Posts I Liked
Subject Likes Author Latest Post 1 1 1 1 1 -
My Liked Posts
Subject Likes Posted 1 01-18-2018 11:29 PM 1 09-29-2014 02:05 PM 3 11-06-2014 02:43 PM
03-07-2021
06:24 AM
as always community is very much responsive and helpful . Thanks all for their valuable time and response
... View more
03-03-2021
11:43 AM
I' m having history score files which are monthly timestamp each having somewhere 20M records and 300 features( columns) . there are 200+ such scores files in which I have update same column as null . for example:
Scorefile_20200101,Scorefile_20200201...Scorefile_20201201 etc
Scorefile_202001 contains: (* id is unique)
id | var1 | var2 | var3 | var4 |..var300
1 |1 | 2.2 | 0.5 | 0.5 .....1.23
...
1000 |21 | 0.2 | 0.6 | 0.15 .....0.23
Now I want to update these vars with null value
code currently using sashelp.vcolumn to pull dataset name and column name
proc sql;
update &scorewidefile;
set &var;
run;
This query takes around 6 min per iteration as files are big with 20Million records and 300 columns.
Any alternate approach to expedite the process will be good to have.
Thanks in advance
... View more
12-09-2020
01:06 PM
options VALIDVARNAME=V7 ; data a; 29 rename AGE_85_+_PCT=age_85_plus; ERROR: Missing numeric suffix on a numbered variable list (AGE_85_-_PCT). ERROR: Old and new variable name specifications for RENAME must be of the same type. Statement is ignored. ERROR 22-322: Syntax error, expecting one of the following: -, :, =. ERROR 200-322: The symbol is not recognized and will be ignored.
... View more
12-09-2020
12:24 PM
I have column name as age_10+, how would I rename that var in sas as it's already been imported via teradata connection. Any help is really appreciated .
... View more
02-20-2020
01:41 PM
thanks I tired to defined month_6 again with in the macro and now it's running.
... View more
02-20-2020
01:28 PM
options mprint mlogic symbolgen; %macro month_date_ftch; %local month_num basemonth month; proc sql stimer ; %let basemonth=%sysfunc(inputn(&Month_6.,yymmn6.)); %do month_num =0 %to 5; %let month= %sysfunc(intnx(month,&basemonth,&month_num-1),yymmn6.); %put &month.; create table perm.mytab_&month. as select a.sbscr_nbr,a.yyyymm,a.qoe_global_score from pd.QOE_SUMRY_&month. a ,perm.el_a_exl_sub_&yyyymm. b where b.sbscr_nbr=a.sbscr_nbr; %end; quit; %MEND month_date_ftch; %month_date_ftch;
SYMBOLGEN: Macro variable MONTH_6 resolves to 77798 MLOGIC(MONTH_DATE_FTCH): %DO loop beginning; index variable MONTH_NUM; start value is 0; stop value is 5; by value is 1. MLOGIC(MONTH_DATE_FTCH): %LET (variable name is MONTH) SYMBOLGEN: Macro variable BASEMONTH resolves to 2125558 SYMBOLGEN: Macro variable MONTH_NUM resolves to 0 MLOGIC(MONTH_DATE_FTCH): %PUT &month. SYMBOLGEN: Macro variable MONTH resolves to 777907 777907 SYMBOLGEN: Macro variable MONTH resolves to 777907 SYMBOLGEN: Macro variable MONTH resolves to 777907 SYMBOLGEN: Macro variable YYYYMM resolves to 202001 MPRINT(MONTH_DATE_FTCH): create table perm.mytab_777907 as select a.sbscr_nbr,a.yyyymm,a.qoe_global_score from pd.QOE_SBSCR_SUMMARY_777907 a ,perm.el_a_exl_sub_202001 b where b.sbscr_nbr=a.sbscr_nbr; ERROR: File PD.QOE_SUMRY_777907.DATA does not exist.
why the highlightd part isnot converting as yymmn6. format is it coz &month_6. is a char field being a macro variable
... View more
02-20-2020
12:31 PM
do i= 0 to 5 ;
so intnx should work as increment month_1 +0 ie same month
increment month_1 +1 ie next month ie 201908
increment month_1 +2 ie next month ie 201909 and so on
so it will increment like
Month_1
201907
Month_2
201908
Month_3
201909
Month_4
201910
Month_5
201911
Month_6
201912
Month_7
202001
... View more
02-20-2020
11:47 AM
I'm facing this weird issue
I would like to use the yearmonth timestamp as table name to my database table but it's getting error out :
%macro increment_yymm;
proc sql;
% do i= 0 %to 5 ;
%let new_mnt = %sysfunc(intnx(month,%sysfunc(%input(&Month_1.,$6.),i,b);
create table mylib.table_&new_mnt. as
select * from table1_&new_mnt. ;
%end;
quit;
%mend;
%increment_yymm;
Error:1Macro keyword input appears as text
A dummy macro will be compiled.
Approach 2
%macro increment_yymm;
proc sql;
% do i= 0 %to 5 ;
%let new_mnt = %sysfunc(intnx(month,%sysfunc(input(&Month_1.,$6.),i,b);
create table mylib.table_&new_mnt. as
select * from table1_&new_mnt. ;
%end;
quit;
%mend;
%increment_yymm;
Error: the input function referenced in %sysfunc is not found
Error: %sysevalf function has no expression to evaluate
Error: Argument 2 to function intnx referenced by %sysfunc is not a number
... View more
05-21-2019
04:50 AM
How to check tab delimited file metadata before importing in sas via proc import ,I mean suppose I write a proc import with columns a,b,c with their informat and format in place but in second data refresh if I get a new column D ,how to check it before proc import fails.
... View more
01-18-2018
11:29 PM
1 Like
Hi All,
I'm stuck with a doubt, can we pass memsize while running our SAS job on the grid as a batch script ie nohup abc.sas -memsize 20G &
I found one link which states how could I set memsize on EG for the different set of user (http://support.sas.com/documentation/cdl/en/gridref/67371/HTML/default/viewer.htm#n1inymfs0b7go2n147xdknz0ygpx.htm), but not sure how to apply it while running as a batch script.
Thanks for the help in advance.
... View more
03-06-2017
05:54 AM
Hi ,
Thanks for infoo ,I have read that post but my issue still remains the same
column datatype in teradata is timestamp(0) and when i tried to cull data from TD to sas via pass through sql as
proc sql;
connect to teradata (user=&user password=&pwd mode=teradata);
create table mysas.data1 as
select * from connection to teradata(
/**********approaches i used so far****/
select employee_id , registration_date format =timestamp19.); fail
select employee_id , cast(registration_date as mm-dd-yyyy hh:mm:ss.); fail
disconnect to teradata;
quit;
could you help me how to get this thing into SAS
... View more
02-28-2017
04:49 AM
how to convert teradata timestamp while culling data in to sas using proc sql:
condition
suppose in TD we have table T1
columns id number (20,0)
dt timestamp(0)
while culling this data in sas as
proc sql;
create table mylib.t1 as
select id,dt from td.T1;quit;
error:Datatype not supported by this engine
have used below step also but it's not working
proc sql;
create table mylib.t1 as
select id
,dt format =datetime21. from td.T1;quit;
... View more
07-25-2016
01:31 PM
I was using proc sql case when statement on sas EG and similar code using sas access to teradata to convert char to int.
logic run on sas eg which give error as 2nd when conditon has different data type variable
so what i have
when var_cd equal '0' then 0
when var_cd equal ' ' then null
else (10- input(var_Cd,8.) end as my_var_val
Logic which worked in Teradata sas access
,cast(
case
when var_Cd is null then null
when var_Cd = '0' then null
else 10 - cast(var_Cd as byteint)
end as byteint) as var_Cd
Could anyone please elaborate how this thing process via SAS access but not in sas EG where i used simple
libname td teradata(user=&user pwd=&pwd schema=my_Schema );
... View more