Hello Listers, We are in the process of converting some Legacy COBOL programs from the OS/390 platform to the AS/400. Within this legacy code are some (simplified) move statements (eg: 01 INPUT-REC. 05 INPUT-VALUE-A PIC X(20). 05 INPUT-VALUE-B PIC 9(08)V99. 05 INPUT-VALUE-C PIC 9(02). 05 FILLER PIC X(48). 01 WS-DATA-ELEMENTS. 05 WS-VALUE-A PIC X(20). 05 WS-VALUE-B PIC S9(9)V99 COMP-3. 05 WS-VALUE-C PIC 9(02). READ FILE-REC INTO INPUT-REC. (Works OK) MOVE INPUT-VALUE-A TO WS-VALUE-A. (Works OK) MOVE INPUT-VALUE-B TO WS-VALUE-B. (ERROR) MOVE INPUT-VALUE-C TO WS-VALUE-C. (ERROR) The trick here is that the FILE-REC sometimes has spaces in the numeric area. Obviously we could test for spaces, examine replacing, or whatever ... but we're talking about 400,000+ lines of code ... and this was to be an easy task. In the OS/390 world, the numeric defined fields on input-rec-a & b were treated as zeroes in the related move statements. On the AS/400 ... it errors out. In interactive mode, we can specify "G" and it continues to process, and finishes successfully (apparently having implicitly moved zeroes in place of the spaces). We have scoured the COBOL book, looking for an override option for this handling ... no joy. So ... I ask you for your guidance. Thanks in Advance (TIA) Schaefer ONeill Schaefer P. ONeill 7912 O'Neal Road Raleigh, NC 27613-1047 (919)-571-0046 (voice) (919)-571-0048 (fax) (877)-668-7255 (toll free)
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.