I have attached testdata.xls file.
Here is the issue, look at Obs # 1.
How can I make obs # 1 that should mimic to obs # 2 ?
Somehow file got corrupted, and contents splitted and shifted one column to the right in obs # 1 Column A (obs # 1),
Obs # 2 is correct way of representation of data.
In Obs # 1,
Salesman_name_dept should be : Michael Perry A001 Manufacturing
Sale_date should be : 10-Jan-09
Reorder should be : 50
Event should be : 10
BuySell should be : 45.45
Amount should be : 5000.75
Appreciate any help !
Issue has been resolved. Thanks to SAS communities members !
- GPatel
Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.
Use this link to create a data step that you can post as text or attach as a text file for better description of your data: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...
It also helps to provide the layout of the expected results.
You can repair your data-set by overriding 1st observation values.
Pay attention to variables type: CHAR or NUM to write the correct values as correct litterals;
data new;
set old;
if _N_ = 1 then do;
Salesman_name_dept = "Michael Perry A001 Manufacturing";
Sale_date = '10Jan09'd;
Reorder = 50;
Event = 10;
BuySell = 45.45;
Amount = 5000.75;
end;
run;
Issue has been resolved. Thanks to SAS communities members !
- GPatel
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.