|
You're right. I think I've misunderstood his mail. I suppose extendingthe
parm isn't an option either ?way
Kr,
Dirk.
Dirk Mariën
Toyota Motor Europe
60 Avenue du Bourget,
1140 Brussels, Belgium
Ph: +32 (0) 2 745 2581
www.toyota-europe.com
Henrik Rützou <hr@xxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
25/01/2013 12:50
Please respond to
"RPG programming on the IBM i \(AS/400 and iSeries\)"
<rpg400-l@xxxxxxxxxxxx>
To
"RPG programming on the IBM i (AS/400 and iSeries)"
<rpg400-l@xxxxxxxxxxxx>
cc
Subject
Re: Lost in free format conversion.
Dirk,
that was not what Armand wanted to do ;-)
he want to pass a 5.0 numeric field as a 5A alpha field in a parameter
from
one program to another still maintaining a possible negative value and
there
is no way that you can pass a 6 char string (-22256) in a 5 char alpha
field
parmField1 = %editc(field1:'X'); will pass '2225O' to the recieving
program
the problem is getting this value back in a numeric field and the easy
is to double define the field in a DSin
On Fri, Jan 25, 2013 at 12:29 PM, <Dirk.Marien@xxxxxxxxxxxxxxxxx> wrote:
Arnaud,
%char will convert corectly. After that, you can use %int or %dec :
ValueAlpha = %Char(Num20dec6);
Num20dec6 = %dec(%trim(ValueAlpha):20:6);
Kr,
Dirk.
Joep Beckeringh <joep.beckeringh@xxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
25/01/2013 12:23
Please respond to
"RPG programming on the IBM i \(AS/400 and iSeries\)"
<rpg400-l@xxxxxxxxxxxx>
To
"RPG programming on the IBM i (AS/400 and iSeries)"
<rpg400-l@xxxxxxxxxxxx>
cc
Subject
Re: Lost in free format conversion.
Armand,
Why don't you just define the incoming parameter as 5S0? You say that
justthe RPG III program is converted to character, but it is not: it is
<a.perquin@xxxxxxxxxxxxx>moved. So you van just receive is as it is - a zonec numeric field.
Joep Beckeringh
Op 25 jan. 2013 om 11:04 heeft Armand Perquin
inhet volgende geschreven:and
Hello,
In a RPG3 program a numeric field is converted to a character field
freepassed as parameter in a call. When this parameter is received in a
converting
format program and the value is positive there is no problem
it
back to a numeric field. But when the value was negative the value
valuethefield
character field contains a letter so I can convert it to a numeric
with %dec, %int or %uns.
E.g.
Field1 5.0 with value -22256 and parmField1 5A.
When the value from Field1 in RPG3 is moved into parmField1 the
isa
converted from -22256 to '2225O'. In this case converting it back to
isnumeric field is not possible because of the letter ?O?. The result
includingsendermessage RNX0105 is trown.
Can someone please help me to solve this challenge in free format.
Best Regards / Met vriendelijke groet,
Armand
_____________________________________________
H.P.J. (Armand) Perquin
AS/400 Senior software developer, Senior system analyst
Boal Beheer B.V.
De Hondert Margen 12
PO Box 75, 2678 ZH De Lier, The Netherlands
Tel. +31 (0)174 527297, Fax. +31 (0)174 527264
Internet: http://www.boalgroup.com
This message (including any attachments) is confidential and may be
privileged. If you have received it by mistake please notify the
byunauthorised
return e-mail and delete this message from your system. Any
and
use or dissemination of this message in whole or in part is strictly
prohibited. Please note that e-mails are susceptible to change. BOAL
International B.V., which has its seat at De Lier, the Netherlands,
is
registered in the Commercial Register under number 27237488,
Internationalitsfor
group companies, shall not be liable for the improper or incomplete
transmission of the information contained in this communication nor
any delay in its receipt or damage to your system. BOAL
ofB.V.(or its group companies) does not guarantee that the integrity
freethis
communication has been maintained nor that this communication is
of______________________________________________________________________
viruses, interceptions or interference.
______________________________________________________________________This email has been scanned by the Symantec Email Security.cloudservice.
(RPG400-L)(RPG400-L)--
This is the RPG programming on the IBM i (AS/400 and iSeries)
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.
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.
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
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.
--
Regards,
Henrik Rützou
http://powerEXT.com <http://powerext.com/>
--
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.
--
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 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.