Creating an AI Assistant for SAS Viya in 5 steps (@sassoftware/viya-assistantjs) - Part I
Recent Library Articles
Recently in the SAS Community Library: SAS' @kumardeva debunks the myth that developing AI assistants is too hard. He shows you how to use the @sassoftware/viya-assistantjs library to jump start your development.
Hello SAS community! I have a dataset where each entry has a date and timestamp in "DATETIME20." format. Examples of data entry dates (there are tens of thousands in each month, going back many years): 16FEB2021:07:02:19 28MAR2023:11:52:22 06JAN2024:17:23.51 21APR2024:23:02:38 I am trying to run a proc freq where I get the count of the events by month and year. Ideally the output would look something like this: NOV23 37248 DEC23 41836 JAN24 39234 FEB24 52868 or even better NOV2023 37248 DEC2023 41836 JAN2024 39234 FEB2024 52868 My code is presently: PROC FREQ DATA=FLAGSDAT; TABLE ENTRY_DATE*FLAG_VALUE / NOPERCENT NOCUM NOROW NOCOL; RUN; The current code's output looks like this (using a dummy dataset for speed of testing where all the timestamps are at midnight): 31DEC2023:00:00:00 ‚ 9 01JAN2024:00:00:00 ‚ 11 22JAN2024:00:00:00 ‚ 13 13FEB024:00:00:00 ‚ 12 I tried using this code: PROC FREQ DATA=FLAGSDAT; TABLE ENTRY_DATE*FLAG_VALUE / NOPERCENT NOCUM NOROW NOCOL; FORMAT ENTRY_DATE MONYY.; RUN; But that did not work. Any advice for a simple fix to get the dates in the PROC FREQ output to just be MONYY or MONYYYY? For my dummy data, I would like the output to look like: DEC2023 9 JAN2024 24 FEB2024 12 Thank you in advance!
... View more
Please can someone help me. I have SAS 9 table with colonne TPS whixh specify the duration. Eg i can have in this variable modality like 30:22:00. After chargin this table in my CASLIB, for the same record this variable shows 6:22:00.
Seems like SAS ignore the 24 hours . After 24hours SAS set to null the duration.
How can i find issue to this problem ?
Thks
... View more
Hello,
I am running many SAS code in cascade and I have this error:
ERROR: You cannot open WORK.FICHIER_IBC_CORR.DATA for output access with member-level control because WORK.FICHIER_IBC_CORR.DATA is in use by you in resource environment IOM ROOT COMP ENV.
How to solve this issue.
Is it related to my SAS EG config.
... View more
Hi all,
I am trying to use SAS to append a dataset into a SQL table.
I am using this code (modified the table names). My dates are in YYDDMM10. format, numeric = type, length = 8, informat =10. and they cannot be appended because of type of mismatch. The variables in the SQL table is set to the data type = "date" and it has allow nulls checked off.
any help is appreciated!! >.<
libname Dummy odbc dsn='Dummy_data' schema=stg;
data org.procedures;
set procedures;
RunDate = today();
format RunDate date9.;
if firstobs then Obs_ID = 1;
else Obs_ID +1;
run;
*remove exisiting data from table;
data Dummy.data_Numerators;
modify Dummy.data_Numerators;
if Obs_ID not = '.0y' then
remove Dummy.data_Numerators;
run;
*append new data to table;
proc append data= org.procedures base = Dummy.data_Numerators force; run;
... View more