hi all,
i've create module
CRTRPGMOD MODULE(ALIB/ADUR) SRCFILE(#SRC/QRPGLESRC)
SRCMBR(ADUR)
and success
then i create Service program
CRTSRVPGM SRVPGM(ALIB/ADUR) MODULE(ALIB/ADUR) EXPORT(*ALL)
and success
then i create function
create function ALIB/ADUR
(Tanggal varchar(8),
Mode varchar(8),
Jml varchar(4))
returns varchar(8)
returns null on null input
deterministic
language rpgle
no sql
parameter style general
external name 'ALIB/ADUR(ADUR)'
when i call from Sql it's working
select datedur(char(dt),'*DAYS','1')
from tableA
but how to call from my RPGLE program ???
i've tried but error
D DATEDUR pr 8a varying
D Tanggal 8a value
D Mode 8a value
D Jml 4a value
c Eval hasil = datedur(%char(tgl):'*DAYS':'1')
can anyone help me please ??? how to call and use service program / module in RPGLE ??
thx u very much
i've create module
CRTRPGMOD MODULE(ALIB/ADUR) SRCFILE(#SRC/QRPGLESRC)
SRCMBR(ADUR)
and success
then i create Service program
CRTSRVPGM SRVPGM(ALIB/ADUR) MODULE(ALIB/ADUR) EXPORT(*ALL)
and success
then i create function
create function ALIB/ADUR
(Tanggal varchar(8),
Mode varchar(8),
Jml varchar(4))
returns varchar(8)
returns null on null input
deterministic
language rpgle
no sql
parameter style general
external name 'ALIB/ADUR(ADUR)'
when i call from Sql it's working
select datedur(char(dt),'*DAYS','1')
from tableA
but how to call from my RPGLE program ???
i've tried but error
D DATEDUR pr 8a varying
D Tanggal 8a value
D Mode 8a value
D Jml 4a value
c Eval hasil = datedur(%char(tgl):'*DAYS':'1')
can anyone help me please ??? how to call and use service program / module in RPGLE ??
thx u very much



Comment