ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

debuging CL programs?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • debuging CL programs?

    I need to debug a CL program. I enter the STRDBG command with my program and library but it nevers pulls up the source to set break points and when I run it I do not get to step through the source. When I enter the DSPMODSRC it says no source available. I am sure I am missing a setting when I compile or set in debug but I've never debugged a CL before and I can't find the answer.

    Any thoughts is appreciated.

    Jane22

  • #2
    Re: debuging CL programs?

    use strisdb for this ----- or ----- change type to CLLE and use strdbg provided you comiple as debug view *SOURCE or *ALL


    Jamie
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: debuging CL programs?

      And it's an OPM program, not ILE.

      Comment


      • #4
        Re: debuging CL programs?

        Thanks, works great!

        Jane22

        Comment


        • #5
          Re: debuging CL programs?

          FYI

          You can debug OPM programs using the ILE debugger (STRDBG). In order to do this, you must compile the OPM program (CL or RPG) with compile command parameter OPTION(*SRCDBG) or OPTION(*LSTDBG). Then, when you run the STRDBG command, use the parameter OPMSRC(*YES).

          Michael
          "Time passes, but sometimes it beats the <crap> out of you as it goes."

          Comment


          • #6
            Re: debuging CL programs?

            Hi,

            I compiled the CL (OPM) program using following command

            CRTCLPGM PGM(PGMR/J58030)
            SRCFILE(PGMR/QCLSRC)
            SRCMBR(J58030)
            OPTION(*LSTDBG)
            GENOPT(*LIST)
            REPLACE(*YES)

            Then exected following command.

            STRDBG PGM(J58030)
            UPDPROD(*YES)
            OPMSRC(*YES)

            But Source code in debug mode is not popping up.

            Then I called the program using following command.

            CALL PGM(J58030)
            PARM('J58030' 'ANAND01')

            Program got executed straight away. No view of source.


            If I use ISDB, it works fine.. Till date I have no success with STRDBG.

            Any help is much appreciated..

            Regards
            Anand

            Comment


            • #7
              Re: debuging CL programs?

              Just change the type from CLP to CLLE recompile with debug view *SOURCE or *ALL and it will work fine.... I promise

              Welcome to code400

              Take care
              Jamie
              All my answers were extracted from the "Big Dummy's Guide to the As400"
              and I take no responsibility for any of them.

              www.code400.com

              Comment


              • #8
                Re: debuging CL programs?

                Hi Jamie,

                It worked!! My Library List was messy so it not working earlier.

                Thanks for the patient responce & warm welcome.

                Regards
                Anand

                Comment

                Working...
                X