× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: ILE COBOL Data Exception on the 400
  • From: StoneJ@xxxxxxxxxxxxxxxx
  • Date: Fri, 20 Apr 2001 10:10:41 -0400

Title: RE: ILE COBOL Data Exception on the 400

When we went from a mainframe to the AS/400, we ran into the same problem.

You have to fix the data files.  Even if you were to find a COBOL over-ride to change spaces to zeros, it wouldn't help your situation at all.

The problems would also show up in sorts, logical files, RPG, OPNQRYF, SQL, Query/400, among other things.

To fix the data, you have to externally describe each file.  The next step is to fix the data.  I think QUSRTOOLS has a fix for this problem - it will go thru each file and change spaces to zeros with no programming.  Jim Sloan sells QUSRTOOLS for a modest fee.  Anyone have his phone# ?

Check the web for his phone.  Let me know if you cant find it, maybe I can.


-----Original Message-----
From: Peter_Lunde@hotmail.com [mailto:peter_lunde@hotmail.com]
Sent: Thursday, April 19, 2001 11:33 PM
To: COBOL400-L@midrange.com
Cc: soneill@trak5.com
Subject: Re: ILE COBOL Data Exception on the 400


Schaefer

Some AS400s also have S36 COBOL which seems to be similar to your legacy
COBOL in its treatment of spaces.

Peter.

----- Original Message -----
From: "Schaefer P. ONeill" <soneill@trak5.com>
To: <cobol400-l@midrange.com>
Sent: Wednesday, April 18, 2001 5:23 PM
Subject: ILE COBOL Data Exception on the 400


> 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)
+---
| This is the COBOL/400 Mailing List!
| To submit a new message, send your mail to COBOL400-L@midrange.com.
| To subscribe to this list send email to COBOL400-L-SUB@midrange.com.
| To unsubscribe from this list send email to COBOL400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---END


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.