I am trying to merge two programs into one but I have no idea where to start. Is there anyone that can help me? The two files are attached to this post. It doesn’t matter which program is merged into the other.
IM01P.doc (38 KB)
WM01P.doc (34.5 KB)
Hi
What exactly do you mean by “merge” ?
What is the required functionality or is it only the very very basic syntax of a merged program you are looking for ?
Finn
When I say “merge”, I mean combine these two programs into one program. The required functionality is when I enter an ISBN number and a frozen quantity, it should only show the numbers that fit the results. For example, if the ISBN = 0786804955 and the Frozen Quantity = 416, it should only show me only the ISBN’s that have 0786804955 and a Frozen Quantity of 416.
Isn’t that more or less what the IMOP1 does already ?
There is some functionality of adding prepack etc (- which is by the way never reset !)
So do you have to merge anything at all or isn’t it enough just to adjust the stuff displayed in the S9000-DISPLAY subroutine ?
Finn
Yes, IM01P does do that and so does WM01P. I want to combine them into one program. I have to combine all of the subroutines, including the s9000 display subroutine, from both programs because it’s pointless having two separate programs doing the same thing. You may be wondering why there are two programs doing the same thing. the IM01P is the inventory master and the WM01P is the warehouse master.
Hi
I’m still not quite sure what you are trying to do?!
- One generic program that does a look up in both the inventory and wharehouse files depending on some parameter
or - a program that does a look up in both for a given key ?
Finn
I am trying to create a generic program that does a look up in both the inventory and wharehouse files depending on two parameters, which in my case is the an ISBN and a frozen quantity.
Hi
Still not quite sure what you’re really asking for, but here is what I’m currently guessing
- perhaps that is a total misunderstanding ?!
Finn
In “pseudocode”…
define data
local … /* with all the locals from both progs
.
end-define
*
repeat
input ISN frozen quantity
…
perform Find-inventory
perform Find-wharehouse
end-repeat
define subroutine find-inventory
R-IM1. READ IM WITH ISBN = #IM-KEY.ISBN
…
perform display-inventory
END-READ
end-subroutine /* find-inventory
*
define subroutine find-wharehouse
R-WM1. READ WM WITH ISBN-NBR-USA-CANADA-PRICE = #WM-KEY1
…
perform display-wharehouse
END-READ
end-subroutine /* find-wharehouse
*
define subroutine display-inventory
…
end-subroutine /* display-inventory
define subroutine display-wharehouse
…
end-subroutine /* display-wharehouse
*
end
That actually helps. thank you very much. if i need anything else, i’ll post a reply.