PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

%SUBSTR is valid in STRDBG too

View previous topic View next topic Go down

%SUBSTR is valid in STRDBG too

Post  maran on Tue May 28, 2013 10:48 pm

Do you know %SUBSTR is valid in STRDBG too?

If you want to break a program when a variable has a certain value, you can use a conditional break point.

In the following example, the program breaks at statement 555 if variable EMPNAM has the value 'RAM'.

break 555 when EMPNAM = 'RAM'

Suppose you want to stop when part of a field contains a certain value?
The debugger provides a substring function that can accomplish that task. Here's the command to break if the 5th, 6th and 7th characters of EMPNAM are RAJ.

break 555 when %substr(EMPNAM 5 3) = 'RAJ'

Happy debugging!
avatar
maran
Admin

Posts : 442
Join date : 2009-07-24

View user profile http://pmsinformationsystem.forumotion.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum