ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Exit_point to monitor a RPGLE Program

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

  • Exit_point to monitor a RPGLE Program

    Hi,

    Is there any exit_point/mechanisum to monitor the RPGLE program from other program?
    (Monitoring of execution of the program)

    Thanks

  • #2
    Re: Exit_point to monitor a RPGLE Program

    You want Program Cat to look at program Dog and see if Dog completed normally? How would you know unless Dog did something. IE data area, data Q, update a record in a table, create an object, go for a walk....

    As for the exit point , Dog does not have one unless you code one, or one is all ready coded.
    Some software providers give the clients a table to place names of programs in to be called at certain points. This is not an exit point per say, but similar function.
    Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

    Comment


    • #3
      Re: Exit_point to monitor a RPGLE Program

      An exit point is somethign that a programmer chose to add to his program. He did this by writing code that checks the system registry to see if something is registered to a given exit point, and if so, he retrieves the program name and other data, and calls the program at the appropriate time.

      In this case, you are the programmer writing the code -- so you would have to do that extra code that checks the system registry, etc. Don't expect it to "just magically work" without you having to code it!!

      However, if the goal is to have a program that ensures that another program has completed successfully, I don't think exit points/programs are the right tool for the job. Instead, I'd conisder putting a message out to a data queue periodically. This message could tell the status of the program. Then a second program could monitor the data queue, looking for these status messages. If it doesn't see one within a prescribed amont of time, it can decide that the program is hung-up and not working, in which case, it should take appropriate actions (such as notifying an operator, or killing the program and restarting it.)

      A data queue works much better than an exit point here because you don't want your program to actually be called by the one that might be failing -- because if it fails, it can't possibly call you! A data queue also has a built-in mechanism to time-out after not receiving a message for a certain amount of time, so it's an easy tool for this.

      Comment


      • #4
        Re: Exit_point to monitor a RPGLE Program

        Thank you very much for your answers.

        Let me be straight, few peoples here are learning RPGLE but originate from Java. Most of the time they are asking the question comparing with what they already know and we can find the alternative on AS400 and they are quite happy
        This time they are asking me, are there any mechanism similar to “Aspect Oriented" in AS400
        I knew that there's no way of automatically executing program/method (Aspect) base on method level of another Program but thought we can do it for Program object level.
        And before say "Yes/No" to them, I wanted confirm.
        Thanks now I got my answer
        Last edited by dhanuxp; March 26, 2013, 10:06 PM.

        Comment


        • #5
          Re: Exit_point to monitor a RPGLE Program

          Do you mean Object Oriented? I've never heard of "Aspect Oriented" before.

          Comment


          • #6
            Re: Exit_point to monitor a RPGLE Program

            I meant AOP - Aspect-oriented_programming
            It's nothing but kinda like trigger in AS400 but firing base on methods/function of a given class.
            That is why I thought we can do the same on 400.

            PS:
            Our peoples use framework (spring) & those so called standards for their day to day programming and make this company more & more complected.
            I really don't know how those standards adding a value to coding other than making this more complex & wasting time with million line of codes ..

            I cannot argue with my team as they always says "Hey, you use old stranded but these are the industry stranded." so I am
            so, I let them to go in their way with so called industry stranded .
            I'm glad, at-least they love DB2 & try to understand old programming also.

            Comment


            • #7
              Re: Exit_point to monitor a RPGLE Program

              Thanks for explaining about AOP... I think I understand it now, but I hadn't heard of it before.

              To implement the same thing in RPG, you'd need to code explicit calls to each aspect method (or use procedure pointers if you want to be a bit more dynamic.) There's no way for them to be called automatically, as it would in an AOP framework.

              Comment

              Working...
              X