In principle, you could fit a logistic regression (given that your response variable is binary (T/F) ) with 4 predictors (ID, Age,Gender and Salary). Then, examine the resulting model and if you are happy with it, you could use the model and the "other dataset" to perform prediction.
In R you could do fit the model by using GLM (there are other options too)
fit <- glm(Y~ID+AGE+GENDER+SALARY, data=OLDDATA, family=binomial())
And if you are happy with the model then you can use
prediction <- predict(fit,newdata=OTHERDATA)
As people mention, there are several analysis and diagnostics you should run to be sure you can actually do the prediction, but the central workflow is fit (you may need to do a lot of data management before this), evaluate the model and predict.
Alternative R syntax: You can also write the fitting instruction in R in this way
fit <- glm(Y~ID+AGE+GENDER+SALARY, data=OLDDATA, family='binomial')