× 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 have different results using the *LIKE DEFINE opcode in RPG/400 and, after
converting, in RPG/IV.

For example in program A:
- file TEST is used, which contains a field named NUMB: Zoned 8,0
- there is a datastructure where the record format of TEST is externally
described (field NUMB = Zoned 8,0)
- there is *like define opcode, where field PGNUMB is defined like field
NUMB
- program B is called


RPG/400:
-------
FBGFIATL2  UF   E           K DISK
IDSTEST    EIDSTEST
C           *LIKE     DEFN NUMB      PGNUMB

When looking at the Field references in the compiler listing, I see that:
- field NUMB is Zoned decimal 8,0
- field PGNUMB is Packed decimal 8,0



After coverting to RPG/IV:
-------------------------
FTEST      UF   E           K DISK
D DSTEST        E DS                  EXTNAME(TEST) INZ
D PGNUMB          S                   LIKE(NUMB)

When looking at the Field references in the compiler listing, I see that:
- field NUMB is Zoned decimal 8,0
- field PGNUMB is also Zoned decimal 8,0 and not packed as in RPG/400.

In program B:
PGNUMB is also defined via *LIKE DEFINE, but without datastructure DSTEST,
PGNUMB is Packed 8,0, both in RPG/400 and in RPG/IV (as RPG converts Zoned
to Packed for internal usage).

When RPG/400 program A calls RPG/400 B there is no problem.
When ILE program A calls ILE program B, I get a decimal data error on PGNUMB
as the two field formats PGNUMB differ.

Is this a known problem ? Is there maybe a PTF which solves this?



Loek Maartens
Veracity Software Consultancy BV
The Netherlands





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.