Unconfigured Ad Widget



No announcement yet.

Please can anybody give me answer for this

  • Filter
  • Time
  • Show
Clear All
new posts

  • Please can anybody give me answer for this

    If we put setll statement in *inzsr() routine in rpg, what happens?

  • #2
    If the program is called just once in a job stream, then it does the SETLL. If you then read from the file inside the *inzsr subroutine, or in you main code, the record that you will retrieve will be affected by the setll.

    If your program is called more than one time within a job, the *inzsr may only be executed on the first call, or it may be executed on every call.

    When your program ends, if *INLR is on, then the next time that you call it, *INZSR will be executed. But, if *INLR is not on when your program ends (you would do a RETURN), then *INZSR will not be executed.

    There are other things to consider, when you end a program with *INLR off or on, and what happens on subsequent calls.

    This is a hard question to answer, because from the nature of the question, I get the impression you are very inexperienced with RPG. Therefore, you might not have the proper background to fully understand what I've written. I think that's partly why no one has posted an answer, though your question has been out there for almost two weeks.

    I also want to be clear that I'm not saying anything bad about your programming skills; only that it seems that you're brand new to the iSeries, and might not have anyone to serve as a mentor.