Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems using STRDBG

528 views
Skip to first unread message

nba...@hotmail.com

unread,
Mar 28, 1999, 3:00:00 AM3/28/99
to
hi all
I would like to debug using the command SRTDBG.

1- The Mode was changed to *ALL. How is it possible to determine the mode I am
in?

2- I executed STRDBG and get the message: MCH2401. Function Check MCH2401
unmonitored by QTECNTDB at statement *N, instruction X '0132'.
QTECNTDB is the CPP for STRDBG

The STRDBG was executed with a *PGMR profile (no problem with *QSECOFR
profile)

Can someone tell me what's wrong. What haven't I done to make it work?

Thanks for any help

nba67

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Charles R. Pence

unread,
Mar 29, 1999, 3:00:00 AM3/29/99
to
nba...@hotmail.com wrote:

> <<SNIP>>


> 2- I executed STRDBG and get the message: MCH2401. Function Check MCH2401

> unmonitored by QTECNTDB at statement *N, instruction X '0132'.QTECNTDB is the
> CPP for STRDBG <<SNIP>>

This request shoud instead effect CPD0039 followed by the command failure escape
msg. This command will effect the condition you see, if someone has change the
copy of the command STRDBG you are using to have MODE(*DEBUG).
Issue the following request to investigate:

? CHGCMD ?-CMD(QTEMP/STRDBG) ?-PGM(*SAME) ?-VLDCKR(*SAME) ?-ALLOW(*SAME)

You should see the following <noting that if *DEBUG and/or *SERVICE is found,
remove them by blanking them and then press Enter to effect the CHGCMD request>:

Change Command (CHGCMD)

Type choices, press Enter.

Mode in which valid . . . . . . MODE *PROD___
+ for more values ________

Regards, Chuck
All comments provided "as is" with no warranties of any kind whatsoever.

Charles R. Pence

unread,
Mar 29, 1999, 3:00:00 AM3/29/99
to
> ? CHGCMD ?-CMD(QTEMP/STRDBG) ?-PGM(*SAME) ?-VLDCKR(*SAME) ?-ALLOW(*SAME)

To prevent my accidentally changing my copy in QSYS... I was using QTEMP for my
example; likely you are using a copy in QSYS, so the CMD parm should be
(QSYS/STRDBG) instead. Sorry.Regards, Chuck

Bob Utyushev

unread,
Mar 30, 1999, 3:00:00 AM3/30/99
to

nba...@hotmail.com wrote:

> hi all
> I would like to debug using the command SRTDBG.
>
> 1- The Mode was changed to *ALL. How is it possible to determine the mode I am
> in?
>

> 2- I executed STRDBG and get the message: MCH2401. Function Check MCH2401
> unmonitored by QTECNTDB at statement *N, instruction X '0132'.
> QTECNTDB is the CPP for STRDBG
>

> The STRDBG was executed with a *PGMR profile (no problem with *QSECOFR
> profile)
>
> Can someone tell me what's wrong. What haven't I done to make it work?
>
> Thanks for any help
>
> nba67
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

To use any program in a debug mode you must have *CHANGE authority to the program
and be owner to trace one.

--
Bob Utyushev
mailto:bo...@usa.net --- ICQ #2507552, nickname: Whisper

Ian Stewart

unread,
Mar 30, 1999, 3:00:00 AM3/30/99
to nba...@hotmail.com
nba...@hotmail.com wrote:

> hi all
> I would like to debug using the command SRTDBG.

That's STRDBG, I presume ...

> 1- The Mode was changed to *ALL. How is it possible to determine the mode I am
> in?

I take it you did a CHGCMD on STRDBG and changed the MODE attribute to *ALL.
Don't do that. Change it back to *PROD immediately. In general, it's not a good
idea to mess with system supplied objects unless you know exactly what you're
doing.

> 2- I executed STRDBG and get the message: MCH2401. Function Check MCH2401
> unmonitored by QTECNTDB at statement *N, instruction X '0132'.
> QTECNTDB is the CPP for STRDBG

That's because it obviously relies on the MODE attribute to prevent you from
executing it twice. You've defeated that and it's tripped up over something
because it didn't anticipate what you've done.

> The STRDBG was executed with a *PGMR profile (no problem with *QSECOFR
> profile)

You'd probably have the same difficulty with the QSECOFR profile if you ran it
while already in debug mode. You might however have to grant explicit authority
to use the STRDBG command to the user profile you're using. I'd suggest doing it
under a programmer level profile rather than QSECOFR unless absolutely necessary.

> Can someone tell me what's wrong. What haven't I done to make it work?

Apart from the above comments, you haven't provided quite enough information to be
sure ... but in general:

a) Compile your program with the appropriate level of debug information. For OPM
programs, OPTION(*SRCDBG) will enable source level debugging, which is desirable
in most cases. For ILE, DBGVIEW(*SOURCE) could be a good choice.

