Hi everyone, When I set BULK LOAD option as active, SCD2 transformation create the following code (for ETLS_CLOSE as example): proc append base = EXT_VI."W6B3BTSM"n
(
BULKLOAD=YES
)
data = work."ETLS_CLOSE"n force;
run; But this code doesn't work. I need to set "bl_psql_path='/PATH' " and "bl_delete_datafile=no" dataset option to BULKLOAD works properly. I aware that I can change the automatic generated code to add these options. Is there a way to configure these options at the transformation level? Or a way that I can add these options without change the code manually? Thanks in advance.
... View more
Hi,
I want to put hour and minute of the time 20 second before current time into macro variable.
The code below might convey my idea better.
Can you please help?
Thanks,
HHC
%let now=%sysfunc(time() MINUS 20 SECOND);
%let hh=%sysfunc(hour(&now),z2.);
%let mm=%sysfunc(minute(&now),z2.);
%put &hh &mm;
... View more
I am trying to resolve the condition of the macro in my code. I have the two conditions where I want to output the error in log based on the input macro variable 'fld' . If it starts with numeric then it have to put one condition otherwise it need to put another error in log ( most of my names with 'SC' if its not numeric
In my example fld= 101-281 then I am expecting to print 'ERROR: 101281 starts with Numeric", My second one is mostly my name starts with 'SC' how can I control the second condition using the ':' colon in the % if condition to print 'ERROR:&dsn ( numeric values of the 'fld' name) starts with alpha character SC"
I am able to use ':' in dataset condition but not sure how to use it the macro, instead of writing every name in the 'If' Condtion.
Thank you for your inputs.
%macro check (fld=);
*%global output dsn;
%let output = %sysfunc(compress(&fld, "-"));
%if &output ^=: SC %then %do;
%let dsn= %substr(&output.,1,6);
data _281;
putlog "ERROR: &dsn starts with Numeric";
run;
%end;
%else %if &output = :SC %then %do;
%let dsn= %substr(&output.,3,6);
data _109;
putlog "ERROR:&dsn starts with alpha character SC";
run;
%end;
%put &output &dsn;
%mend;
%check (fld= 101-281);
%check (fld= 121-281);
%check (fld= SC100426);
%check (fld= SC100843);
%check (fld= SC102126);
%check (fld= SC105143);
... View more
Hi All, I am new to sas and I was trying to achieve such thing: here is the dataset: PERMNO EVTDATE first_event inter_event 10001 8/1/11 1 0 10001 4/2/12 0 1 10002 7/6/98 1 0 10002 10/27/98 0 1 10011 11/13/95 1 0 10011 5/28/96 0 1 10011 5/29/96 0 1 10016 12/9/99 1 0 10016 5/3/00 0 1 10020 4/6/87 1 0 10020 10/21/87 0 1 10020 12/11/87 0 1 10020 4/17/90 1 0 10020 4/24/90 0 1 10028 8/17/99 1 0 10028 3/3/00 0 1 10028 7/14/06 1 0 10028 5/10/07 0 1 I would like to create another column call program and the column will state as: PERMNO EVTDATE first_event inter_event define a program, and numbers of event in the group 10001 8/1/11 1 0 2 10001 4/2/12 0 1 2 10002 7/6/98 1 0 2 10002 10/27/98 0 1 2 10011 11/13/95 1 0 3 10011 5/28/96 0 1 3 10011 5/29/96 0 1 3 10016 12/9/99 1 0 2 10016 5/3/00 0 1 2 10020 4/6/87 1 0 3 10020 10/21/87 0 1 3 10020 12/11/87 0 1 3 10020 4/17/90 1 0 2 10020 4/24/90 0 1 2 10028 8/17/99 1 0 2 10028 3/3/00 0 1 2 10028 7/14/06 1 0 2 10028 5/10/07 0 1 2 let say for permno 10001, there are two obs and they form a program and the program has two event in a row, so it will be definded as 2 for each of the two obs. Thank you so much for your help! Appreciated, Zhongda
... View more
Hi Everyone, I need one help related to SAS automated email which send email to every other individuals.
Task is : There is 6 unique segments of videos link and its description which need to be send to customers.
suppose AAA customer is receiving 1 videos link and 1 video description and others can receive 2 or more videos link with its description for every customers.
Others customers can not see others email, it has to be send to every individual or row wise.
For example;
Link Desc: Collection Stratigies
Link: https://www.youtube.com/watch?v=6TK20Y5oD9s
need help to write sas code which can send email to this customers dynamically.
first_name
EMAIL_ADDRESS
Video_segment1
Video_segment2
Video_segment3
Video_segment4
Video_segment5
Video_segment6
AAA
AAA@COM
Yes
BBB
BBB@COM
Yes
yes
CCC
CCC@COM
Yes
yes
yes
DDD
DDD@COM
Yes
EEE
EEE@COM
Yes
yes
FFF
FFF@COM
Yes
Yes
Yes
Yes
Yes
Yes
GGG
GGG@COM
Yes
... View more