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



Good grief!

the OP asked how to pass a numeric field with possible negative value
moved into an alpha field between programs and then get it back in to a
numeric field in the recieving program.

There has been suggested several methods to do so without changing
the interface.

Barbara - the originally field was a 5 byte numeric field with a bit
turned of in the fifth character telling a numeric field it was negative,
what the problem, don't you know your "bits in a byte" to turn positive
to negative or uppercase to lowercase ;-)




On Fri, Jan 25, 2013 at 7:32 PM, Barbara Morris <bmorris@xxxxxxxxxx> wrote:

On 2013/1/25 1:19 PM, Jeff Young wrote:
The bigest issue I see with this is that the OP indicated that his input
value was actually 6 bytes with a leading negative sign (-12345) that he
needed to get into a 5S 0 field.

None of the solutions I have seen address this issue.


I don't think the input value was 6 bytes. It was a 5 digit number with
a negative sign, -12345. But that's just 6 bytes when it's typed out. In
the program, it would be either 3 bytes (packed) or 5 bytes (zoned).
Presumably packed, since there would be no reason to do the move to
character if it was already zoned.

Also, I don't see any indication in Armand's original post that the
called program needs to use a character form of the parameter.

So as far as I can tell, the best solution suggested so far is to simply
define the parameter as 5S 0 in the called program.

--
Barbara
--
This is the RPG programming on the IBM i (AS/400 and 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.