IBM Version 4 manual Selecting the High-Level Language To Use

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 23
Image 23

Selecting the High-Level Language To Use

You can use APIs with all the languages available on AS/400 business c systems, except for the ILE APIs. ILE APIs that are implemented as grams (*SRVPGM) can be accessed only by ILE languages. In some cases program (*PGM) interface is provided so that non-ILE languages can acce function.

Some APIs also require that particular data types and particular par conventions be used. Figure 2-2 shows the languages available on the AS system and the data types that they provide.

Figure

 

2-2. Language

 

Selection

Considerations — Data

Types

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Excep-

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Float-

 

 

 

 

 

 

 

 

tion

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Poin-

 

 

Binary

 

 

Binary

 

 

Char-

 

Zoned

 

Packed

 

 

ing

 

 

 

Struc-

 

 

Single

 

 

Han-

 

 

 

 

 

 

 

Language

 

 

1

 

 

 

 

 

ters

 

 

2

 

 

4

 

 

acter

 

Decimal

 

Decimal

 

 

Point

 

 

tures

 

 

Array

 

 

dling

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BASIC

(PRPQ

 

 

 

 

 

 

 

X

 

 

X

 

 

 

X

 

 

X2

 

 

X2

 

X

 

 

 

 

 

X

 

 

X

 

 

 

 

 

 

 

5799-FPK)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ILE

C

 

 

 

 

 

 

 

X

 

 

X

 

 

X

 

 

 

X

 

 

 

 

 

X9

 

 

X

 

 

X

 

 

X

 

 

X

 

 

 

 

 

 

 

VisualAge ++C

 

for

 

X

 

 

X

 

 

X

 

 

 

X

 

 

 

 

 

X10

 

X

 

 

X

 

 

X

 

 

X

 

 

 

 

 

 

 

OS/400

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CL

 

 

 

 

 

 

 

 

 

 

 

 

X3

 

 

X3

 

 

 

X

 

 

 

 

 

X

 

 

 

 

 

 

X4

 

X4

 

 

X

 

 

 

 

 

 

 

ILE

CL

 

 

 

 

 

 

 

X5

 

 

X3

 

 

X3

 

 

 

X

 

 

 

 

 

X

 

 

 

 

 

 

X4

 

X4

 

 

X

 

 

 

 

 

 

 

COBOL

 

 

 

 

 

 

 

 

X

 

 

X

 

 

X

 

 

 

X

 

 

X

 

 

X

 

 

 

 

 

 

X

 

 

X

 

 

X6

 

 

 

 

 

 

 

ILE

COBOL

 

 

 

 

 

X

 

 

X

 

 

X

 

 

 

X

 

 

X

 

 

X

 

 

 

 

 

 

X

 

 

X

 

 

X6

 

 

 

 

 

 

 

MI

 

 

 

 

 

 

 

 

 

X

 

 

X

 

 

X

 

 

 

X

 

 

X

 

 

X

 

 

X

 

 

X

 

 

X

 

 

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Pascal

(PRPQ

 

 

 

X

 

 

X

 

 

X

 

 

 

X

 

 

X7

 

 

X7

 

 

X

 

 

X

 

 

X

 

 

X

 

 

 

 

 

 

 

5799-FRJ)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PL/I

(PRPQ

 

 

 

 

X

 

 

X

 

 

X

 

 

 

X

 

 

X

 

 

X

 

 

X

 

 

X

 

 

X

 

 

X

 

 

 

 

 

 

 

5799-FPJ)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

REXX

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

 

 

 

 

 

 

 

 

 

 

X4

 

X4

 

 

X

 

 

 

 

 

 

 

RPG

 

 

 

 

 

 

 

 

 

 

 

 

X

 

 

X

 

 

 

X

 

 

X

 

 

X

 

 

 

 

 

 

X

 

 

X

 

 

X8

 

 

 

 

 

 

 

ILE

RPG

 

 

 

 

 

 

X

 

 

X

 

 

X

 

 

 

X

 

 

X

 

 

X

 

 

 

 

 

 

X

 

 

X

 

 

X8

 

 

 

 

 

 

 

Notes:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

You

cannot

 

develop

 

Cross

System Product

(CSP)

programs

 

on

an

AS/400

system. However,

you

can

 

develop

CSP

pro

 

grams

on

a

System/370

system

and

run them on your AS/400 system.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2

Refer

to

the

CNVRT$

intrinsic

function.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

There

 

is

no direct

 

support,

but

 

the

%BIN

function

 

exists

on the

Change

Variable (CHGVAR)

CL

command

 

to

 

from

 

binary.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4

There

 

is

 

no

direct

 

support,

but

 

you can use the substring capability to simulate

structures and

arr

5

There

 

is

 

no

direct

 

support,

but

 

pointers

 

passed to a

CL

program

are preserved.

 

 

 

 

 

 

 

 

6

COBOL

 

and

 

ILE

COBOL

 

programs

cannot

monitor

for

specific

messages,

but

these

programs

can

define

an

er

 

run

when

a

program

 

ends

because

 

of an error.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7

There is no direct support,

but

 

you

can

 

use

extended

program

model

(EPM)

conversion

routines

to

convert

 

zoned

 

and

 

packed

decimal.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8

RPG

programs

 

cannot

 

monitor

for

specific messages, but these programs

turn

on

an

error

indicator

when

a

 

ends

 

with

an

error. These

programs

 

can

define

an

error

handler

to

 

run

when

a

program

ends

because

o

9

Packed

decimal

is

implemented

in

ILE C with the decimal() data type.

 

 

 

 

 

 

 

 

 

 

 

 

 

10

Packed

decimal

is

 

implemented

in

VisualAge++ for

OS/400C

with

 

the

Binary

Coded

Decimal

(BCD)

class. The

BCD

class

 

the C++ implementation of the

C-language's decimal(). The BCD object can be used in

API

 

calls

because

 

patible

with

the

decimal()

data

type.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Chapter 2. Getting Started with2-3APIs

Page 23
Image 23
IBM Version 4 manual Selecting the High-Level Language To Use, Language Selection Considerations Data Types