IBM Version 4 manual Across, Integrated Language Environment, Ile Api

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 91
Image 91

Chapter

4. Common

Information

across

APIs—Advanced

 

 

 

(ILE)

Example

 

 

 

 

 

 

 

 

 

 

Through

the

use of several examples, this chapter provides informatio

 

to

use

more

advanced

or

more complex

API

concepts in

your programs.

 

example

programs

in this

chapter use

ILE

APIs. These

examples are al

 

in additional languages in “Integrated Language Environment (ILE)

 

APIs—Examples”

on

page B-47.

 

 

 

In the examples, the following are focus items:

ŸHeader files

ŸKeyed interfaces

ŸError handling

ŸReceiver variables

For more information about the APIs used in this chapter,System APIrefer to Reference, SC41-5801.

Integrated Language Environment

(ILE)

 

APIs—Introduction

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OS/400 Integrated Language Environment (ILE) APIs are contained

within

se

programs

that

the

 

calling

program

binds to. In addition, some

OS/400

I

provide

a

program

 

interface

for

the original program model (OPM) langua

can

usually

distinguish

between

the

*SRVPGM

interface

and

the

*PGM

inte

the

name

of

the

API.

For example, the registration facility APIs pro

program and

a

service

program entry point (procedure) interface. For

Exit Point API, the service program entry point interface is named

 

QusRegisterExitPoint and the program interface is named QUSRGPT. A bind

procedure

name

can

be

up to 30 characters and mixed uppercase and

A

program

interface name can be up to 8 characters and is all uppe

A

binding

directory is

used

for

OS/400

 

ILE

APIs

 

that

are

contained

grams. A

binding

directory

is

a

list

of

names

of

modules

and

 

service

pro

that provides a reference by name

and

type. Service

programs

that

OS/400 ILE APIs are in

the QUSAPIBD binding directory. This binding di

implicitly

used

by

ILE

compilers

to

resolve

 

the

OS/400

ILE

API

refere

fore, it is not necessary to explicitly name the service program or

directory

when

creating

programs

that

use

OS/400

 

ILE APIs. If you pr

own

 

APIs

with the same name, make sure that you also provide your o

directory

or

service

program.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

All

OS/400

APIs

(ILE

and

non-ILE)

have

a

header

file

supplied

by

OS/40

header

files

reside

in

the

 

optionally

installable

library

 

QSYSINC. The

provide

the prototypes

for

the

API

as

well

as

 

define

any

structure

the API. The QSYSINC library is used

by

the

ILE

C

compiler

to

 

searc

files; therefore, it is not

necessary

 

to

 

specify

a

library

qualifi

that

reside

in the QSYSINC library. When

coding

in ILE C, remember to

the header file name in<) lessand-thangreater( ->than)symbols(

 

because

this

 

 

 

affects

how

the

library

list

is

processed

in

locating

the

header

Copyright IBM Corp. 1997

4-1

Page 91
Image 91
IBM Version 4 manual Across, Integrated Language Environment, Ile Api