I'd suggest you look for this documentation topic: STATEMENTS: Output Statement which explains (in short) that the OUTPUT statement: "Writes the current observation to a SAS data set." The doc has a lengthy explanation and at least 4 examples of using the OUTPUT statement.
If the OUTPUT statement is placed inside an IF statement, then the OUTPUT statement will be executed conditionally (and, thus, write observations conditionally). Depending on how many OUTPUT statements you have inside IF statements in the whole program, you might see a different number of observations coming OUT of the DATA step program than the number of observations that are being read INTO your program.
The If statement take the STAFFID1 variable values is blank values and in the output it will creates the two variables are CNTL and STAFF , and the values of the STAFF is Blank and CNTL variable contains the concate vaules of ENTITY and STAFFID1.Here You will get the ENTITY values only.