Recently in the SAS Community Library: Have you received a promotional email that for some reason did not render properly? Some content was missing? SAS' @BrianRowland shows you a feature in SAS Customer Intelligence 360 that is very easy to set up and use to provide alternative web viewing.
I have a basic append program that I run monthly to build a master historical dataset. It takes the previous month, writes it out as the current month and then appends current month claims to it, pretty basic and straight forward. This month however the size of the resulting data grew disproportionally to what the expected original and new claims combined should have created. /*=============================================================================
Append SEPTEMBER Adjudicated claims to CLM_DATA_ASO 10/11/2024
IATLAS.CLM_DATA_ADJD_GLX_SEP created, with 11,667,014 rows and 254 columns.
===============================================================================*/
PROC APPEND BASE = ATLAS.CLM_DATA_ASO_SEP
DATA = ATLAS.CLM_DATA_ASO_AUG; RUN;
/***************Appending ATLAS.CLM_DATA_ASO_AUG to ATLAS.CLM_DATA_ASO_SEP.
NOTE: There were 466715507 observations read from the data set ATLAS.CLM_DATA_ASO_AUG.
NOTE: The data set ATLAS.CLM_DATA_ASO_SEP has 466715507 observations and 254 variables.*/
PROC APPEND BASE = ATLAS.CLM_DATA_ASO_SEP
DATA = IATLAS.CLM_DATA_ADJD_GLX_SEP; RUN;
/***************Appending IATLAS.CLM_DATA_ADJD_GLX_SEP to ATLAS.CLM_DATA_ASO_SEP.
NOTE: There were 11667014 observations read from the data set IATLAS.CLM_DATA_ADJD_GLX_SEP.
NOTE: The data set ATLAS.CLM_DATA_ASO_SEP has 478382521 observations and 254 variables.*/ The resulting datasets looked like this: Dataset Observations File Size ATLAS.CLM_DATA_ASO_AUG 466,715,507 519 GB IATLAS.CLM_DATA_ADJD_GLX_SEP 11,667,014 14 GB ATLAS.CLM_DATA_ASO_SEP 478,382,521 1.1 T What would cause this to happen, and is there anything I should be doing in my code to prevent this? It has never happened before and I have been running this same process for over a year.
... View more
Hi experts
I'd like to convert a normal text to ascii code, for example: in my dataset I have the letter "t" and the value that i want is 116 and so on with the other letters or numbers.
do you know a way to do it? the final result that I want is a file in that format.
... View more
Hi,
I have a version 8 transport file (xptv8) and I am using the XPT2LOC autocall macro to convert the transport file into a SAS dataset. Now, previously I was calling this XPT2LOC macro inside SAS Enterprise Guide 8.3 on the SAS On Demand for Academics (ODA) server, which is running SAS 9.4 M8. This was working fine.
However, since then, I have setup my own server, also running SAS 9.4 M8 but running a slightly newer version of SAS Enterprise Guide, version 8.4 (not that it likely matters but worth mentioning). Now on this new system, the code which ran without issues on the ODA server, is still running without any issues appearing in the SAS log but the dataset being output is empty. Below is the code I am running on both systems:
options mprint mlogic symbolgen;
libname source 'C:\Users\myuser\Documents';
%* Convert the XPT file to a SAS dataset;
%xpt2loc(
libref=source,
memlist=_all_,
filespec='C:\Users\myuser\Documents\ae.xptv8');
Now, I have done some testing and looking at the logs for both the system on the ODA server and the system on my new server, and I noticed one minor detail,. Within the XPT2LOC macro there is a dataset which reads in the XPT file using an INFILE statement. This data step processes the variables, defines their length, applies labels, etc. and then it outputs the dataset. The code from my new system (see sas_log_1.txt attached), the data step ends like this
stop;
run;
But in the ODA system (see sas_log_2.txt attached) the same data step ends like this
if _n_=29 then stop;
run;
This 29 is the number of records / observations in my XPT file. Now, this line is determined by the macro variable OBS_MEM0001, which is created in the first and very large data step. In the old ODA system this macro variable revolves to 29, but in my new system it resolves to 0. I believe something is making my new system not see the number of records in my XPT file and I do not know why. Is this a bug? I have attached the xpt I am working with and the SAS logs from my new system. Any insight would be greatly appreciated.
... View more
Hi All, I am using following proc report code to generate an output. The "by" statement in proc report is causing some issue for me. I want the output split by the "by" group but in the actual output when I use the code below, I see the values for by variable appearing twice in the output. First one is from the blue highlighted syntax below which appears on the left hand side and the second is from the green highlighted syntax. The one from green highlighted syntax appear little strange where it show value like this in the output as a title. I want to get rid of it . How can I achieve it ? proc report data=final_&i nowd missing headskip split='~' style(report)=[width=100%]; by byvarn byvar ; title7 j=l "#byval(byvar)"; columns page avisitn order1 order2 linelab statistic var1-var5 ; define page / order noprint; define avisitn / order noprint; define order1 / order noprint; define order2 / order noprint; define linelab / style(column)={just=l cellwidth=16% /*cellspacing=1.0cm*/ asis=on} style(header)={just=l} group; define statistic / style(column)={just=l cellwidth=16% asis=on} style(header)={just=l} group; define var1 / style(column)={just=c cellwidth=11% asis=on} style(header)={just=c} flow group "(40 mg)~(N=&n1.)"; define var2 / style(column)={just=c cellwidth=11% asis=on} style(header)={just=c} "(80 mg)~(N=&n2.)"; define var3 / style(column)={just=c cellwidth=11% asis=on} style(header)={just=c} order "(160 mg)~(N=&n3.)"; define var4 / style(column)={just=c cellwidth=11% asis=on} style(header)={just=c} order "(320 mg)~(N=&n4.)"; define var5 / style(column)={just=c cellwidth=11% asis=on} style(header)={just=c} "Placebo~(N=&n5.)"; compute before page; line ' '; endcomp; compute after order1; line ' '; endcomp; break after page / page; run;
... View more
Hello,
we have two servers (development and production) on a Unix platform. I need to move many datasets hosted on the development server to the production server. Thereafter, we need to carry out some quality control, just to make sure that the transfered datasets are identical.
I have looked on SAS community how to do that but the paper are older than 10 years. So I wonder if someone has worked on this task recently and if he or she tell me how to make an efficient comparison.
Please note that the file transfer is done via winscp. We don't have SAS connect
... View more