I had an error like this once. I found out that I had to initialize all the
variables in the call. Try...
DCL VAR(&VAR2) TYPE(*CHAR) LEN(10) Value(0)
Vincent
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of PEPITOVADECURT
Sent: April 22, 2009 4:56 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Call a RPG program from a CL, decimals error
Hi I call a RPG program from a CL but a decimal data error appears when
call a RPG program.
PGM
DCL VAR(&VAR1) TYPE(*DEC) LEN(9 5)
DCL VAR(&VAR2) TYPE(*CHAR) LEN(10)
DCL VAR(&RESU) TYPE(*CHAR) LEN(10)
DCL VAR(&PAN) TYPE(*CHAR) LEN(10)
RTVDTAARA DTAARA(*LDA (511 10)) RTNVAR(&PAN)
CHGVAR VAR(&VAR1) VALUE(1234,01200)
/* Send num ex: 1231,2100 and returns 1.231,21 */
CALL PGM(PR2535) PARM(&VAR1 &VAR2)
CHGVAR VAR(&RESU) VALUE(&VAR2)
SNDBRKMSG MSG(&RESU) TOMSGQ(&PAN)
ENDPGM
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.