help on appending data to existing data

I need to know how to record the hostname, date/time and all of the process and send it all to one file. I know that the commands I need are hostname, date and ps but I don't know how to do them all and send them all to the same file. Please help!

hostname > file
date >> file
ps -ef >> file [or 'ps ax' depending on your flavor of Unix]