I have a schema with the header and line info combined in the same line. There may be multiple ‘orders’ in the same file and i need to create a separate file for each ‘order’.
How would i go about doing this?
Sample data. The identifier is ‘PC’ and is the same on everyline. The field that has data starting with ‘AM’ is the order number field. When the order number changes, i need to split the file.
PC^A^CUSTOMER^AM111977^^A002^201986985
PC^A^CUSTOMER^AM111978^^A003^201990030
PC^A^CUSTOMER^AM111978^^A003^201986986
PC^A^CUSTOMER^AM111979^^A004^201986987
PC^A^CUSTOMER^AM111979^^A004^201986987
PC^A^CUSTOMER^AM111979^^A004^201986987