Hi everyone,
I need help with SAS Event Stream Processing studio programming. Not sure if I select the right location for question.
Maybe I will have two or three questions, but also, maybe after this one everything will be more clear for me.
I need to create some trigger for first call of user in a day. I have phone number, id, call start time, call end time, etc. I have CDRs files (csv format) coming every 3 minutes into Data Source window in ESP.
Was thinking about creating a new, empty table to store USER ID right after some USER appears in CDRs and for each record checking if it's already stored (triggered) or not.
All data in that table need to be deleted in 11:59 PM.
Not sure where to started or which windows to use. Is it possible to create that through Compute or Procedural windows and if someone has any example would be really helpful.
I hope I didn't break any rules of posting a questions in community, if I do, I will edit.
Any kind of help is welcomed.
Thanks in advance.
This
I have phone number, id, call start time, call end time, etc. I have CDRs files (csv format) coming every 3 minutes into Data Source window in ESP.
Was thinking about creating a new, empty table to store USER ID right after some USER appears in CDRs and for each record checking if it's already stored (triggered) or not.
All data in that table need to be deleted in 11:59 PM.
is not enough information.
Please provide example input data and expected output.
@LinusH Yes, you are right, not sure how can I provide a input/output data/
There is only columns with names I provided, that's all.
Now I have a more specific question. I have started something on my own and found another approach, but there is a problem with getting the current time. With function today() I can get current datetime, but there is no example to extract hour and minutes from that.
I have tried everything I run into it but nothing really works. Expression language, Data Flux is used in Compute window in ESP.
Here is the documentation, but all examples are about date (year, month, day) not even one is about time.
https://support.sas.com/documentation/onlinedoc/dfdmstudio/2.3/dfU_ELRG.pdf
Are you in SAS ESP?
Thanks,
No, I'm not.
According to that documentation, you can use the formatdate function, and chose a time format.
Even if there is no example for time, I would guess that you use the parameters you want, and format accordingely (similar to the date examples). I would try "HH:MM" for instance if you want to extract that part.
Can you show what you have tried, and result/how it's not working?
I have tried with:
Time_flag = today()
formatdate('Time_flag',"hh:mm")
formatdate('Time_flag',"mm")
formatdate(today()',"mm")
formatdate('Time_flag',"hh")
But I got empty cells. Only Time_flag = today() works as expected.
And it's not that simple that you need to supply upper case literals...?
Actually, here is docs:
Details
Ah, sorry.
if you are following the documentation thoroughly, try open a ticket to SAS tech support.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.