You can pipe one tool's output into the other tool's input. Something like:
sort file1 | awk -f programfile file2
The actual effect depends on the awk script.
You have not been very verbose about the details of your project, so the only advice to give is read the man pages, google for some clever tutorials and get used to plain basic UNIX concepts.