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

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

Join the forum, it's quick and easy

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

Get Answers for all your queries on IBM i (AS/400).
PMS Information Systems
Would you like to react to this message? Create an account in a few clicks or log in to continue.

%SUBSTR is valid in STRDBG too

Go down

%SUBSTR is valid in STRDBG too Empty %SUBSTR is valid in STRDBG too

Post  maran 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!
maran
maran
Admin

Posts : 442
Join date : 2009-07-24

https://pmsinformationsystem.forumotion.net

Back to top Go down

Back to top

- Similar topics

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