ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

First program task, completly in the dark

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

  • First program task, completly in the dark

    I am currently an overnight operator and was given the option to learn to code RPG with the promise of a jr. programming position. My first task is to develop a way to collect all error messages requiring a response that occur and to record the error response and who responded. It might not be a difficult task but RPG is ...strange. Can someone please give me advice on how to start this project? I am a complete RPG noob so any help is appreciated.

  • #2
    Congrats on working for a company that's willing to develop its in-house talent.

    I'm not clear on which error messages you're referring to, but if it's messages hitting QSYSOPR, you may find that a CL program would be more appropriate. In general, I think delving into CL programming, which uses many of the same commands with which you're likely already familiar, is probably a better way forward, assuming you're new to development in general.

    Cheers,

    Emmanuel

    Comment


    • #3
      Are you looking to retrieve the QSYSOPR messages?

      What skills do you have? Do you know how to open a source member?

      I suggest you do what EmmanuelW1 said. You can do this in CL, you can get to RPG later.

      1. Find your CL source file. Usually called QCLSRC.
      2. Scan on RCVMSG. You may have a good example to review that you can use as a starting point.

      Post questions as you go. This group is loaded with developers willing to help.

      You may be nervous, but jump in. It is the best way to learn.

      Comment


      • #4
        First, what is your OS version? The more recent RPG syntax might look more familiar, depending on what programming background you have. This task could introduce you to a number of RPG facilities, even though doing it with CL might be more common for operations staff.

        Also, if you're an "operator", does that mean that you have the QSYSOPR *MSGQ allocated when you're working? It can be a problem running programs against a *MSGQ when it's in use. Often it's not a good idea to run programs against QSYSOPR at all. That's part of why IBM provided the QSYSMSG *MSGQ as a partial alternative for programmed access. For what you need, QSYSOPR probably has to be used; but possible allocation details may need attention.
        Tom

        There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

        Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

        Comment


        • #5
          BTW, since this thread is "unapproved" for now, I've realized that you might not add a response to clarify anything until a forum mod does whatever's needed to open up your capabilities. Hold off any impatience for a short while, and welcome to Code400.
          Tom

          There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

          Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

          Comment


          • #6
            i just recently used sql to report joblog entry info. It was divine. Possibly look at doing it that way, if such a table exists for system messages. For joblogs I reported from qsys2.joblog_info(*). Use embedded sql in your rpg.

            Comment

            Working...
            X