Please forgive the amateur-ish nature of this. I am trying to broaden my horizons. I've been charged with a task and I'm having some trouble accomplishing it. I've been picking through code to come up with a viable solution. Here it is:
I have an ASCII file produced by a manufacturing software. This file contains 2 parts: items and sales. I need to split this file, based on the leading column (HID and BID to 1 file, everything else to the other file, (SID and PUR). The file name for the HID / BID file should be based on the number that follows the HID, no leading zeros, with a "-items" (i.e. HID00458001 = 458001-items.txt). The second file name is based on the same constraints, except it has "-sales" as a suffix (i.e. HID00458001 = 458001-sales.txt). If file names are too complex, I'd be happy if 1 said "sales" and 1 said "items".
I know this may seem like an open request. But I would be eternally grateful for anyone that could help me. Like I said, I'm trying to expand my horizons, so any help would be more than appreciated!