X12 Document to flat file

After reading the webMethods documentation on EDI mapping, I am not clear on what exactly is needed to do the above task. Does each X12 transaction set need a Schema? Do you need a dictionary for each document type? Does anyone have an example of the steps to complete the above task with folder structure?