Debugging JDE online programs

slandess

slandess

Well Known Member
Debugging Online JDE programs using IBM’s STRISDB command instead of JDEDBG

I prefer to use IBM’s STRISDB (Start Interactive Source Debugger) command to debug JDE programs, instead of using the JDEDBG command supplied by JDE.

Reason:

You CANNOT single-step thru a program while using the JDEDBG command like you can by using function key F5 within STRISDB.

Description of the Problem:

If you attempt to use the STRISDB command to debug an online JDE program from the JDE menu command line OR from an AS/400 command line like this:

STRISDB PGM(P4211) UPDPROD(*YES) INVPGM(*CMD) CMD(CALL PGM(J4211) PARM(P4211 ZJDE0001))

You will receive the following message (partial screen shot below):

---------------------------------------------------------------------------
| 00AUT Security Violation
|
|
|
|Unauthorized access to Licensed Software!
|
|Please contact:
|
| J.D. Edwards and Company 8055 E. Tufts Avenue Denver, Colorado 80237
|
| (303) 488-4000
|
---------------------------------------------------------------------------

This error is indicated because of the security feature that is built into the subroutine (C00SC) that retrieves the soft coding information in the program.

C00SC calls X00SC, which checks to see if the value in the data area VTTL@ (which comes from the QTEMP library for the current interactive job) is blank. If so, it sets an error flag and displays the “Unauthorized” message.


Background information:

When running a program like P4211 normally, as from a JDE menu selection, the P00MENU program takes the description of the menu option and places it into the VTTL@ data area in the QTEMP library PRIOR to calling the J4211 program. Consequently, you will see the description that appears on the menu as the title on the program video, regardless of what is specified in the vocabulary overrides as the title for the screen.

If you try to STRISDB from the JDE menu command line or from an AS/400 command line, the VTLL@ data area is blank and you will receive the message shown in the screenshot above.

Solution:

In order to avoid the “Unauthorized” message and debug the program, you must make sure that VTTL@ has a value in it prior to executing the STRISDB command.

Method 1: Given that you have AS/400 command line authority, you can simply select hidden selection number 33 (Display Submitted Jobs).

From command line on this panel, you can prompt the STRISDB command and it will allow you to successfully debug the program.

Reason: When you select option 33 on the JDE menu, a default value of ‘X *DEFAULT ' is placed into the VTTL@ data area. Since this is definitely NOT blank, the X00SC program will not prompt you with the “Unauthorized” screen.


Method 2: Given that you have AS/400 command line authority, from the JDE menu command line, type the command:

CALL QCMD

This will put you on the AS/400 Command Entry Display. Then type the command:

CHGDTAARA DTAARA(VTTL@) VALUE('X')

Now VTTL@ has a value in it, and you can successfully STRISDB on the program.

Method 3: You can write a custom command (like I did, called JDESRCDBG), which does all this behind the scenes. This command will allow debugging of JDE online programs from any command line.
If anybody expresses interest (send me a private message), I will post a copy of the source & objects for my JDESRCDBG command on the Download forum.
 
I use the STRISDB all of the time and I do not have to do anything funky to
get it to work.
FYI When you get that Security Violation screen, just press enter and you
should get to this screen:

.............................................................
: Program Termination :
: :
: The program you were debugging has :
: completed execution. :
: :
: You can choose to END ISDB/400 now, :
: or restart your program. :
: :
: Action . . . . . . . 2 1=End ISDB/400 :
: 2=Restart program :
: :
:...........................................................:

Just press enter again and you should be able to get into the program. For
the most part the Security Violation is a soft error. The only time that I
have any trouble using the STRISDB command is when I am trying to use it on
a batch program. Within the CL JDE has a program check for seeing if your
JOBTYPE = 1, meaning interactive, the program will then exit the program.
We change the CL by commenting out this check so we can run it
interactively.

I hope this helps you some.
Jim
 
Method 4:

Change the following code from the CL part of the program
/* --------- Retrieve job name and submitting message queue. ------- */
/* */
RTVJOBA JOB(&JOBID) SBMMSGQ(&PSMSGQ) TYPE(&JOBTYPE)
IF COND(&JOBTYPE = '1') THEN(DO)
SNDPGMMSG MSGID(JDE9991) MSGF(QJDEMSG) MSGDTA('J42522') +
TOPGMQ(*EXT)
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
GOTO EOJ
ENDDO
/* */


to be

/* --------- Retrieve job name and submitting message queue. ------- */
/* */
RTVJOBA JOB(&JOBID) SBMMSGQ(&PSMSGQ) TYPE(&JOBTYPE)
/* IF COND(&JOBTYPE = '1') THEN(DO) */
/* SNDPGMMSG MSGID(JDE9991) MSGF(QJDEMSG) MSGDTA('J42522') +*/
/* TOPGMQ(*EXT) */
/* MONMSG MSGID(CPF0000 CPC0000 CPD0000) */
/* GOTO EOJ */
/* ENDDO */
/* */

Then recompile.
Run STRISDB as per normal.


Scott Parker
Grote Industries, LLC
mailto:[email protected]





Scott Parker
Grote Industries, LLC.
WorldSoftware Version 8.1.2 AS/400 V5R1
 
Or you can use another method which would be to F4 to recall the STRISDB
command after you get the "Unauthorized" error and press enter. This
would then allow the program to run and the VTTL@ field would be filled
in.




Jill Fralick
ABB Flexible Automation
Auburn Hills, MI 48313
A7.3 cum 10
(248) 391-8618
 
Back
Top