Things to test.
1) Make sure you actually are using the same dataset as you ran the CONTENTS on.
2) That photograph looks like a picture of ODS output (probably HTML output). The ODS processor has a nasty habit of not displaying leading spaces. So check to make sure the variable names do not have leading spaces that you need include in the name literals. You could try printing the name values the $quote. format so that it prints quotes around the name.
Or perhaps just use the NLITERAL() function to print the name literals and then copy and paste the result into your code.
proc contents data=wine noprint out=contents; run;
data _null_;
set contents;
length nliteral $64 ;
nliteral=nliteral(name);
put nliteral;
run;
... View more