Search the current directory tree for .log files containing the string "The SAS System" on the first line
find . -name '*.log'  -type f  -readable  ! -size 0 -exec sed -n '1{/The SAS System/q0};q1' {} \; -print