Recently in the SAS Community Library: SAS' @StuartRogers provides a close look at the new Microsoft Entra Gallery application and details how it can be used.
Hi, I would like to ask for your help regarding the issue on subject. I already tried the solution provided in the https://communities.sas.com/t5/SAS-Programming/Read-in-raw-pipe-enclosed-data-separated-by-commas-SAS-9-4/td-p/552481 solved by @Tom but the records exceeding the 257 length are truncated causing for misaligned imported records. I've tried changing the lrecl value from 1 to 32767 and the char1 to char32767 but it still doesn't solved the issue with truncation. Another issue with the raw data is that the empty records are not pipe enclosed. Hope that someone can help me with this. Thanks and advance!
... View more
Hi - First post here and fairly new to SAS. I have found a lot of help on this board and hoping I can get some on this issue. I feel like I should be using first./last. by looking at other examples but my calculations aren't coming out correctly (or at all) I have a transaction file with the payment_amt and adjustment_amt in two different fields. I am using a data step to combine these all into one column as I feel that would be easier to do the calculation. I am also given an EOD balance that I can compare to the balance currently in our system. Obviously, doing these calculation per line cause a large number of "balance exceptions" How can I calculate the total adjustment & payment amount if there are multiple transactions for an account on different lines? This is the dataset that I'm trying to do the calculations on (imported from a csv) - "newtrans_amt" is the amount I've combined PAYMENT_AMT and ADJUSTMENT_AMT into data combinekeys; set re_pay; PAYMENT_AMT = tranwrd(PAYMENT_AMT, ",", ""); ADJUSTMENT_AMT = tranwrd(ADJUSTMENT_AMT, ",", ""); EOD_BALANCE = tranwrd(EOD_BALANCE, ",", ""); PAYMENT_AMT = compress(PAYMENT_AMT); ADJUSTMENT_AMT = compress(ADJUSTMENT_AMT); EOD_BALANCE = compress(EOD_BALANCE); format newkey $10.; if ADJUSTMENT_KEY ne "" then newkey = ADJUSTMENT_KEY; IF PAYMENT_KEY ne "" then newkey = PAYMENT_KEY; if ADJUSTMENT_AMT ne "" then newtrans_amt = ADJUSTMENT_AMT; if PAYMENT_AMT ne "" then newtrans_amt = PAYMENT_AMT*-1; run; proc sort data=combinekeys; by CONSUMERNO; run; From this point I'm kind of lost on how to: -total the total transaction amount using "newtrans_amt" by CONSUMERNO -If I can get a valid amount on in newtrans_amt, I should be able to take care of comparing that amount with what our system balance will be. to match with EOD_BALANCE. Any help is greatly appreciated.
... View more
I want to create a master detail subdetail report within SAS BASE (proc report).
You woud have a master row with colums. The master has detail rows with different columns and detail row also subdetail rows with comments.
I don't want all the columns master,detail, subdetail on one row and master, detail, subdetail should be on the same page.
The result will be converted to pdf.
The output would look something like the below example:
Procesname Start date end date Detail info
-----------------------------------------------------------------------------------------
Walking 01-01-2024 10-04-2024 I walk very slow
Subproces start date end data Start place end place
-----------------------------------------------------------------------------------------------------
Part 1 01-1-2024 10-01-2024 New York Amsterdam
Comments
--------------------------------------------------------------------------------------------
I started very well
The walk was nice
Subproces start date end data Start place end place
-----------------------------------------------------------------------------------------------------
Part 2 10-1-2024 24-01-2024 Amsterdam Berlin
Comments
--------------------------------------------------------------------------------------------
Was perfect
swimming 10-06-2024 10-07-2024 I love swimming
detail
subdetail
... View more
Hello! I have a question. Soon I will work with some data that are located on a shared fold in the google drive. This dataset is a STATA dataset. How can I import a STATA dataset that is located in google drive? Thank you very much for your help!
... View more
data have;
input Name $ Gender $ City $12.;
datalines;
Srilakshmi Female Hyderabad
Vamika Female Bangalore
Prajwal Male Mumbai
;
run;
data want;
set have;
City = substr(City, 1, 1);
Gender = substr(Gender, 1, 1);
Name = substr(scan(Name, 1), 1, 1);
drop Name Gender City;
left_to_right=catx(' ',name,gender,city);
right_to_left=catx(' ',city,gender,name);
run;
Hi Guys ,
Here i want to extract first letter from each variable left to right and right to left
is it correct way or any other method to achieve could you please give solution
... View more