Hi,
I have a awk script which takes the input as dat file and generates doc file as output. This script is running fine for long time. But lately users are complaining about one problem. If there are multiple parts number it should display the information by part numbers.
like this:
ORDER #:15WZ0000 Part #:15117110 Model Y.:6 Recv. Dock:DDD ST Loc.:18003
.......................................................................................
ORDER #:15WZ0006 Part #:15856412 Model Y.:6 Recv. Dock:DDD ST Loc.:18003
Previous Cumm. Quantity:0 Horizon Start:20051225 Horizon End:20060204
Cumulative Quantity :0 Horizon Start:20051225 Dispatch Date:20060205
FORECAST PERIOD DATE REQUIRED QUANTITY
======================================================================
Firm Weekly 20060206 810
Firm Weekly 20060213 542
======================== End of the Item 15856412 =======================
Firm Weekly 20060305 105
Planning Weekly 20060213 840
Planning Weekly 20060220 1170
Planning Weekly 20060227 1200
Planning Weekly 20060306 1740
Planning Weekly 20060313 1110
Planning Weekly 20060320 1155
Planning Weekly 20060327 825
Planning Weekly 20060410 690
Planning Weekly 20060417 930
Planning Weekly 20060424 1365
Planning Weekly 20060501 1365
Planning Weekly 20060508 1215
Planning Weekly 20060515 1035
Planning Weekly 20060522 855
As you can see there are two part number and after the first part number it displays a line that has the data saying "end of item".
It works fine when there are multiple part numbers in one file. But, If I have multiple files then it shows the correct information for 1st part but not for other parts like part level information.
In my second post, I am uploading the script which are using to generate this report.