the task i have is to produce a report of 'slow moving inventory' for the past 2 months. (04-05). All the instructions i was given by the long time lead dev. this erp is written in the early 90's and has not been modernized.

I have a query which looks at 2 files. one is the parts file and other is the sum file. the sum contains buckets for each month for sales. the parts has other criteria needed, such as code for avail-to-sell, if the item is inventoried, and i also check that the year is 2014 and months are 4 and 5.

I get an output temp file of these items which sold.

Now I go against the same sum file again, as unmatched meaning that i want a list of items which did not sell. this is the tricky part. Today she said to go against another sales history file.

WHen I go against this new sales history when i do unmatched i only get fields from the primary file.

is this correct? i need fields from my temp file as well. i can always run a new query to get them. but in general does this process seem ok to you?

有帮助吗?

解决方案

WHen I go against this new sales history when i do unmatched i only get fields from the primary file. is this correct?

Yes, this is correct. That is what unmatched means - it means there are no records in the secondary file which match the primary, therefore no fields from the secondary.

i need fields from my temp file as well. i can always run a new query to get them.

You could also join matched records to the temporary file to get the fields you need.

其他提示

Query/400 is essentially deprecated. IBM has no intention of making any enhancements. You would be better served, for a variety of reasons to convert this to SQL, probably as a QM Query.

While Query/400 may require several queries to get a desired result, those same problems can generally be achieved with a single SQL query statement, eliminating the need to create and write a work file only to read it back in again. That is generally a big waste, except in those rare circumstances where you will also use the work file for something else too.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top