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



Timothy,

I think clean could only come from data conversion. Program described
files cannot help you keep your database clean, since the system cannot
perform any validation of your data. DDS described files are a little
more reliable, since field data types can be validated by the OS. The
only real problem with DDS data validation is that it happens when you
read it out of the file. It doesn't really keep you from stuffing bad
data into the file... This is where DDL described files take over. In
DDL described files, the DB blocks the write of obviously inappropriate
data.

As to the overlay issue, I never saw any code that seemed to define
any...

-Eric

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Timothy Adair
Sent: Tuesday, April 20, 2010 8:47 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: *INPUTPACKED ignored for arrays ?

Thanks for the reply. I did try this and got a clean compile but when I
ran
the pgm I got the dreaded decimal-data error. RPG doesn't allow you to
overly an array with an array, but I suppose I could double-define each
field (element). Surely there must be a cleaner way.




"Mark S. Waterbury" <mark.s.waterbury@xxxxxxx> wrote in message
news:mailman.23761.1271719215.2580.rpg400-l@xxxxxxxxxxxxxxx
Hello, Timothy:

Since it is a program-described file anyway, why not define the file
record layout as a series of packed fields, e.g.:

FLD1
FLD2
etc.

and define a data structure that allows you to overlay-define this
record
with the array? That way, you should be able to get the benefits of
the
RPG field validation on input, and still use the data as an array in
the
rest of the program.

Does that make sense?

All the best,

Mark S. Waterbury

Timothy Adair wrote:
I have an RPG IV pgm (not ILE) that is reading in an old QS36F
program-described file. This file has a "field" that is actually a
30-element packed numeric array (7,0). For records with valid data
in
this array, everything is fine; but I have some records with spaces
(hex
'4040404') in this array, and when it hits one of these, the program
gives a decimal-data error (understandably so).

I have specified the compile option of FIXNBR(*INPUTPACKED) but the
program is not fixing the data at input-time. Does *INPUTPACKED not
work
for input arrays? It seems to work for single fields.

And yes, I know, I need to fix the data. I intend to but that
doesn't
guarantee I won't encounter more of these in this file (or other
files).
I'd like to nail down a viable solution now. We will be converting
to
externally-described files eventually but for now this is the
situation I
have to deal with.

And yes, I have tried every conceivable combination of overlays &
arrays
to program around the problem. Every attempt either wouldn't
compile, or
gave the DD error when run.

Me duele la cabeza!

Ayuda?



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.