Hi,
I have column “Description” which contains huge characters, while am fetching the data, it shows incomplete character of this columns. How can I get all the characters.
Columns contains some of the special characters like “x(xx) % ===========================”
Pls help me. Thanks in advance.
I take it you meant "many", not "huge". "Huge" lets me think of something big made by an artisan, probably out of marble 😉
When using proc import, make sure that the guessingrows= value is sufficient so that proc import finds the longest value.
Otherwise (manually written data step), adapt the informat to accomodate the longest value, as specified by the file documentation.
Did you use proc import to transfer data in sas dataset ? What do you mean by "fetch"?
If you used a datastep to read flat file (like .txt, .csv, datalines) then add a length statement to define maximum length available.
Thanks for your reply. Am a beginner to SAS program.Am using proc sql to extract a data then using "Sent To Excel" option
Proc sql;
select description
from
inc.inc_mast;
run;
Expected result - "FAILED. ================================================================= Hostname"
Result am getting - "FAILED. ================================================================="
How to over come this.. pls help me.
@vivekarun12 wrote:
Thanks for your reply. Am a beginner to SAS program.Am using proc sql to extract a data then using "Sent To Excel" option
Proc sql;select description
from
inc.inc_mast;
run;
Expected result - "FAILED. ================================================================= Hostname"
Result am getting - "FAILED. ================================================================="
How to over come this.. pls help me.
Ar you sure that value is actually "FAILED. ================================================================= Hostname" in the data set inc.inc_mast?
If so are you looking at the result in Excel and have you tried making the column wider in Excel? Excel may be wrapping the text because the column is not wide enough.
Apologies for the late reply.. Yes am sure.. i have checked the excel cell itself.. it showing incomplete data for "Description" column.
Pls help me on this..
Use the macro provided in https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... to convert your dataset inc.inc_mast into a data step and post that here (use firstobs= and obs= to create a subset with the relevant lines, if the dataset is large)
I just created a dataset with
data test;
x1 = "FAILED. ================================================================= Hostname";
run;
and used "Send to Excel" from Enterprise Guide, and got correct data in Excel.
Windows 7 Professional SP1
Enterprise Guide 7.1
Excel 14 (MS Office Standard 2010)
SAS 9.2 on AIX
@vivekarun12 wrote:
Thanks for your reply. Am a beginner to SAS program.Am using proc sql to extract a data then using "Sent To Excel" option
Proc sql;select description
from
inc.inc_mast;
run;
Expected result - "FAILED. ================================================================= Hostname"
Result am getting - "FAILED. ================================================================="
How to over come this.. pls help me.
BTW "Send To" is a very inefficient way to communicate with Excel. The best way to get data from one application to another (IMO) is to use files in an open, textual format like csv. Our whole "from" and "to" communication with the data warehouse happens in this way.
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.