Customizing a Workflow in SAS Solution for IFRS 17
Recent Library Articles
Recently in the SAS Community Library: SAS' @sunilbhardwaj details steps to add a customized Excel based workflow template to the SAS solution for IFRS 17. These steps enable you to try out and test several customized workflows based on your requirements.
Hi all, I have a test data with missing values and I want to fill the table by taking previous month's value. Test data ID response date 1 CR 02Jan2020 2 PR . 3 NE 04Jan2020 4 SD . 5 PR 05Jan2020 6 CR . data I want to have ID response date 1 CR 02Jan2020 2 PR 02Jan2020 3 NE 04Jan2020 4 SD 02Jan2020 5 PR 05Jan2020 6 CR 05Jan2020 So, if the response NE, then I don't want to retain the NE date but the date before NE. But if the response is not NE, then I wanna retain the previous date. I tried multiple ways, but couldn't figure it out. Please help.
... View more
I am using proc template to generate this kind of graph. What is the option available to auto move the text inside the bars so that it wont collide with error bar graph line. Thank you.
... View more
Hi all, SAS amateur here! I am trying to figure out how to create 2 new variables and assign values to each observation based on the data contained in a reference file. I have created a mock example below. The first dataset is the main one I need to keep. It contains data on individual stores and several stores will have the same corporate ID. The second dataset is a reference that contains approximately 500 Corporate IDs and addresses, including the State and City. I would like to create 2 new variables for CorpState and CorpCity in Dataset 1 based on the CorpID contained in both files. Is this even possible to do and where do I start? Any help would be greatly appreciated. Dataset 1 (Have): Main dataset with individual store information Obs# CorpID StoreID StoreState 1 4002 40021234 AL 2 4002 40021237 MS 3 4003 40035678 TN 4 4100 41007890 WV 5 4110 41103456 NC 6 4110 41103478 NC 7 4597 45972345 WA 8 4975 49750023 WY Dataset 2 (Have): Reference dataset with corporate information Obs# CorpID CorpState CorpCity 1 4002 AL Birmingham 2 4003 GA Atlanta 3 4004 TN Nashville 4 4100 SC Charleston 5 4110 NC Charlotte 6 4111 FL Tampa 7 4597 CA San Francisco 8 4975 WY Jackson Want: Dataset 1 file containing store and corporate information Obs# CorpID CorpState CorpCity StoreID StoreState 1 4002 AL Birmingham 40021234 AL 2 4002 AL Birmingham 40021237 MS 3 4003 GA Atlanta 40035678 TN 4 4100 SC Charleston 41007890 WV 5 4110 NC Charlotte 41103456 NC 6 4110 NC Charlotte 41103478 NC 7 4597 CA San Francisco 45972345 WA 8 4975 WY Jackson 49750023 WY
... View more
I have the following data, How I can create the multiple records based on the horizontal data , depening on the time variables. thank you for your help.
Assumptions:
1. if all four time vairables avaialble then need two records with startdate time and stopdate time depending the on the time
Example first and second rows. only difference between first and second row is column D and E have same time
2. when "restarttime" missing consider the "intermediatestopTime as "restarttime"( and vice versa) and create two records.
3. when "intermediatestoptime" and "restartime" missing then create one record for "stopdatetime" and "startdatetime".
data have;
format date date9. starttime time8. intermediatestoptime time8. restarttime time8. finalstoptime time8.;
do i = 1 to 4;
usubjid = "00-01";
date = '01OCT2024'd;
/* Generate different times for each record */
starttime = '12:20:00't + (i-1)*600; /* Increment start time by 10 minutes each iteration */
intermediatestoptime = starttime + 600; /* Intermediate stop time is 10 minutes after start time */
restarttime = intermediatestoptime + 600; /* Restart time is 10 minutes after intermediate stop time */
finalstoptime = restarttime + 600; /* Final stop time is 10 minutes after restart time */
output;
end;
drop i;
run;
data have1;
set have;
if _n_ =2 then restarttime = '12:40:00't;
if _n_ =3 then restarttime = '';
if _n_ =4 then do; restarttime = '';intermediatestoptime='';end;
run;
... View more
Hi, here is a random dataset I created data testdata;
length banana 8 fruit 8;
do year = 2014 to 2023;
date = input(cats(put(year, 4.), '1231'), yymmdd8.);
do i = 1 to 25;
customer = cats('Customer', (year - 2014) * 25 + i);
banana = round(ranuni(0) * 100, 0.01);
fruit = ceil(ranuni(0) * 2) - 1;
output;
if i <= 10 then do;
customer = cats('Customer', (year - 2014) * 25 + i);
banana = round(ranuni(0) * 100, 0.01);
fruit = ceil(ranuni(0) * 2) - 1;
output;
end;
end;
end;
format date yymmddn8.;
drop i year;
run; But how can I add a column (or a row) that confirms that all the columns are like numeric or char.. For example the column 'fruit' there 1=yes, 0=no, but lets say that there is a bug in the inserting and someone had write "yes" as a string/char, then I want a column/row that says: "not correct" if there is a string there, or "correct" if there is only 1 and 0. And I want to do it for every column in my dataset. Recall that this above is just my fiction data, my data have other columns, so I think I prefer to insert the columns manually and not just like for every coloumn-counting-loop thing 🙂 beacuse the colomns differ for each model. Thanks,
... View more