Joined: 06 Jun 2008 Posts: 8449 Location: Dubuque, Iowa, USA
You need to go to Beginners and Students Forum as this forum is for professionals with experience. Your question indicates you are not a professional with experience, so you should be posting on the other forum.
As far as moving S9(9) to S9(9) COMP, you can use these COBOL verbs to do so: MOVE, COMPUTE, ADD, SUBTRACT, MULTIPLY, DIVIDE -- all of them, appropriately coded, will cause the S9(9) COMP variable value to be set to the S9(9) variable value.
One thing you need to be aware of is that ACCEPT QUANTITY means you need to provide a 9-digit value with the sign overlaid on the last digit and leading zeroes; putting in 123 without the leading zeroes means that QUANTITY will contain 123 left-justified with trailing spaces -- so the results you get will NOT be what you expect. Depending upon what is entered, the MOVE statement may well generate a data exception.