sponsored links

Collapse

Announcement

Collapse
No announcement yet.

*NOUNREF option does not work

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

  • *NOUNREF option does not work

    Hello! Today I learned about this option and immediately wanted to try it out. I wrote a test application, but to my great disappointment, I did not get the desired effect from using this option: the information messages RNF7031, as they were in the printout before the option was applied, remained in it after its application.
    Tell me what am I doing wrong?

    The test code is presented below, the build command is as follows:
    Code:
    CRTRPGMOD MODULE(CSNTST/POLIGON) SRCFILE(CSNEDU/RPGSRC) SRCMBR(POLIGON) OPTION(*NOUNREF)
    Code:
         D Data            DS            20
         D  data1                  1     10
         D  data2                 11     20
    
    
         C                   EVAL      data1 = *blanks
         C                   RETURN

  • #2
    Apart from the fact that you are using a deprecated style of RPG coding there is nothing obvious wrong. In fact it compiles just fine for me.

    What was the "effect" you were hoping to see? The RNF7031 messages are just warnings telling you that those fields were not referenced - which is true. *NOUNREF has no impact there - that is not what it does.

    This code is a bit closer to current coding practice. Still 5+ years out of date but ...

    Code:
         D Data            DS            
         D  data1                        10
         D  data2                        20          
    
            data1 = *blanks;
             RETURN;

    Comment


    • #3
      This article says that using this option will exclude unused variables from the compiled module. I decided that the indicated informational messages will also be excluded ...
      Maybe you tell me how to exclude informational messages from the listing?

      Comment


      • #4
        The relevant text is "... from the compiled module". In other words memory would not be allocated for unused variables. It has no impact on the compile listing.

        If you are using a modern RPG editor like RDi it is normal to exclude information messages like this and so you don't see them.

        Comment


        • #5
          JonBoy, thanks for clarifying the operation of the option.
          As you say, I use RDi when developing programs. And it is he who shows me all these informational messages. I would not pay attention to them, however, during the last development I was faced with the fact that RDi very long (about 30-40 seconds) extracts these messages from the EVFEVENT file. My project consists of about 30 RPGLE programs using a lot of /COPY directives (these are programs you probably know about the manufacturer - EQUATION - a developer of banking products). The assembly of all programs is carried out by one CLLE script, therefore the EVFEVENT file is also one. I already embed the *NOUNREF option in the compilation commands in the script for optimal assembly. But thousands of informational messages (in my case - 6350) in the error log is not good.

          Click image for larger version

Name:	log.PNG
Views:	31
Size:	134.9 KB
ID:	153383

          Comment


          • #6
            Did you remove the informatical messages option from your Error List Information?

            Click image for larger version  Name:	Messages.jpg Views:	0 Size:	59.8 KB ID:	153388

            Comment


            • #7
              Birgitta has shown you the option I alluded to in my post. I suggest you spend a little time studying RDi - the RDi section of our site here: authory.com/JonParisAndSusangantner should help.

              Comment


              • #8
                B.Hauser, JonBoy, thank you for the valuable tips!

                Comment

                Working...
                X