ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

View how ILERPG program is compile

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

  • View how ILERPG program is compile

    I would like to know is there a method on how to view the program is compile with ALLOW NULL VALUE. When you CRTBNDPGM, there is 4 options that you can used and the default is *YES. I would like to know is there any way to see the exisiting production compile listing to see how the NULL VALUE was compile with.

    I appreciate anyone that can enlighten me.

    Thanks.

  • #2
    Re: View how ILERPG program is compile

    I don't think there is a way to see the compile option in the compiled program. (But I've currently no access to an iSeries, so I cannot confirm it).

    Instead of setting the options at compile time, I'd add the keyword ALWNULL into the H-Specs. If compile options are specified in the H-Specs, they will override the compile command. In this way, next time you have to recompile your program, you do not have to remember the compile options and when having a look at your source, you'll always know how your program was compiled.

    Birgitta

    Comment


    • #3
      Re: View how ILERPG program is compile

      Originally posted by B.Hauser View Post
      I don't think there is a way to see the compile option in the compiled program. (But I've currently no access to an iSeries, so I cannot confirm it).

      Instead of setting the options at compile time, I'd add the keyword ALWNULL into the H-Specs. If compile options are specified in the H-Specs, they will override the compile command. In this way, next time you have to recompile your program, you do not have to remember the compile options and when having a look at your source, you'll always know how your program was compiled.

      Birgitta
      to echo Birgitta's post, if there is a way to view compiler options used i haven't found it. plus as she mentioned H specs are the best way to do this, then you don't have to go digging to see compiler options (like you are right now!) they'll be in the source member and readily available..
      I'm not anti-social, I just don't like people -Tommy Holden

      Comment


      • #4
        Re: View how ILERPG program is compile

        I don't believe you can retrieve the ALWNULL keyword value used at compile time, not even using an api. (This may have changed, but I seem to remember years ago not being able to retrieve this value.

        All compile options SHOULD have been documented in the program source if they were used. A problem with this method, beyond a programmer simply not documenting it, is that your shop may have modified the compile command a few releases ago, so a specific compile keyword was changed to automatically be different from the original default. In other words, someone may have modified the compile command so that the ALWNULL keyword defaulted to *YES instead of *NO on the compile cmomand, therefore no documentation was needed since a compile time keyword was not changed at compile time. At the current release, the keyword may be using the original default of *NO, and now none of the programs operate in the same manner.

        Since we can now put most compile options in the H specs, you should use that method since it is performed automatically and is self documenting. You wont ever have to worry about it again.
        Michael Catalani
        IS Director, eCommerce & Web Development
        Acceptance Insurance Corporation
        www.AcceptanceInsurance.com
        www.ProvatoSys.com

        Comment


        • #5
          Re: View how ILERPG program is compile

          Thanks to everyone that reply to my problem. I have to agree with what you all have said about the H Spec compile option. The problem arise was due to the new version of the program was compile different than the existing version. This was not documented from the vendor so this problem occur now. My co-worker and I discovered this problem was hoping to see if you could actually see the compile difference with the old production program and the new version being tested before moved to our production system. It is a good thing this is happening during our QA testing of the new software version upgrade.

          Thanks everyone for your great input.

          Comment


          • #6
            Re: View how ILERPG program is compile

            a couple of things you can look for that might help. if you see %nullind bif in the program then most likely the program was compiled with ALWNULL(*USRCTL)
            I'm not anti-social, I just don't like people -Tommy Holden

            Comment


            • #7
              Re: View how ILERPG program is compile

              Originally posted by kfproblem View Post
              Thanks to everyone that reply to my problem. I have to agree with what you all have said about the H Spec compile option. The problem arise was due to the new version of the program was compile different than the existing version. This was not documented from the vendor so this problem occur now. My co-worker and I discovered this problem was hoping to see if you could actually see the compile difference with the old production program and the new version being tested before moved to our production system. It is a good thing this is happening during our QA testing of the new software version upgrade.

              Thanks everyone for your great input.
              It is a work-around, but I have used the COPYRIGHT H-spec keyword to store compile options and version number etc. That is viewable in the compiled object.


              Jon P.

              Comment

              Working...
              X