Hello, I am a beginner with AS/400, I am developing a program to SCAN IN records, this record can be scanned multiple times (Duplicated records). But I need a code that search if the record exist, if exist a record then sum the quantity field of that record with the quantity entered if is greater than 48 pop-up (error screen). if it's more then one record sum the quantity field of the records found, if the summary it's greater than 48 (error screen), if not write the record.
This is a code that I was using, it work with the first two record, if it's more it take the last record and summary with the record entered.
C HSTKEY CHAINSEWHSTTP 95
C *IN95 IFEQ *OFF
C BUNQTY ADD SCQTY SUMQTY 50
C SUMQTY CABGTBUNSAV ERSC03
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!