Hi all, my cobol program will have a prod# and will use a lookup table to assign the correct code to it.
Code Start-prod# End-prod#
001 0001 2222
002 2223 4399
003 4400 6000
If the current record has a value of 3323, how would I assign code value = 002? Will the SEARCH function allow testing a range? For example:
SET X = 1
SEARCH CODE-TABLE
AT END ....
WHEN PROD-NBR >= START-PROD-NO (X) AND
PROD-NBR <= END-PROD-NO (X)
MOVE CODE (X) TO MYCODE
END SEARCH
If not allowed, please show how you might do it. Thanks, Dan.
Code Start-prod# End-prod#
001 0001 2222
002 2223 4399
003 4400 6000
If the current record has a value of 3323, how would I assign code value = 002? Will the SEARCH function allow testing a range? For example:
SET X = 1
SEARCH CODE-TABLE
AT END ....
WHEN PROD-NBR >= START-PROD-NO (X) AND
PROD-NBR <= END-PROD-NO (X)
MOVE CODE (X) TO MYCODE
END SEARCH
If not allowed, please show how you might do it. Thanks, Dan.