Before you use a Macro transformation, create a mapplet with the transformation logic that you want to accept dynamic input. Then add the Macro transformation to a dynamic mapping and use the mapplet you created as the macro instruction.
For example, you want to read data from a dynamic source, perform data encryption, and then write the encrypted data to a target. First create a mapplet that performs the encryption using a Data Masking transformation. Then create a mapping that reads from and writes to your data sources. Add a Macro transformation to the dynamic mapping and select the Data Masking mapplet as the macro instruction.