Question-66: Using CONTENTS proc, which variable you can use to list all the files in a SAS library?
Answer: We can use <libref>._ALL_ to list all the files in a library which is represented by libref.
Question-67: What is the use of NODS in the CONTENTS proc?
Answer: Using the NODS you can suppress the detailed information about each file when you use <libref>._ALL_
Question-68: How does DATASETS proc is different than CONTENTS proc?
Answer: Yes, this is true you can use DATASETS proc as well to view the contents of the SAS library or a SAS Data sets. But DATASETS proc has additional data management capabilities like copying, deleting and modifying SAS files. And to end the DATASETS proc you would be using QUIT statement.
Question-69: What is the use of VARNUM variable in the CONTENTS or DATASETS proc?
Answer: If you see by default CONTENTS proc print all variable information in the alphabetical order but if you want to print them in their creation order or logical position then you have to use VARNUM option in the CONTENTS proc. For instance, you can as below
proc datasets;
contents data=he_sas.le_learner varnum;
Question-70: What is the difference between libref and fileref?
Answer: We use the fileref to temporary point to the external file location while libref reference to the SAS data set. Similarly, libref is created using the LIBNAME while fileref is created using FILENAME statement.