Previous Topic

Next Topic

Book Contents

Book Index

Invoking Search from a Program

When called from a program, the simplest method of searching for a job is to pass the Search call statement to CTMAPI as a standard parameter. Alternatively, you can use the conversational mode of the interface, where the CTMBAPI area is passed as the parameter, and fields in it identify the requested job. This mode is described in Conversational Mode using Program. As mentioned earlier, the advantage of using the CTMBAPI mode is that your program gets back from CTMAPI the entry of the job, mapped by CTMBJSE DSECT, as described in The Status Reply DSECT (CTMBJSE).

The following statement is an example of the standard method of executing CTMAPI in batch job and passing it a SEARCH request:

//DAAPI  DD *

SEARCH MEM=DEFSCHD1 JOB=JOBA OID=0AS45 ODATE=090601

Parent Topic

4. Search