Putlog is covered in the section "Understanding DATA Step Processing" in SAS Programming 2: Data Manipulation Techniques.
As for creating temporary variables, I assume you mean variable in the variable=column sense. You can create as many variables as you want in a DATA step. To prevent them from being output (make them temporary), list them in a DROP statement. The DROP statement is introduced in SAS Programming 1, and discussed in more depth in Programming 2. Here is the documentation for the DROP statement:
Also, here is the documentation for putlog ( https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/n05jha8tsrpanyn19m05ss7ltv6e.ht... ) and drop ( https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/n1capr0s7tilbvn1lypdshkgpaip.ht... )