Program and CL Command APIs
The program and CL command APIs can be used to create programs, obtain program, module, and command information, activate bound programs, and resolve pointers to exports.
Before using the Create Program (QPRCRTPG) API, you need to have some machine interface (MI) programming experience and understand the concepts in the IBM® i Machine Interface topic collection, which provides detailed descriptions of the MI instruction fields and the formats of those fields.
The program and CL command APIs are:
- Activate Bound Program (QleActBndPgm) activates the specified bound program or service program and all dependent service programs, and then initalizes the newly activated service programs.
- Activate Bound Program Long (QleActBndPgmLong) activates the specified bound program or service program and all dependent service programs, and then initalizes the newly activated service programs (64 bit version of QleActBndPgm).
- Add Associated Space Entry (QbnAddAssociatedSpaceEntry) is used by a compiler preprocessor to put data into the associated space of the created module.
- Add Bindtime Exit (QbnAddBindtimeExit) is used by a compiler preprocessor to define an exit program that can be called when a created module is bound into an ILE program.
- Add Extended Attribute Data (QbnAddExtendedAttributeData) is used by a preprocessor to set the extended attribute field of a created module.
- Add Preprocessor Level Data (QbnAddPreProcessorLevelData) is used to set the level of the preprocessor used to create a module.
- Call Service Program Procedure (QZRUCLSP) allows an unbound call to an ILE procedure exported by a service program.
- Change Program Data (QBNCHGPD) changes data for module, program and service program objects.
- Check Command Syntax (QCMDCHK) performs syntax checking for a single command, and optionally prompts for the command.
- Create Program (QPRCRTPG) converts the symbolic representation of a machine interface (MI) program into a program object.
- End Preprocessor (QbnEndPreProcessor) must be called by every preprocessor after the output source file and preprocessor information is created. It records that a preprocessor was called.
- Execute Command (QCMDEXC) runs a single CL command or can be used to run a command from within a high-level language or CL program.
- Get Export (QleGetExp) allows the caller to resolve a pointer to an export (either data or procedure) either by name or export number. The pointer is materialized for the specified activation.
- Get Export Long (QleGetExpLong) allows the caller to resolve a pointer to an export (either data or procedure) either by name or export number. The pointer is materialized for the specified activation (64 bit version of QleGetExp).
- List ILE Program Information (QBNLPGMI) gives information about Integrated Language Environment * (ILE *) programs, similar to the Display Program (DSPPGM) command.
- List Module Information (QBNLMODI) API lists information about modules similar to the Display Module (DSPMOD) command. The information is placed in a user space specified by you.
- List Service Program Information (QBNLSPGM) gives information about service programs, similar to the Display Service Program (DSPSRVPGM) command.
- Process Commands (QCAPCMD) performs command analyzer processing on command strings.
- Replace Command Exit Program (QCARPLCM) may be used as the exit program for the QIBM_QCA_CHG_COMMAND for any command.
- Retrieve Associated Space (QbnRetrieveAssociatedSpace) retrieves data stored with the QbnAddAssociatedSpaceEntry API.
- Retrieve Command Definition (QCDRCMDD) retrieves information from a CL command (*CMD) object and generates XML (Extensible Markup Language) source statements that describe the command.
- Retrieve Command Information (QCDRCMDI) retrieves information from a command definition object.
- Retrieve Module Information (QBNRMODI) retrieves module information and place it into a single variable in the calling program similar to the information returned using the Display Module (DSPMOD) command. The amount of information returned is limited to the size of the variable.
- Retrieve Program Associated Space (QCLRPGAS) retrieves information from the associated space of a user-state, user-domain program.
- Retrieve Program Information (QCLRPGMI) retrieves program information similar to the Display Program (DSPPGM) command.
- Retrieve Program Interface Information (QBNRPII) retrieves program interface information from modules that are bound into programs or service programs.
- Retrieve Prompt Override (QPTRTVPO) calls the prompt override program for a specified command and returns the prompt override command string from the prompt override program.
- Retrieve Service Program Information (QBNRSPGM) retrieves service program information similar to the information returned using the Display Service Program (DSPSRVPGM) command.
- Retrieve Space User Data (QbnRetrieveSpaceUserData) retrieves data stored with the QbnAddAssociatedSpaceentry API.
- Scan for String Pattern (QCLSCAN) is used to scan a string of characters to see if the string contains a pattern.
- Start Preprocessor (QbnStartPreProcessor) must be called first by every compiler preprocessor that has data to be processed during module creation.
- Store Program Associated Space (QCLSPGAS) stores information in the associated space of a user-state, user-domain program.
- Verify Name (QCAVFYNM, QCAVERIFYNAME) verifies an input value to determine if it is a valid system name.
The program and CL command exit programs are:
- Command Analyzer Change (QIBM_QCA_CHG_COMMAND) is called when the command for which it is registered is processed.
- Command Analyzer Retrieve (QIBM_QCA_RTV_COMMAND) is called when the command for which it is registered is processed.
[ Back to top | APIs by category ]