6 66 LceSubmit

LANSA Open Guide

6.66 LceSubmit

LceSubmit is used to submit a LANSA function/process or an IBM i program, such as a report program, to run in batch mode. If you submit a program that expect user interaction, the job will fail.

There is no communication between the called program and your calling application once the call has been made. A return value, indicating whether the job has been successfully submitted is passed back to your application. Your application does not have to wait for the program to complete.

BOOL

LceSubmit

(int

iSession,

 

 

 char far *

strProcess,

 

 

 char far *

strFunction

 

 

 char far *

strProgram,

 

 

 char far *

strExchangeList,

 

 

 char far *

strJobName,

 

 

 char far *

strJobDesc,

 

 

 char far *

strJobQueue,

 

 

 char far *

strOutputQueue )

  

Parameters

iSession

The session identifier as returned by LceGetSessionId.

strProcess

The name of the LANSA process.

strFunction

The name of the LANSA function.

 

Or

strProgram

The name of the IBM i program.

strExchangeList

A list of field names.

strJobName

The name of the job. The default value is *PGMPRO.

strJobDesc

The job description. The default value is QBATCH.

strJobQueue

The job queue. The default value is *JOBD.

strOutputQueue

The output queue. The default value is *JOBD.

  

Return Values

TRUE is returned if the session can execute the process/function or program.

FALSE is returned if an error occurs.

Notes

Portability Considerations

The format which uses strProgram is only supported if your host system is an IBM i. An error will be returned by the host if you make a call with strProgram to any other platform.

When calling a program on the IBM i, the exchange list may only contain fields of type A, P, and S. If exchanging numeric fields, the maximum length is 30 and the maximum decimals is 9.

  

If you are not familiar with the concept of job name, job description, job queue and output queue, contact your host Administrator.

Parameters are passed to the called program or function using the list of field names in strExchangeList. Each field used in the exchange must have been declared using an LceUseField function. The value for the field is assigned using the LceSetFieldValue/LCeSetFieldValueU function. The LANSA process and function to be executed do not have to be declared previously by an Lce function call.

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

Tip

If you wish to execute an IBM i program that either passes or receives parameters, use the Lce3GLCall function.

LceExecute400 function can also be used to submit IBM i jobs, but its use is much more complicated and it is best suited to IBM i commands.

Related Functions

6.44 LceLansaCall

6.14 LceExecute400

6.3 Lce3GLCall