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



Maybe he was thinking of Joe P - as in Pluta!

At 06:04 PM 10/8/2006, you wrote:

OK, I'm a bit late reading up on my mail, but next time you define a
file to allow crap into, would you mind terribly using a different name?
Otherwise I'll have to think hard what nasty thing to call Rob :-)

Joep Beckeringh


rob@xxxxxxxxx wrote:
> Like Denis, most of our files are defined using DDS.  But that's packaged
> software for you.
> I define my new files using SQL.  Then again, I am probably the only one.
>
> Here's something to chew over:
>
> Problem with DDS created files.  DDS created files are built to allow crap
>
> in most fields.  Some legacy thing when people got off grunting, thumping
> their chest and writing batch programs that checked fields down to the
> byte level for data that is right.  Like the first COBOL program I wrote
> in a class - make sure a field that is supposed to be numeric, is.  DDS
> files are fast to write to, but slow to read from because they don't care
> what kind of data you write to them.  But they'll check the data quality
> on a read.  When you think about it, most of your data access is reading,
> right?
> SQL created files check data on a write.  Not on a read.
> Recently saw a classic example of this.
> Compile this:
>                 R JOEPR
>                   MYCHAR         5A
>                   MYPACK         9P 2
> with CRTPF FILE(ROB/JOEP) SRCFILE(ROB/QDDSSRC)
> Run this command:  CRTPF FILE(ROB/JOEP2) RCDLEN(10)
> STRSQL
> INSERT INTO ROB/JOEP2 VALUES('NOWISTHETI')
>
> CREATE TABLE ROB/JOEP3
> (MYCHAR CHAR (5 ) NOT NULL WITH DEFAULT,
>  MYPACK DEC (9 , 2) NOT NULL WITH DEFAULT)
> RCDFMT JOEP3R
> (exit sql)
>
> CPYF FROMFILE(JOEP2) TOFILE(JOEP) MBROPT(*ADD) FMTOPT(*NOCHK)
> Notice:  Allowed crap into JOEP.  You have a packed decimal field with
> alpha characters in it.
>
> But CPYF FROMFILE(JOEP2) TOFILE(JOEP3) MBROPT(*ADD) FMTOPT(*NOCHK)
> Tells me to bugger off with CPF5035-Data mapping error on member JOEP3.
>
> Now if I attempt to read the corrupted DDS created file with a simple
> RPGLE cycle program
>      FJOEP      IP   E             DISK
>      FQSYSPRT   O    F   80        PRINTER
>      OQSYSPRT   D
>      O                       MYCHAR
>      O                                              ' '
>      O                       MYPACK
> I will get RNQ0907-Decimal-data error occurred.
>
> Verifying that DDS files check data integrity on read.  SQL created files
> check data integrity on write.
>
> Rob Berendt

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

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.