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



The RPG manual says:
"If ALWNULL(*INPUTONLY) is specified, then you can successfully read
records with null-capable fields containing null values from externally
described input-only database files. When a record containing null
values is retrieved, no data-mapping errors will occur and the database
default values are placed into any fields that contain null values.
However, you cannot do any of the following: Use null-capable key
fields Create or update records containing null-capable fields Determine
whether a null-capable field is actually null while the program is
running Set a null-capable field to be null. 
If ALWNULL(*USRCTL) is specified, then you can read, write, and update
records with null values from externally described database files.
Records with null keys can be retrieved using keyed operations. You can
determine whether a null-capable field is actually null, and you can set
a null-capable field to be null for output or update. You are
responsible for ensuring that fields containing null values are used
correctly. "With SQL errors I have always found it useful to look at the
generated code from a debugger.  There are a number of generated lines
that have helped me narrrow down the exact fields causing a problem. 
With SQL you can use null indicators to handle the null values.
 
Since your comments indicate you are using a CHAIN, perhaps you can
find out how to use the null values correctly as the manual states.  
Or you might want to try *INPUTONLYinstead of *USRCTL,  that worked for
me in the past.
 
 
HTH, 
 
Dave Boettcher

>>> awawrzaszek@xxxxxxxxxxxxxxx 01/23/2004 3:25:49 PM >>>

It bombs when I do the chain to the file.  I haven't even tried to use
any fields yet.

-----Original Message-----
From: rob@xxxxxxxxx [mailto:rob@xxxxxxxxx] 
Sent: Friday, January 23, 2004 4:19 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: FW: data mapping error

Do you get the error when reading the file, or when you do something
with 
the null capable field?

For example, does your program bomb on
Read Myfile;

Or on:
MyWorkField = MyFileField;


Rob Berendt
-- 
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com 





"Angela Wawrzaszek" <awawrzaszek@xxxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx 
01/23/2004 03:28 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
<rpg400-l@xxxxxxxxxxxx>
cc

Fax to

Subject
FW: data mapping error









    I have an ILE program that is reading files that were created with
a
SQL script.  Some of the fields in the file are null-capable.  I have
compiled the program with *USRCTL on the allow null value field.  
This
USUALLY takes care of getting any errors for null fields.   However
once
in a while I will get a data mapping error within an ILE program while
reading a particular file.   All I do is go into that file & record it
is bombing on and blank through any of the blank fields.   Then
everything is fine.   Why does it bomb out if I have used *USRCTL?
What can I do to prevent this?

Thankyou!!

Angela Wawrzaszek 
Programmer/Analyst 
Nucor Steel Auburn 
wawrzaszek@xxxxxxxxxxxxxxx 
(315) 258-4205 

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx 
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l 
or email: RPG400-L-request@xxxxxxxxxxxx 
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx 
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l 
or email: RPG400-L-request@xxxxxxxxxxxx 
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx 
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l 
or email: RPG400-L-request@xxxxxxxxxxxx 
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




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.