Ansicht
Dokumentation

01347 - Using Exec SQL to Evoke a CL Program on AS400

01347 - Using Exec SQL to Evoke a CL Program on AS400

General Material Data   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

Using Exec SQL to Evoke a CL Program on AS400

I am trying to evoke a CL program on the AS400 from an ABAP program using
the exec SQL. It works well when I hard coded the library and program name
, e.g. exec sql. call TESTLIB/TESTPRG endexec.
However, if I substituted the library and program name with a variable, then
it would give me a short dump. e.g.
parameters : p_libr(10) type c,
p_cl_nam(10) type c.
Data: prg_nam(21) type c.
concatenate p_libr '/' p_cl_nam into prg_nam.
exec sql. call prg_nam endexec.

According to SAP help text on exec sql, to use a program variable, "*"
should be prefix the variablr name. e.g. exec sql. call *prg_nam endexec.
This also didn't work.

I would appreciated if someone can advis eme of another solution. Thanks.


Regards,
Leonard Ing








Durban Tours - Südafrika Safari

Fill RESBD Structure from EBP Component Structure   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 1227 Date: 20240603 Time: 004019     sap01-206 ( 4 ms )