ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

dif

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

  • dif

    what is the difference between find string pdm and dsp pgm ref ? when i search for program object reference , whether both will give same result?
    The Secret Of Achieving Your Goals Is Revealed Before Your Eyes.
    System Engineer

    Sudha...

  • #2
    FNDSTRPDM is examining source code. It will find all strings that contain the characters you specify. This can include the file declarations, but also the file references in the code -- even the comments. So if you are examining a program that references the object you are interested in, you will get multiple hits.

    DSPPGMREF is looking at the actual references in the object itself. It displays a lot more information about the reference, as well -- record formats, field counts, etc.

    One of the notable reasons that they might show different information is if the source code and the object don't agree -- if you are looking at source code that has changed since the object was compiled.

    Comment


    • #3
      Originally posted by Alan S. Binkow View Post
      FNDSTRPDM is examining source code. It will find all strings that contain the characters you specify. This can include the file declarations, but also the file references in the code -- even the comments. So if you are examining a program that references the object you are interested in, you will get multiple hits.

      DSPPGMREF is looking at the actual references in the object itself. It displays a lot more information about the reference, as well -- record formats, field counts, etc.

      One of the notable reasons that they might show different information is if the source code and the object don't agree -- if you are looking at source code that has changed since the object was compiled.
      thank you! In program B, if there is statement CALL "VAR1" where VAR1= "PGMA", so here it will reflects in DSPPGMREF as obj ref of PGMA?
      The Secret Of Achieving Your Goals Is Revealed Before Your Eyes.
      System Engineer

      Sudha...

      Comment


      • #4
        If your line of code says CALL 'VAR1', then program B will attempt to call another program named VAR1. VAR1 will appear as a program reference.

        Comment


        • #5
          No, it won't be listed in DSPPGMREF. Only objects defined in the program will be listed. Defined includes tables specified in SQL statements.
          VAR1 could be anything of thousands of programs.

          Kit
          www.ecofitonline.com
          DeskfIT - ChangefIT - XrefIT
          Regards

          Kit
          http://www.ecofitonline.com
          DeskfIT - ChangefIT - XrefIT
          ___________________________________
          There are only 3 kinds of people -
          Those that can count and those that can't.

          Comment

          Working...
          X