IBM Version 4 Integrated File System APIs, Interprocess Communication APIs, Has Exec Function

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 198
Image 198

strings, is NULL (not initialized) until environment variables are assoc the job.

ŸOn a UNIX system, the exec() function creates a new process and environment variables of the original process to the new process. Alth

 

AS/400

has

no

exec()

function,

environment arevariablextendeds

to

a

new

 

 

job

created using the Submit Job (SBMJOB) command, provided the fi

 

has

environment

variables.

 

 

 

 

 

 

 

 

 

 

 

 

 

To

help

alleviate these differences, OS/400 provides

several

nonstandard

that can be

used

to

establish

a

default

set

of

environment

variables.

Ÿ

The

Add

Environment

 

Variable

(ADDENVVAR)

CL

command

can

be

used

to

 

 

set

an

environment

 

variable

for

a

job. Further,

a

CL

program

can

be

 

using

the

ADDENVVAR

command

that

sets

several

environment

variables

for

 

job. Alternatively,putenv()the orQp0zPutEnv()

 

function

can

be

used

in

a

 

 

similar

manner

in

a

C

program.

 

 

 

 

 

 

 

 

 

 

 

 

ŸOther environment variable CL commands, Change Environment Variable (CHGENVVAR) and Work with Environment Variables (WRKENVVAR), or C functions can be used to change or retrieve environment variables fo

Integrated File System APIs

The integrated file system is a part of OS/400 that supports stream i storage management similar to personal computer and UNIX operating syste

The stream file support is designed for efficient use in client/serve Stream files are particularly well suited for storing strings of data documents, images, audio, and video.

The integrated file system provides a hierarchical directory structure UNIX-based open system standards, such as POSIX** and XPG. This file a directory structure provides the users of PC operating systems with a ronment. The integrated file system takes better advantage of the grap interface.

In addition to providing a common interface for users and application t stream files, the integrated file system also provides access to dat ments and other objects stored on the AS/400.

The integrated file system APIs can perform operations on directories, related objects in the file systems accessed through the integrated

face. For more information about the integrated fileIntegratsys em,d seeFil the System Introductionbook, SC41-5711.

Interprocess Communication APIs

Interprocess communication (IPC) on the AS/400 is made up of three serv message queues, semaphores, and shared memory. The basic purpose of t services is to provide OS/400 processes with a way to communicate with other through a set of standardized APIs. These C-language functions ar on the definitions in the X/Open single UNIX specification (formerly Sp

Message

queues

provide

a form of

message

passing in which any process

that

it

has

the necessary permissions) can

read

a message

from

or wr

message

to

any message queue on the system. There are

no

requirements

process

be

waiting to

receive a

message

from a

queue

before

anothe

8-22System API Programming V4R1

Page 198
Image 198
IBM Version 4 manual Integrated File System APIs, Interprocess Communication APIs, Has Exec Function, Queues