ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

System Down with Recursive

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

  • System Down with Recursive

    The Cobol Program called recursively with out any instructions in the program.

    The system is down at the instant the job is running.

    The System Engineers indicates that this is due to the memory problem created by recursion.

    Could you please let us know whether if there is anything there to control this by iseries instead of going down.

  • #2
    Re: System Down with Recursive

    couldn't you run it in a special q that gets throttled?
    Your future President
    Bryce

    ---------------------------------------------
    http://www.bravobryce.com

    Comment


    • #3
      Re: System Down with Recursive

      Originally posted by Surya View Post
      The system is down at the instant the job is running.

      The System Engineers indicates that this is due to the memory problem created by recursion.
      why should the system determine what you're telling it to do? it doesn't know! a computer (of any kind) is as dumb as a rock...it'll do whatever you tell it no matter whether it makes sense or not. the only real way to fix this is to correct the program! step through it in debug and find the hole and fix it. if the system is brought to it's knees when the program starts then one or 2 things has happened:
      1. you've hit a bug in the OS
      2. the program has a major bug in it.

      most likely it's number 2. IBM (unlike other software companies i won't name ... Micro$soft) is very good at taking care of their OS and problems found with it. I'm not a COBOL programmer by any stretch of the imagination but i'm guessing this particular program is using dynamic arrays (i wish we had those in RPG!!!). chances are that it's allocating memory by the tons that the program will never use.

      debug and fix the critter. if you can't find anything then it's time to call IBM support. they can then troubleshoot to see if you have stumbled onto an OS bug.
      I'm not anti-social, I just don't like people -Tommy Holden

      Comment


      • #4
        Re: System Down with Recursive

        Tommy,

        I agree, and it should also be noted that this type of situation could occur regardless of the programming language (COBOL, RPG, C, MI, etc.)

        As a COBOL'er I'm completely confused by this statement:

        The Cobol Program called recursively with out any instructions in the program.
        Quite frankly, I don't know how a program can call itself recursively without having a CALL statement within the program!

        Maybe this is related to a question on a students test

        Terry

        Comment


        • #5
          Re: System Down with Recursive

          Originally posted by Terry Wincheste View Post
          Quite frankly, I don't know how a program can call itself recursively without having a CALL statement within the program!
          i was assuming that there was a different program calling the COBOL over and over again...but you're right for it to be recursive it has to call itself! geez it's still too early in the morning...need caffeine! maybe that's the only statement in the program is a call to itself?
          I'm not anti-social, I just don't like people -Tommy Holden

          Comment


          • #6
            Re: System Down with Recursive

            Well if that is the only statement in the whole program then just delete the stupid thing. It doesn't do anything useful. Delete the object and the source and punch the programmer in the face.
            Your future President
            Bryce

            ---------------------------------------------
            http://www.bravobryce.com

            Comment


            • #7
              Re: System Down with Recursive

              Originally posted by bryce4president View Post
              Well if that is the only statement in the whole program then just delete the stupid thing. It doesn't do anything useful. Delete the object and the source and punch the programmer in the face.
              actually i've seen dumber things than that...sad ain't it
              I'm not anti-social, I just don't like people -Tommy Holden

              Comment


              • #8
                Re: System Down with Recursive

                Originally posted by bryce4president View Post
                Delete the object and the source and punch the programmer in the face.
                As a programmer, I am now re-evaluating my decision to vote for Bryce for president...LOL

                Terry

                Comment


                • #9
                  Re: System Down with Recursive call

                  Sorry for the confusion.

                  At the end, I will correct the CALL statement as suggested.

                  This is actully what happened.

                  The objective is to create a Cobol program (OAB - Type is CBL, we call it as OPM wrapper) to call a COBOL ILE (IAB - Type is CBLLE) program due to the conflicts that we are having in mixing the OPM & ILE.

                  Due to some typo error and missed in peer review the CALL statement consists of OAB instead of IAB in the program OAB.

                  When we started executing OAB it went on loop utilizing most of the CPU percentage and not giving the CPU time for other jobs to process.

                  Results in System Hang.

                  Now I am looking for a preventive action to held the jobs that are submitted by users when the job is taking more than certain amount of CPU. So the system won't be down.

                  I came across the following one from IBM about monitors:


                  Let me know if you have any ideas.

                  Comment


                  • #10
                    Re: System Down with Recursive

                    You can lower the priority of the runaway job to 99 can't you? Won't that make it only take up whatever cpu is left laying around?

                    Terry Terry. I'm quite sad to hear that you do not support certain tough love stances. But I would ask you, do you really think that a programmer who writes a program to call itself, and that is it, doesn't deserve a punch in the face?

                    Although I did write a recursive browser window opening javascript one time and sent it to my professor. I brought his windows machine to its knees. Fortunately for me he thought it was funny That's how I learned that early mozilla didn't have a limit on the number of browser windows you could open at one time Now a days they have catches for run away processes like that...
                    Your future President
                    Bryce

                    ---------------------------------------------
                    http://www.bravobryce.com

                    Comment


                    • #11
                      Re: System Down with Recursive

                      Originally posted by bryce4president View Post
                      But I would ask you, do you really think that a programmer who writes a program to call itself, and that is it, doesn't deserve a punch in the face?
                      I grew up with "tough love" and I turned out OK (I think...lol).

                      However, I think a boot in the a$$ would be more effective - preferably one that points him towards the door ;-)

                      Terry

                      Comment


                      • #12
                        Re: System Down with Recursive

                        Ok. I can accept that as an alternative punishment.
                        Your future President
                        Bryce

                        ---------------------------------------------
                        http://www.bravobryce.com

                        Comment


                        • #13
                          Re: System Down with Recursive

                          Originally posted by bryce4president View Post
                          You can lower the priority of the runaway job to 99 can't you? Won't that make it only take up whatever cpu is left laying around?
                          Maybe even more important is to change the timeslice, then it'll take as long as the post in South Africa.
                          Regards

                          Kit
                          http://www.ecofitonline.com
                          DeskfIT - ChangefIT - XrefIT
                          ___________________________________
                          There are only 3 kinds of people -
                          Those that can count and those that can't.

                          Comment


                          • #14
                            Re: System Down with Recursive

                            The way Africans run I would think the post would move around quite quickly there... huh, who'd 'a thunk it?
                            Your future President
                            Bryce

                            ---------------------------------------------
                            http://www.bravobryce.com

                            Comment


                            • #15
                              Re: System Down with Recursive

                              Nahhh... we only run fast if we got fake legs (ouch), or if we've stolen something and we need to get away quick.
                              Regards

                              Kit
                              http://www.ecofitonline.com
                              DeskfIT - ChangefIT - XrefIT
                              ___________________________________
                              There are only 3 kinds of people -
                              Those that can count and those that can't.

                              Comment

                              Working...
                              X