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


  • Subject: Re: Internal numeric variable defined with LIKE Keyword off of external files
  • From: bmorris@xxxxxxxxxx
  • Date: Tue, 7 Dec 1999 18:20:24 -0500




>Date: Tue, 7 Dec 1999 13:05:38 -0600
>From: bellis@ORIENTAL.COM
>...
>The field in the file (ODTRNM) is 2,0 Signed.
>Below is the results for DSPFFD:
>Field      Type       Length  Length  Position
>ODTRNM     ZONED        2  0       2        12
>
>However, in the compile listing the field from the external files shows as
being
>defined as  2,0 Signed in one place and 2,0 P in another.
>Below is the results from the compile listing on field ODTRNM.
>I                 S   12   13 0ODTRNM
>O                 ODTRNM              13S ZONE      2,0
>ODTRNM            ZONE      2,0 SIGNED
>ODTRNM            P(2,0)
>...

The first three are descriptions of the way the field appears in
the external file.  The last one is the one from the cross reference
showing how the field is defined internally.

RPG defines all numeric fields as packed, unless there is an explicit
definition in D specs with a different format.  RPG III and RPG IV behave
the same way in this respect.  The reason for this behaviour is that RPG
allows you to have a field defined with different formats (a common example
is a field being zoned in a display file and packed in the database file).

The easiest way to get an explicit definition the same as your external
file is to define an externally described data structure for the file:
D        E DS         EXTNAME(filename)

Barbara Morris


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.