× 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.



On 3/15/11 7:38 AM, Hart, Doug - EI wrote:

When I read the file QUSRSYS/QATOCHOST in a CLP I get an error on
the field IPINTGER. I'm not accessing this field. How do I define the
file so it does not throw the error. Or do I just MONMSG CPF0863
right after the RCVF? Not very pretty.

DCLF FILE(QUSRSYS/QATOCHOST)
RCVF

Message ID . . . . . . : CPF0863
Date sent . . . . . . : 03/15/11
Time sent . . . . . . : 10:17:22
Message . . . . : Value of binary data too large for decimal CL
variable.
Cause <<SNIP>>
Recovery . . . : Correct the data in the file that is not valid or,
if the file is a data base file, use a logical view of the file that
omits the field that is not valid.


Presumably after the RCVF is coded a MONMSG CPF0864 EXEC(goto EOF) for the End-of-File condition.? So what would be so ugly about including additionally the one or two lines for a MONMSG CPF0863 EXEC(rcvmsg msgq(*pgmq) pgmq(*same (*)) msgtype(*excp) rmv(*yes)) which both handles [by ignoring] the error condition and then removes the error from the joblog?

If really too ugly or too slow due to the amount of data and thus the number of exceptions, a simple alternative is to utilize the OPNQRYF to map the data in the IPINTGER column to zero in order to avoid the overflow condition [due to the poorly chosen 9-digit definition by DDS for the equivalent of the *BIN4\*INT4 data type, instead of allowing for 10 digits or definition by bytes such that the number of digits was just for presentation] as with:

ovrdbf qatochost *file share(*YES) ovrscope(*calllvl)
opnqryf file((qatochost)) *inp keyfld(*file)
mapfld((ipintger 0 *bin4 9 0)) opnid(*file)
opnscope(*actgrpdfn) alwcpydta(*yes)
optimize(*allio) srtseq(*job) langid(*job)
/* existing code */
clof qatochost

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.