Example of Setting a Watch Condition

Example of Setting a Watch Condition

In this example, you watchSALARYa variablein programMYLIB/PAYROLL. To set the watch condition, type:

WATCH SALARY

on a debug line, accepting the default value for the watch-length.

If the value of theSALARYvariablechanges subsequently, the application stops a

theDisplay Module Sourcedisplay is shown, as illustrated in Figure 91.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Display Module Source

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Program:

PAYROL

Library:

MYLIB

Module:

PAYROLL

 

 

 

52

C

 

 

eval

cnt = 1

 

 

 

 

 

 

53

C

 

 

dow

(cnt < EMPMAX)

 

 

 

 

 

54

C

 

 

eval

Pay_exmpt(cnt) = eflag(cnt)

 

 

 

55

C

 

 

eval

cnt = cnt + 1

 

 

 

 

 

 

56

C

 

 

enddo

 

 

 

 

 

 

 

57

C

 

 

 

 

 

 

 

 

 

 

58

C

 

 

eval

index = 1

 

 

 

 

 

 

59

C

 

 

dow

index <= cnt

 

 

 

 

 

 

60

C

 

 

if

Pay_exmpt(index) = 1

 

 

 

 

 

61

C

 

 

eval

SALARY = 40 * Pay_wage(index)

 

 

 

62

C

 

 

eval

numexmpt = numexmpt + 1

 

 

 

63

C

 

 

else

 

 

 

 

 

 

 

64

C

 

 

eval

SALARY = Pay_hours(index)*Pay_wage(index)

 

 

 

65

C

 

 

endif

 

 

 

 

 

 

 

66

C

 

 

eval

index = index + 1

 

 

 

 

 

67

C

 

 

enddo

 

 

More...

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Debug . . .

 

_________________________________________________________________

 

 

 

 

_______________________________________________________________________________

 

 

 

 

 

F3=End program F6=Add/Clear breakpoint F10=Step

F11=Display variable

 

 

 

 

F12=Resume

 

 

F17=Watch variable

F18=Work with watch

F24=More keys

 

 

 

ˆ Watch number

1 at line 65, variable: SALARY

 

˜

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure

91.

 

Example of Message Stating WATCH was Successfully Set

¹The line number of the statement where the change to the watch detected is highlighted. This is typically thefollowingfirstheexecutable

statement that changed the variable.

¹ A message indicates that the watch condition was satisfied.

Note: If

a text view

is not

available,Display Module aSourceblank

display

is

shown, with the

same

message as above

in the message ar

The following programs cannot be added to the ILE debug env

1. ILE programs without debug data

2. OPM programs with non-source debug data only

3. OPM programs without debug data

In the first two cases,

the

stopped

statement

number

is

passed.

I

the stopped

MI instruction is

passed.

The information

is

displayed

a

a blankDisplay Module Source

display as shown below. Instead

of the

line

number, the

statement or

the

instruction

number is

given.

 

 

Chapter 11. Debugging Programs193

Page 217
Image 217
IBM AS/400 manual Example of Setting a Watch Condition, BlankDisplay Module Source, Display as shown below. Instead

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.