I can see nothing in the image you posted other than a photo of your screen showing a dataset with nothing in it.
Well, I have manually typed in this information:
data ans2; input id present total; ratio=floor(total/present); datalines; 54734 25000 85000 55742 7000 65000 ; run;
Which works perfectly for me results in a dataset called ans2:
id present total ratio
54734 25000 85000 3
55742 7000 65000 9
Please explain what you are doing exactly, start by using the code window {i} above your post to put actual text code in rather than pictures which we then have to manually tpye in.
Yes i agree it runs well when it is few rows (I.e 10 - 30 ) i have entered more than 13000.
Then its likely that it is your data. Look at the first time you get a value you don't expect, and look at the data. Judging from the picture you posted, there are observations which don't have any data at all, maybe the import process creating a few blanks rows, or perhaps your CSV is corrupt in some way. Its something to do with the data anyways as the logic will happily apply the same to each data row.
Thanks a lot for helping me, I will find out where the error is.
Note that if your CSV came from an application like EXCEL that rows at the bottom of a file may well consist of something like this:
,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,
This is a pretty well know problem with manually edited Excel sheets. So look at your CSV file in a TEXT viewing program like Wordpad or Notepad or even the SAS editor. Go to the end of the file. See if you have such. Delete those rows if present and re-read (or import).
Similar things may happen if your header row has one or more blank lines before the actual data.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: