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



Yes Barara and my first solution to recieve a numeric in a alpha field was

d dsx ds
d dsa 1 5a
d dsn 1 5s 0

dsa = parmfield1;

dsn will then have the value of the original field1

My second in only /free was

if %bitand(%subst(alpha:5:1):x'D0') = x'D0';
%subst(alpha:5:1) = %bitor(%subst(alpha:5:1):x'F0');
numeric = %dec(alpha:5:0);
numeric = numeric * -1;
else;
numeric = %dec(alpha:5:0);
endif;


Do you have a better solution WITHOUT changing the interface ?



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

On 2013/1/25 2:32 PM, Henrik Rützou wrote:

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.


My understanding of the original post was that the calling program was
moving the negative value into a character field and passing it to the
called program.

The question was about how to code the called program to receive the value.

Here's the original post. I still think I am understanding it correctly,
but maybe not ...
http://archive.midrange.com/rpg400-l/201301/msg00347.html

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