support: Customer Portal
Focused on delivering choice, investment protection and flexibility to organizations with valuable COBOL assets
 

Veryant Knowledge Base
Home > All Categories > Debugging > Why do I get "File not valid" when I run the debugger?
Question Title Why do I get "File not valid" when I run the debugger?
Question:

Say I have the following structure:
/top/src/myprog.cbl
/top/cpy/mycpy.def
/top/obj/
the obj directory is where I want my class files to go, and myprog.cbl has COPY "mycpy.def"

Suppose I compile from the top directory with: 

iscc -sp=cpy -od=obj src/myprog.cbl 

When I try to debug the program from the obj directory with "isrun -d MYPROG" the debugger reports the "File not valid" error even if "iscobol.debug_code_prefix=src;cpy" or "iscobol.debug_code_prefix=/top/src;/top/cpy" and even if CLASSPATH has ";src;cpy" or ";/top/src;/top/cpy"

Answer:

This is because you compiled with "-sp=cpy" and the debugger searches each of the directories in CLASSPATH and iscobol.debug_code_prefix for "cpy/mycpy.def" not for "mycpy.def"

There are two ways to eliminate this error:
  1. Specify the full path to your copybook directories in the -sp value
  2. Add the path of the parent directory to CLASSPATH or iscobol.debug_code_prefix
Note that with option 2 you do NOT add the copy directories themselves to the CLASSPATH or iscobol.debug_code_prefix. Instead, you add the absolute or relative path of the parent directory.

In the above example, the debugger searches for "cpy/mycpy.def" so you would add "/top" to CLASSPATH or iscobol.debug_code_prefix. The debugger will search for "cpy/mycpy.def" in "/top", thus "/top/cpy/mycpy.def" and will then be able to find the file.
Authored by: Veryant Support This question has been viewed 4429 times so far.
Click Here to View all the questions in Debugging category.
File Attachments File Attachments
There are no attachment file(s) related to this question.
How helpful was this article to you?
User Comments User Comments Add Comment
There are no user comments for this question. Be the first to post a comment. Click Here
Related Questions Related Questions
  1. How do I set things up to remote debug just one program when the server executes it?
  2. How do I configure the debugger to find source code that is not in CLASSPATH?
  3. Starting a new trace log file for the current run unit
  4. How do I specify isCOBOL, Java or application properties on the command line?
  5. How to tell the Debugger to pause with a different key than the Pause key?
  6. Did you know how to show variables in Debugger using a tree structure?
  7. Did you know you can see the content of variables while debugging?
Article Information Additional Information
Article Number: 76
Created: 2009-09-02 1:00 PM
Rating: No Rating
 
Article Options Article Options
Print Question Print this Question
Email Question Email Question to Friend
Export to Adobe PDF Export to PDF File
Export to MS Word Export to MS Word
Bookmark Article
Subscribe to Article Subscribe to Article
 
Search Knowledge Base Search Knowledge Base



 
 

© Veryant - All Rights Reserved
Veryant and isCOBOL are trademarks or registered marks of Veryant in the United States and other countries. All other marks are the property of their respective owners.