ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Print the source code which is processed..

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

  • Print the source code which is processed..

    hi,
    I am not successful replicating an issue reported by a remote user even after attempting so many times. Not able to trace his log neither we have the journals (internal probs).
    I need to add some code by which i should be able to trace what exactly he is doing with this code. Actually he bypasses a condition which throws a error message and in whatever way we tried we are not able to replicate. We doubt that he is not using the proper code which was sent recently. i need to have a solid proof for the same. Can any one provide me with a good idea of how i can change and send the code by which i can see what code is getting processed (like how do i direct the processed code to spool file or something..).

    i can just change the code but cannot add any objects. Thanks in advance

  • #2
    Re: Print the source code which is processed..

    i have to just say .... HUH???

    anyway if you can only change the code but can't add/replace objects...then there's no way to do what you're asking. you'd have to either a) change the code and the program object or b) find/write an exit point program and register it with an exit point...since you can't create anything...you're screwed...

    unless they'll let you have a job log from his session ( and then you'll still only see the library and program being run not what code is in the program object...)
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: Print the source code which is processed..

      hi..i guess the way i had written this was a bit confusing.. i was just saying that i cannot add any other objects (apart from the program object). if i change the code, it means i need to generate the program object for sure...i just need to trace what he is doing, since i cannot get the job log...anyways thanks for your time to reply to my query .....

      Comment


      • #4
        Re: Print the source code which is processed..

        Hi SSN:

        The only method I can think of is to print messages to the job log:
        Code:
        D Send2JobLog     PR            10I 0 ExtProc('Qp0zLprintf')   
        D  szOutputStg                    *   Value OPTIONS(*STRING) 
         /free 
          send2joblog('Step 1 Updated Loc code in Dept File From Loc file ' +
          %char(count) + ' records updated' +x'25');
        blah blah blah
        The above will send the message "Step 1 Updated Loc code in Dept File From Loc file 00025 records updated" to the job log.

        That's a pretty messy solution though.

        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: Print the source code which is processed..

          What sort of error message does the program throw ?
          CPF, MCH, user define ? This can help you resolve this issue.
          Philippe

          Comment

          Working...
          X