Changing

the Value

of

Fields

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Use

the

 

%VARS

debug built-in function when the

variable

name

conflicts

 

 

 

of

the

debug

command names. For example, EVAL %VAR(EVAL) can be used to

 

 

 

evaluate

a

variable

named

EVAL,

whereas

EVAL

EVAL

would

be

a syntax

err

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Changing

the

Value

of

Fields

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

You

can

change

the

value

of fields by

using

the

EVAL

command

with

an

 

 

 

ment

operator

(=).

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The

scope

of

the

fields

used

in the

EVAL command is defined by usin

 

 

 

command. However, you do not need to specifically define the scope o

 

 

 

contained

in

an

ILE

RPG module

because

they

are

all

of

global scope.

To change the value of the field, type:

EVAL field-name = value

on the debug command fieldne.-nameis the name

of

the variable that you w

to change andvalue is an

identifier,

literal,

or

constant value that you w

assign to variablefield-name.

For

example,

 

 

 

EVAL COUNTER=3

 

 

 

 

 

changes the valueCOUNTERof

to

3 and

shows

 

 

COUNTER=3 = 3

 

 

 

 

 

on the message line of the Display Module Source display.

Use the EVAL debug command to assign numeric, alphabetic, and alphanumer data to fields. You can also use the %SUBSTR built-in function in the expression.

When you assign values to a character field, the following rules apply

¹If the length of the source expression is less than the length of expression, then the data is left justified in the target express

remaining positions are filled with blanks.

¹If the length of the source expression is greater than the length

expression, then

the

data is left justified in the target express

to the length of

the

target expression.

Note: Graphic fields can be assigned any of the following:

¹

Another graphic

field

 

 

¹

A

graphic literal of

'theoK1K2iform'

G

¹

A

hexadecimal

literal

of 'hexthe

digitsform' X

UCS-2 fields must be changed using hexadecimal constants. For example,

%UCS2('AB') = U'00410042', then to set

a

UCS-2 field to the

UCS-2

form

the debugger, you would use EVAL ucs2 = X'00410042'.

 

 

Variable-length fields can be assigned

using, for example, EVAL varfldna

'abc'. This sets the data part of

the field

to 'abc' and

the

lengt

length part without changing the data,

determine

the hexadecimal

value

length (for example 11 is X'000B'), and

use EVAL

%SUBSTR(varfldname 1 2)

X'000B'.

 

 

 

 

 

208 ILE RPG for AS/400 Programmer's Guide

Page 232
Image 232
IBM AS/400 manual Fields

AS/400 specifications

The IBM AS/400, now known as the IBM iSeries, is a midrange computer system that has been a cornerstone of enterprise computing since its introduction in 1988. Designed to provide a robust platform for business applications, the AS/400 is celebrated for its reliability, scalability, and integrated database capabilities.

One of the key features of the AS/400 is its Integrated Operating Environment, which blends hardware and software resources seamlessly. This integration allows businesses to execute diverse workloads, ranging from traditional applications to modern web-based services, all on a single platform. The operating system, OS/400 (now IBM i), offers a rich set of APIs and tools for developers, simplifying application development and management.

Another standout characteristic of the AS/400 is its built-in database, DB2 for i. This powerful relational database management system allows for efficient data handling and provides advanced features such as support for SQL, XML, and JSON, making it easier for businesses to manage their data and integrate it with other systems. The database's tight integration with the operating system enables high performance and security.

In terms of scalability, the AS/400 can accommodate small businesses as well as large enterprises, with the ability to support hundreds of users simultaneously. Its architecture allows for easy upgrades in hardware, meaning that organizations can scale their systems without replacing the entire infrastructure.

Security is another critical attribute of the AS/400. With a sophisticated security model, it offers built-in user authentication, access control, encryption, and auditing capabilities to protect data and applications from unauthorized access.

The AS/400 also supports multiple programming languages, including RPG, COBOL, Java, and PHP, giving organizations the flexibility to choose the development tools that best fit their needs. This diversity helps maintain legacy applications while also developing new ones that leverage modern technologies.

Moreover, the platform supports both traditional green-screen interfaces and modern graphical user interfaces, allowing organizations to transition smoothly into contemporary user experience paradigms.

Overall, the IBM AS/400 stands out as a resilient, flexible, and secure computing platform that enables organizations to effectively manage their business operations, streamline processes, and adapt to changing market demands. Its unique combination of integrated features and capabilities ensures that it remains relevant in today's fast-paced technology landscape.