@Num19 wrote:
Out of the topic but why do I have in "Discipline" the data Ski instead of "Ski de fond" or "Ski acrobatique" like in the text file ?
Because you use simple list input in the respective input statement, and that means that a blank will be used as a separator.
That particular piece of code would better look like this:
data malib.jo_medailles;
infile
"C:\Users\Réda\Desktop\Organisation\Master\Maths et Finance\S1\SAS\Tables\Résultats Jeux Olympiques.txt"
firstobs=10
truncover
;
retain code_discipline discipline;
input test :$10. @;
if test = "Discipline"
then input test $ code_discipline $ discipline $char32.;
else if test ne '----------'
then do;
input
annee $ 1-12
code_pays $ 14-16
pays $ 25-48
type_medaille $ 49-63
nb_medailles 64
;
output;
end;
drop test;
run;
... View more