you can write files to the /tmp partition and then %include will insert the txt of that file.
An example of this is: I need to store variables in a file i need to change for each installation such as ip, timezone etc..
I will wget in my pre section and output to /tmp/myVariables.cfg
wget
http://rhel-install/myVariables.cfg -O /tmp/myVariables.cfg
You this is getting the file over the network but you can get it from a disc or wherever
now i have them on my /tmp so i can include them in my command section
%include /tmp/myVariables.cfg
this is essentially putting the text in this file right in my command section
network --bootproto=dhcp
timezone --utc GMT
Hope this helps...