6 14 LceExecute400

LANSA Open Guide

6.14 LceExecute400

Executes an IBM i command.

BOOL

LceExecute400

(int

iSession,

 

 

 char far * 

strCommand)

  

Parameters

iSession

The session identifier as returned by LceGetSessionId.

strCommand

The IBM i command. For this entry, you must know the format of the command. You must ensure that the syntax of this parameter is correct and that the length does not exceed COMMAND400_LENGTH as defined in the LCOE.H header file.

  

Return Values

TRUE is returned if the session has executed the command.

FALSE is returned if an error occurs.

Notes

Portability Considerations

LceExecute400 is only supported if your host system is an IBM i. An error will be returned by the host if you make a call to any other platform.

  

Any command, program or function initiated by this function must be batch oriented (i.e. have no screen interaction). Your application must wait until the command or function has completed before a return value is passed back to your application. Error messages will be routed back to your application.

  • This function can only be executed after a session has been opened.

Tip

While LceExecute400 can execute a program or LANSA function on the IBM i, you will find it much easier to use the LceLansaCall, LceSubmit or Lce3GLCall function. Passing information with these functions is less complicated than it is with LceExecute400.

Related Functions

6.66 LceSubmit

6.3 Lce3GLCall

6.44 LceLansaCall