IBM Version 4 manual UNIX-Type APIs, Environment Variable APIs, Getenv

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 197
Image 197

The CD-ROM premastering APIs could be used if

you

 

currently

produce

systems

license

option

 

(DSLO)

distribution

tapes

at a central site. I

like to distribute on CD-ROM rather than tape,

you

 

would

use

the

 

CD-

mastering

APIs.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

You

would

use

the Handle CD-ROM Premastering State

(QlpHandleCdState

or

QLPCDRST)

API

to

place

your job

into a CD-ROM premastering state. While

this state, any save operations performed will

have

information

about

sizes

stored

away for

future use

in generating

the QDSETMAP

file. In

a SAVSYS or option 40

(Create

 

Distribution

Tape)

on the Work with Lice

grams menu, special files are saved to tape so that the

CD-ROM

volume

produced

can

be

used

for

installation.

 

 

 

 

 

 

 

 

 

When

the

save

operations

have

been

performed,

you

would

then

use

t

CD-ROM Premastering Information (QlpGenerateCdPremasteringInfo or

 

 

 

 

QLPCDINF) API. This API is used

to

analyze

the

tape

file

size

informa

away

during

the

 

previous

API

and produce a byte-stream

file

that

c

tion about which CD-ROM volumes these files will reside on. Information

returned

into

a

user

 

space

that

is

useful in

producing

a

mastering

may

be

necessary

when

having

the

CD-ROMs

mastered.

 

 

 

 

 

 

UNIX-Type APIs

The UNIX-type APIs

are intended for experienced UNIX programmers

do either of the

following:

Ÿ Create new application programs that run on the AS/400

ŸCreate an AS/400 version of existing application programs that run on UNIX-based systems

The UNIX-type APIs consist of the following groups.

Environment Variable APIs

Environment variables are character strings name=valueof the formthat are

stored in an environment space outside of the program. The strings ar temporary space associated with the job.

Environment

variables

can be set

usingputenv()theorQp0zPutEnv()

function.

They

can

be

retrieved getenv()using theorQp0zGetEnv()

function. Theputenv()

and getenv()

functions

are designed to meet the

X/Open** single UNIX s

tion

(formerly

Spec

1170)Qp0zPutEnv(). The

andQp0zGetEnv()

functions are

AS/400 extensions to the industry-standard APIs. They provide the addit

capability

to store or retrieve a coded character set identifier

with

the

string.

 

 

 

 

 

 

 

 

 

After

environment variables

are set, they exist

for

the duration

of

no

way

to

remove an environment variable. However,

the

value can be s

NULL

 

by

using

a

subsequent putenv()call

toQp0zPutEnv()r

and specifying

a

 

value

of

NULL.

 

 

 

 

 

 

 

 

 

 

The

OS/400

support

for

environment

variables

does

differ from

the

usua

of

environment

variables

on

UNIX

systems:

 

 

 

 

 

ŸThere is no default On the AS/400, theenviron

set of environment variables provided when a array, which points to the environment variable

Chapter 8. Use of OS/400 8APIs-21

Page 197
Image 197
IBM Version 4 manual UNIX-Type APIs, Environment Variable APIs, Getenv