ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

ile & clp debugging

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

  • ile & clp debugging

    Hi,

    I have a process that contains clp and rpgle programs.

    The process begins with a clp, which then calls an rpgle program and depending on what that program does, it may call a clp that creates a new version of the rpgle and then calls that version. The process continues in this fashion until one of the rpgle's does not need to create another version and then things go in reverse, cleaning up what has been created.

    Unfortunately, the rpgle's that are created as needed, are not functioning properly.

    How can I debug the rpgle's in this stream when they don't exist at the begining?
    Everyday's a school day, what grade are you in?

  • #2
    Re: ile & clp debugging

    I haven't tried it to see if it would work, but you might try starting a service job on that session and then enter the program via debug. Anytime the program gets called it should bring up the debug view, but I'm still not sure if it will work via the way you are re-creating programs.

    Is there some compelling reason why you have to recreate the programs at every step?
    Michael Catalani
    IS Director, eCommerce & Web Development
    Acceptance Insurance Corporation
    www.AcceptanceInsurance.com
    www.ProvatoSys.com

    Comment


    • #3
      Re: ile & clp debugging

      Michael,
      I like a challenge!

      Seriously, the process started out simple enough but then I realized that if I'm checking for a condition in the first rpgle that requires further digging into, that I would then need another level of programs so that I didn't mess with the files from the lower level, that is now stopped because of this found condition.

      So by creating another level of the same clp and rpgle along with a PFnn (nn being the level number) to avoid messing with other levels, I resolved my issue.

      Honestly, everything is working perfectly except;
      At each level, a master file is being written to. Included in the record is the level number (instance), which I'm getting from within the rpgle program (LPFRLnn) via the sds 1-10. I'm using this level number to add a structure to the report that prints after the process ends from the master file.

      The real problem is that I'm not getting the level number in the master file so when the report prints, it's messy hence the need to debug.

      Here's the code:
      Code:
      d instance        s              2 
      
      d                sds                
      d pname                   1     10  
      
      c                   eval      instance = %trim(pname)
      I'm not a pro with rpgle and free so it's probably something really simple that I'm missing.

      I found my problem, thanks.
      Last edited by redvan; July 2, 2009, 11:13 AM. Reason: Solution found...
      Everyday's a school day, what grade are you in?

      Comment


      • #4
        Re: ile & clp debugging

        Hi redvan:

        I'm probably missing something here.

        What do you mean by "creates a new version of the rpgle and then calls that version"?

        If you mean you re-compile the program within the CL and then call it.........add that cl to your debug list with a breakpoint after the compile (before the call) and add the new rpgle program to the debug list.

        Best of Luck
        GLS
        The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

        Comment


        • #5
          Re: ile & clp debugging

          I start with pgm PGMLE00 called from PGMCL00.

          Pgm PGMLE00 is reading a file (PF00) when it encounters a condition I'm checking for.
          It calls PGMCLXX which creates a new PF01, PGMLE01 and PGMCL01 so as to not mess with the level 00 file.
          Then the new PGMCL01 is called which loads file PF01 and calls PGMLE01 which continues checking for a specific condition. If found, it calls PGMCLXX ...and so on....
          Everyday's a school day, what grade are you in?

          Comment


          • #6
            Re: ile & clp debugging

            Hi redvan:

            Sorry I'm still missing something.

            In CL program PGMCLXX you create new pf/cl/rpgle. Weather by compile or cpy.....or however you do it add a breakpoint after the "create new stuff".

            When you get to that breakpoint F14 allows you to add another module to your debug list.

            As long as you add the new modules (cl & rpgle) before you call them you will be able to debug the new programs.

            Best of Luck
            GLS
            The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

            Comment

            Working...
            X