Home > Ask the AS/400 Experts > iSeries Application Development Questions & Answers > Error occurs during debugging
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

Error occurs during debugging

John Blenkinsop EXPERT RESPONSE FROM: John Blenkinsop

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 21 June 2005
I've made some modifications to an interactive RPG IV program and it compiled fine, but when I started to debug it using STRISDB, all of my modifications did not take place. I got an error message, "this statement xxxx, is not in your program." If I press F11 on a field it displays the message, "this variable does not exist in your program." This happens in my new entries only, the entire old statement works fine. Any advice?

>
There are only a few possible causes for this.

1. You are debugging the 'wrong' version of the program. Either you compiled the new version into the wrong library, or your library list is wrong when you start debugging and you are running an old version of the program, or a restore operation has replaced the new version of the program with a previous version.

Solution: Try to find the new version of the program. Use WRKOBJ *ALLUSR/name_of_program *PGM and see what comes up. If there is more than one object found, be careful in sorting it out, especially if your system has complex version or change control environments. Use DSPPGM to see the creation dates of the objects.

If you can't find the new version, then it is likely that cause number two is the problem.

2. You created the object from your changed source using the CRTRPGMOD command, which creates a *MODULE object from the source, but you did not then use the CRTPGM command to create a *PGM object from the *MODULE object. So, the *PGM object you are running contains the previous version of the module.

Solution: Use the CRTPGM command to create a *PGM object from the *MODULE object. The CRTPGM command takes the modules you specify and binds them together into an executable program. Only a program can be executed; a module cannot be executed. Changing a module does not change any programs that use that module -- those programs MUST be recreated, because they now contain an old copy of the module object.

BUT, If you know that you don't normally use CRTRPGMOD followed by CRTPGM, then you probably usually use CRTBNDRPG to create the module and bind to a program in a single operation. This can fail AFTER creating the *MODULE object successfully. If you rely on the compiler listing, you may see that the compiler has created the module (in QTEMP), but it will tell you that there were errors in the binding stage. Look at the job log, and these errors will be shown.

Binding stage errors occur when symbols required by the program are not found in any of the modules or service programs which are being bound together to make the program. This can happen because the required modules or service programs were not specified in the RPGLE H-specs, or on the CRTBNDRPG or CRTPGM commands, or if the versions of these objects being bound do not contain the required symbols, or if the symbols do not match the types specified in the source.

(A symbol is a procedure or data item that is exported by one module and referenced by another.)

Use DSPPGM on the old version of the *PGM object to see what modules are required. On the first page of the display, it will say something like this:

Program creation information:

                
  Program creation date/time . . . . . . . . . . :   30/01/04  16:22:52 
  Type of program  . . . . . . . . . . . . . . . :   ILE               
  Program entry procedure module . . . . . . . . :   WIRCFLC           
    Library  . . . . . . . . . . . . . . . . . . :     QTEMP           
  Activation group attribute . . . . . . . . . . :   *CALLER           
  Shared activation group  . . . . . . . . . . . :   *NO               
  User profile . . . . . . . . . . . . . . . . . :   *USER             
  Use adopted authority  . . . . . . . . . . . . :   *YES               
  Coded character set identifier . . . . . . . . :   65535             
  Number of modules  . . . . . . . . . . . . . . :   1     

If the library name for the PROGRAM ENTRY PROCEDURE MODULE is QTEMP, then this program was created using CRTBNDRPG. Otherwise it was created using CRTRPGMOD and CRTPGM.

If the number of modules is 1, then no other modules than the program entry procedure module are required. Otherwise, look at the list of modules on following screens to see what other modules are required to be specified on the CRTPGM command (MODULE parameter).

If you continue to have problems with 'symbol not found' messages in the job log, you may need to add service programs to the CRTPGM command (parameter BNDSRVPGM). Again, this information can be seen for the old version using DSPPGM.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Visit the ITKnowledge Exchange and get answers to your developing questions fast.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
iSeries Application Development
Monitoring escape messages and using RCVMSG for diagnostic messages
Listing contents of multiple FTP directories on AS/400
Chain operation error after converting RPG3 to ILE RPG (RPGIV)
Space offset X'0015FF00' or X'0000000000000000' is outside current limit for object QIGC2424C
Searching fields for values
iSeries application display subfiles with other program windows
Searching part of a name or address in AS/400
Passing parameters in an ILE RPG module
What's happening to my subfile?
What happening to my subfile?

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



iSeries Networking - Printing, Remote Access, TCP/IP
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts