This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Debugging program called via WINEXEC

We are upgrading from RM/COBOL v10.1 to v12.17 and Windows 7 to 10.  This functionality worked prior to the upgrade.

I have a pair of program that I need to debug.  I've compiled both with debugging on.  

Program A calls program B using WINEXEC:

40920    STRING '"' DELIMITED BY SIZE
40920                    RMCOBOL-PATH(1:PATH-INDEX) DELIMITED BY SIZE
40920                    '\RUNCOBOL.EXE" B A="A' DELIMITED BY SIZE
40920                    PNF-EMPLOYEE-ID DELIMITED BY SIZE
40920                    PNF-FAMILY-MEMBER-ID DELIMITED BY SIZE
40920                    '" L=' DELIMITED BY SIZE
40920                    RUNTIME-PATH DELIMITED BY ' '
40920                    'LCSWIN.LIB, L=' DELIMITED BY SIZE
40920                    RUNTIME-PATH DELIMITED BY ' '
40920                    'LCSIO.LIB, L="' DELIMITED BY SIZE
40920                    RMCOBOL-PATH(1:PATH-INDEX) DELIMITED BY SIZE
40920                    '\WOWRT.DLL"' DELIMITED BY SIZE
40920                    ', L="' DELIMITED BY SIZE
40920                    RMCOBOL-PATH(1:PATH-INDEX) DELIMITED BY SIZE
40920                    '\LISQL.DLL"' DELIMITED BY SIZE
40920                    INTO SYSTEM-COMMAND
40920    END-STRING.
CALL WINEXEC USING WIN-RETURN SYSTEM-COMMAND WIN-TRUE.

I am able to debug program A but I can't get into program B.  Does anyone have a solution?

Thank you

Parents
  • 0

    Hi Linda:

    If I read this right, you're using CALL SYSTEM to launch another COBOL program.  This launches an entire new runtime system in a separate process.  I don't see how the second process could ever be debugged with the command line you provided using CodeWatch. 

    However, you highlighted the B in the created command.  This looks wrong as if the "buffersize" command line option needs a numeric parameter.

    I'm wondering if, instead of B you meant to use D for using the command line debugger.  So maybe this is the source of the problem and you're using the command line debugger to debug the second process.

  • 0 in reply to 

    B was referring to program B

  • 0 in reply to 

    It would be good to see the entire rendered command. 

    You did say this worked before, but without a D on the command line, I can't see what would cause program B to enter debugging mode since CALL SYSTEM would create a new process. 

    How did you debug it prior to Windows 10?  

  • 0 in reply to 

    AJCLAIM CALL TO ELMAIN in order to view Patient Notes

    85488 135468 1 40920 STRING '"' DELIMITED BY SIZE
    85489 1 40920 RMCOBOL-PATH(1:PATH-INDEX) DELIMITED BY SIZE
    85490 1 40920 '\RUNCOBOL.EXE" ELMAIN A="A' DELIMITED BY SIZE
    85491 1 40920 PNF-EMPLOYEE-ID DELIMITED BY SIZE
    85492 1 40920 PNF-FAMILY-MEMBER-ID DELIMITED BY SIZE
    85493 1 40920 '" L=' DELIMITED BY SIZE
    85494 1 40920 RUNTIME-PATH DELIMITED BY ' '
    85495 1 40920 'LCSWIN.LIB, L=' DELIMITED BY SIZE
    85496 1 40920 RUNTIME-PATH DELIMITED BY ' '
    85497 1 40920 'LCSIO.LIB, L="' DELIMITED BY SIZE
    85498 1 40920 RMCOBOL-PATH(1:PATH-INDEX) DELIMITED BY SIZE
    85499 1 40920 '\WOWRT.DLL"' DELIMITED BY SIZE
    85500 1 40920 ', L="' DELIMITED BY SIZE
    85501 1 40920 RMCOBOL-PATH(1:PATH-INDEX) DELIMITED BY SIZE
    85502 1 40920 '\LISQL.DLL"' DELIMITED BY SIZE
    85503 1 40920 INTO SYSTEM-COMMAND
    85504 1 40920 END-STRING.
    85505 135611 1 CALL WINEXEC USING WIN-RETURN SYSTEM-COMMAND WIN-TRUE.

    How did you debug it prior to Windows 10?     We were using RM/COBOL v10.01 & Windows 7.  We would compile AJCLAIM & ELMAIN using the Y=3 in the command tail.  In the debug session of AJCLAIM, we set a break on the string command, hit go and then step through the STRING and the CALL.  We would then get into ELMAIN.

    I added the 'D' to the command line and tried again.  I received some debugging information but it's not as helpful as a normal debug session. ( I think my terminology may be a bit of a problem.  When I say 'debug' I mean 'CodeWatch' session.)  Is there a way, in this scenario, that I can step through ELMAIN in CodeWatch?

     

Reply
  • 0 in reply to 

    AJCLAIM CALL TO ELMAIN in order to view Patient Notes

    85488 135468 1 40920 STRING '"' DELIMITED BY SIZE
    85489 1 40920 RMCOBOL-PATH(1:PATH-INDEX) DELIMITED BY SIZE
    85490 1 40920 '\RUNCOBOL.EXE" ELMAIN A="A' DELIMITED BY SIZE
    85491 1 40920 PNF-EMPLOYEE-ID DELIMITED BY SIZE
    85492 1 40920 PNF-FAMILY-MEMBER-ID DELIMITED BY SIZE
    85493 1 40920 '" L=' DELIMITED BY SIZE
    85494 1 40920 RUNTIME-PATH DELIMITED BY ' '
    85495 1 40920 'LCSWIN.LIB, L=' DELIMITED BY SIZE
    85496 1 40920 RUNTIME-PATH DELIMITED BY ' '
    85497 1 40920 'LCSIO.LIB, L="' DELIMITED BY SIZE
    85498 1 40920 RMCOBOL-PATH(1:PATH-INDEX) DELIMITED BY SIZE
    85499 1 40920 '\WOWRT.DLL"' DELIMITED BY SIZE
    85500 1 40920 ', L="' DELIMITED BY SIZE
    85501 1 40920 RMCOBOL-PATH(1:PATH-INDEX) DELIMITED BY SIZE
    85502 1 40920 '\LISQL.DLL"' DELIMITED BY SIZE
    85503 1 40920 INTO SYSTEM-COMMAND
    85504 1 40920 END-STRING.
    85505 135611 1 CALL WINEXEC USING WIN-RETURN SYSTEM-COMMAND WIN-TRUE.

    How did you debug it prior to Windows 10?     We were using RM/COBOL v10.01 & Windows 7.  We would compile AJCLAIM & ELMAIN using the Y=3 in the command tail.  In the debug session of AJCLAIM, we set a break on the string command, hit go and then step through the STRING and the CALL.  We would then get into ELMAIN.

    I added the 'D' to the command line and tried again.  I received some debugging information but it's not as helpful as a normal debug session. ( I think my terminology may be a bit of a problem.  When I say 'debug' I mean 'CodeWatch' session.)  Is there a way, in this scenario, that I can step through ELMAIN in CodeWatch?

     

Children
  • 0 in reply to 

    A quick comment - at another company, we were able to type a command - COBTRACE ON/OFF - and displays of the paragraph name were inserted/deleted at the beginning of each paragraph.  This functionality would be very useful in a situation like this.