Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

How many times a program has been run!!

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

  • How many times a program has been run!!

    You can see how many DAYS a program has been used. Use the DSPOBJD command...: DSPOBJD OBJ(mylib/mypgm) OBJTYPE(*PGM) DETAIL(*FULL) The look at the "Days used count", that may be useful to gage how often the program is used. HTH, Ed

  • #2
    How many times a program has been run!!

    If the program runs in a batch job, the history log (DSPLOG QHST) has the starting and ending date/time of the job. Interactive would be different though. There isn't a command that tells you how often a program is called. As Ed said, DSPOBJD tells you how many days it's been used but not how many times it's been called within those days. Tom.

    Comment


    • #3
      How many times a program has been run!!

      There is nothing within the OS that will do this for you. You could create a data area (or similar) and increment a count each time the program is run. That would have to be coded within the called program. Dave

      Comment


      • #4
        How many times a program has been run!!

        Maybe CHGOBJAUD. Type this, hit F4, F1. Dig in. I've never used it. It will create entries in a journal. You would have to extract those out yourself. Would be much simpler to modify the program to increment a counter in a data area or a PF. Chris

        Comment


        • #5
          How many times a program has been run!!

          Thanks guys for your help So i guess we need development!! wanted to prove to the manager that there is no command to do so!! this feature is available in the old main frame we used to have (never worked on) the 4700 main frame i guess, and that's why he is insisting on having thsi feature!! thanks much

          Comment


          • #6
            How many times a program has been run!!

            Well, your boss is right. The command is CHGOBJAUD. Every time that object is accessed, an entry is added to the journal receiver. Do a google search. Chris

            Comment


            • #7
              How many times a program has been run!!

              Ok Ringer, but it's not kinda counter!! i mean there is nothing to show me a specific no. that this job was run like 4 time this day (for example) this kind of trace needs to be tracked, that's what i mean thanks anyway, and i didnt post it here without googling

              Comment


              • #8
                How many times a program has been run!!

                I love it when the original request evolves into something else. I'm trying to find a way to see how many times a specific program has been run, I'm not looking for making any changes in the program itself (like adding a trigger or something) is there a way or command to do so??" CHGOBJAUD fit this perfectly. :-) Chris

                Comment


                • #9
                  How many times a program has been run!!

                  There has been a multitude of answers to your request, but what I'm more interested in is - what/how will your boss use this information? What does he hope to ascertain from this? Just curious thats all. Alan Shore

                  Comment


                  • #10
                    How many times a program has been run!!

                    Firas400 wrote: "this feature is available in the old main frame we used to have". It would be nice to have a study how IBM moves forward and adds one feature, but at the same time loses some other features. Here are a few: 1. Befroe the move to ILE it used to be easy to get the source of a program: DSPOBJD OUTPUT(*OUTFILE). With the introduction of ILE it does not give it any more. I am aware of the complexity in ILE that each program may have more than one module, and each module has its own source. But never less it is possible to have a similar command with the addition of the module list and their source members for each program. I am also aware that there is an API(QBNLPGMI) that does the job, but It is much more complex to use and even if You design an envelope for the API, it is still not standard. 2. DSPPGMREF gives all programs that are being called from within any given program. And if used with an OUTFILE it gives the ability to create a nice tree how programs in a library are referred one to each other. With the introduction of modules, procedures and service programs, this feature was lost. 3. Commands are one of the most beautiful things on the I5/as400, It is so standard, self documenting and object oriented, but with the introduction of modules and procedure, it is impossible to have a command interface for a module or procedure within a program. In fact for the last 10 years or more, IBM is not improving anything in the Command Interface language, and there are a lot of things to improve, like supporting DATE and TIME variables. It looks like one day IBM may drop it completely and lose it. 4. If we go back even further, It used to be AUTO report for fast/easy report design in RPG2, it was lost when going over to external described files. I think the Programming Community should wake up and not just say YES to anything they introduce in Rochester. They have a voice and they are allowed to critcize.

                    Comment


                    • #11
                      How many times a program has been run!!

                      well Pad, i guess it's related to the End of Day cycle, it's a user exit that we need to know how many times it runs!! but u know, i think that my boss's boss asked about this info because he is the one that used to work on the old main frame! anyway, i think it's one of my boss's requests, seems he already forgot about it!! but good to know guys, thanks for ur info

                      Comment


                      • #12
                        How many times a program has been run!!

                        It's funny how a boss's requests are hot one minute and when you work so hard to get the information, he/she's forgotten about it.

                        Comment


                        • #13
                          How many times a program has been run!!

                          tell me about it tcsbiz sometimes it gets on nerves, and really this is happening all the time, and then after months he will come back asking me for the same info and so on get used to that from my boss, but it's always for my benefit i guess knowing all this stuff

                          Comment


                          • #14
                            How many times a program has been run!!

                            I'll start the ball rolling here - as for your #1, it's still available but not from DSPOBJD (since that show a single object description/definition) - use DSPPGM to get you information now.

                            Comment


                            • #15
                              How many times a program has been run!!

                              Unless IBM will give an option for an OUTFILE like in other commands. Do not understand me wrong. I am aware of must new changes IBM came up, and I am using them. Your phrase "Change or die" made me really scared. But in my opinion, programmers need not only be frightened, but also get the feel that the new stuff is really better than the old stuff, and it has all the needed things they used to have up till the new options became available, unless the new options just do no need it any more. There is a difference between just doing a change no matter what or to advance and make things better. I am trying to persuade IBM too to advance according to what the users need, and not lose goody's they have. If we lose the analyzing tools the AS400 used to have, it is not going forward, but backwards.

                              Comment

                              Working...
                              X