IBM AS/400 manual Specifying Function Key Indicators on Display Device Files

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 358
Image 358

Using Externally Described WORKSTN Files

Specifying Function Key Indicators on Display Device Files

The function key indicators, KA through KN and KP through KY are valid f program that contains a display device WORKSTN file if the associated key is specified in the DDS.

The function key indicators relate to the function keys as follows: fun cator KA corresponds to function key 1, KB to function key 2 ... KX 23, and KY to function key 24.

Function

keys

 

are

specified in the DDS with the CFxx (command function)

(command

attention)

keyword.

 

For

example,

the

keyword

CF01

allows

function

1 to be

used.

When

you

 

press function

key

1,

function key

indicator

the

RPG

 

program.

If you specify the function key as CF01 (99), both

indicator

KA

and

indicator

 

99 are set on in the RPG program. If the

user

presses

a

function key that is not

specified

in

the DDS,

the

O

informs

the

user

that

an

incorrect

key

was

pressed.

 

 

 

 

If the work-station user

presses a specified function key, the assoc

key

indicator

in

the

RPG

program is set on when fields are extracted

record

(move

fields

logic)

and

all other

function

key

indicators

are

s

tion

key

is

 

not

pressed, all function key indicators are set off at

The

function

 

key

indicators

are

set

off

if

the

user

presses

 

the

Ent

Specifying Command Keys

on

Display

Device

Files

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

You can specify the command

keys

Help,

Roll

Up,

Roll

Down,

Print,

Clear,

Home

in

the

DDS

for a display device file with the

keywords HELP,

 

RO

ROLLDOWN, PRINT, CLEAR, and HOME.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Command

 

keys

are

processed

by

an

RPG program

whenever

the

compiler

pro

esses

 

a

READ

or

an EXFMT operation on a record format for which the

keywords are specified in the DDS. When the command

keys

are

in

eff

command

key

is

pressed,

the

OS/400 system

returns

control

to

the

RPG

 

pr

If

a

response

indicator

is

specified

in

the

DDS

for

the

command

sel

cator

 

is

set

on

and all other response indicators

that

are

in

effect

format

and

the

file

are

set off.

 

 

 

 

 

 

 

 

 

 

 

 

 

If

a

response

indicator

is

not

specified

in

the DDS

 

for

a

command

ke

happens:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

¹

For

 

the

Print

key

without

*PGM

specified,

the

print

function

is proce

¹

For

 

the

Roll

Up

and

Roll

Down keys used with subfiles,

the

display

 

rolls up or down, within the subfile. If you try

to roll

beyond

t

 

subfile,

you

get

a

run-time

error.

 

 

 

 

 

 

 

 

 

 

 

 

 

¹For the Print Key specified with *PGM, Roll Up and Roll Down keys us without subfiles, and for the Clear, Help, and Home keys, one of t values 1121-1126 is set, respectively, and processing continues.

334 ILE RPG for AS/400 Programmer's Guide

Page 358
Image 358
IBM AS/400 manual Specifying Function Key Indicators on Display Device Files, Using Externally Described WORKSTN Files