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



I've searched the archives for this and haven't been able to find an
answer. I inherited an SQLRPGLE program that reads (using SQL Fetch) an
old QS36F file and writes certain fields to another file. Unfortunately,
S/36 Environment still allows numeric fields to contain blanks (spaces).
When it tries to do a fetch on a record with a blank numeric field, SQL
quietly barfs on itself with status 22018, error -420. I've tried
explicit casting in various forms and none of them work. I've also added
and H-spec fixnbr(*zoned) which apparently has no effect on embedded SQL

Is there a simple way to get around this? I know I can do case logic for
each numeric field -

case
when substr(F00001,501,6) > '000000'
then substr(F00001,501,6)
else '000000'
end

But there are dozens of numeric fields in this file. And there are a
multitude of programs similar to this, waiting in the wings.

Any help would be greatly appreciated. I'm running out of aspirin.

TIA.

Timothy Adair

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.