b) BEFORE executing your program(s), enter debug mode with the STRDBG command.
Name the programs that you want to debug. If you are debugging and OPM program
and want source level debugging don't forget to specify OPMSRC(*YES).

c) Set any necessary breakpoints. If using source level debugging, you can do
this interactively. If not, you will be back at the command line at this point,
use the ADDBKP command.

d) If source level debugging is active, you will need to press F12 to exit from
the source display back to the command line. (You can get back to it with the
DSPMODSRC command if necessary.)

e) Call your program in the normal manner.

f) Debugger will be automatically invoked by executing to a breakpoint, and by
unmonitored exceptions etc.

g) When you've completed your debugging session, exit debug mode with ENDDBG (or
simply sign off).

That's the basic process, I'd suggest reading the manual for more details.

... hope this helps

-Ian.

--
Ian Stewart
i...@incognito.co.nz

Ernesto Ferracin II

unread,
Mar 30, 1999, 3:00:00 AM3/30/99
to

nba...@hotmail.com wrote:
>
> hi all
> I would like to debug using the command SRTDBG.
>

If you can use STRISDB (Interactive Debug); it's better and more user friendly.

Ernesto.

river.con.vcf

Nicholas Bridge

unread,
Apr 1, 1999, 3:00:00 AM4/1/99
to
I cannot verify this from here, but I believe that MCH2401 is a domain
violation.
I think this is caused by the command being changed: if a command is
modifyed is certain ways, it loses it's "system state" attribute that is
required to execute "system domain" programs, such as QTECNTDB.
Check that the version of STRDBG being used is in QSYS.
If it is not, it is probably best to delete this erroneous version.
If it is, you will need to load the command from a backup.

If MCH2401 is not the domain violation exception, then please ignore
everything above <G>

Regards,

Nick B.


nba...@hotmail.com wrote:
>
> hi all
> I would like to debug using the command SRTDBG.
>

> 1- The Mode was changed to *ALL. How is it possible to determine the mode I am
> in?
>

> 2- I executed STRDBG and get the message: MCH2401. Function Check MCH2401
> unmonitored by QTECNTDB at statement *N, instruction X '0132'.
> QTECNTDB is the CPP for STRDBG
>

> The STRDBG was executed with a *PGMR profile (no problem with *QSECOFR
> profile)
>

> Can someone tell me what's wrong. What haven't I done to make it work?
>

Ian Stewart

unread,
Apr 1, 1999, 3:00:00 AM4/1/99
to
Ernesto Ferracin II wrote:

> If you can use STRISDB (Interactive Debug); it's better and more user friendly.

Not if you're trying to debug ILE programs, it isn't (it simply won't!) I'd
suggest learning the standard debugger first, as STRISDB isn't future (or even
present) proof.

--
Ian Stewart
i...@incognito.co.nz

boo...@ibm.net

unread,
Apr 1, 1999, 3:00:00 AM4/1/99
to
Add these 3 options to your QAUOOPTfile (That'd be F16 from a PDM screen)

I1 ? strisdb pgm(&n) updprod(*yes) invpgm(*cmd)
I2 strisdb pgm(&N) updprod(*yes)
I3 strDBG pgm(&L/&N) updprod(*yes)

Compile the ILE program with *list. Put an I3 on the option line.

In <37027882...@incognito.co.nz>, on 04/01/99

at 07:33 AM, Ian Stewart <i...@incognito.co.nz> said:

>Ernesto Ferracin II wrote:

>> If you can use STRISDB (Interactive Debug); it's better and more user friendly.

>Not if you're trying to debug ILE programs, it isn't (it simply won't!)
>I'd suggest learning the standard debugger first, as STRISDB isn't future
>(or even present) proof.

>--
--
-----------------------------------------------------------
boo...@ibm.net
Booth Martin
-----------------------------------------------------------


Thomas

unread,
Apr 2, 1999, 3:00:00 AM4/2/99
to
Ernesto:

STRISDB also hasn't been significantly updated since V3R1 and probably won't
be in the future. There's much that it can't do and little that it can do
that STRDBG can't. I wouldn't be surprised to see it dropped by IBM in some
future release. It just has no long-term value anymore.

If there are "user friendly" issues with STRDBG, then IBM should be notified
by using the various comment forms or other means. Work for improvements that
you'd like to see. Otherwise, if STRISDB goes away or quits working for you
in your environment, you'll have no replacement that you like.

Tom Liotta

In article <37013AE3...@bcs.org.uk>,


rive...@bcs.org.uk wrote:
>
> nba...@hotmail.com wrote:
> >
> > hi all
> > I would like to debug using the command SRTDBG.
> >

> If you can use STRISDB (Interactive Debug); it's better and more user
friendly.
>

> Ernesto.
>
Tom Liotta
AS/400 systems programmer

0 new messages