No announcement yet.

Difference between CHGDTA, UPDDTA and DSPDTA

  • Filter
  • Time
  • Show
Clear All
new posts

  • Difference between CHGDTA, UPDDTA and DSPDTA

    I assume that DSPDTA only displays data but what is the diference between UPDDTA and CHGDTA?
    I hope I have posted this in the correct forum
    Thanks for any help. It is very much appreciated

  • #2
    DSPDTA displays data in a table, using a program you specify on the command call. I.e. you can use it to call a custom display program. I have never used it.
    CHGDTA displays and updates data in a table, using a program you specify on the command call. I.e. you can use it to call a custom file update program. I have never used it.
    UPDDTA is an ancient and very basic generic table update program that works for any table, but dopes not support newer data types like date/time/timestamp.


    • #3
      These commands are all part of DFU, the data file utility, a text-based CRUD utility that has been around since System/38. S/34 and S/36 also had DFU utilities. I don't know about S/32 -- I never worked on it.

      Use the STRDFU command to access the DFU menu.

      DFU was a great addition to the system. On S/3, programmers often had to write one-shot programs just to change something in a file. A lot of shops used it for data entry.

      I don't ever use the commands that require a DFU program, such as DSPDTA and CHGDTA, but I use UPDDTA for quick file maintenance when I'm testing programs. I don't use any of the DFU commands for production work.

      I'm not sure where Vectorspace got his info, but UPDDTA does support date/time/timestamp.


      • #4
        You can generate a DFU program using STRDFU. When you do that, you can do things like control which fields are available to the program, set more meaningful descriptions of the fields, and similar things. When you build a program like this, you have to take time to configure it all, but then it generates a ready-to-use program on disk. To use it, you run it with the CHGDTA (or DSPDTA) command.

        Alternately, you can run UPDDTA. This allows no customization as it builds the program to run on-the-fly. It's good for quick and dirty things done by a programmer because you don't have to take the time to configure/build the program like you do with CHGDTA -- it just makes a default one for you on-the-fly -- but it also means that it takes a little longer to start up, and you can't customize it to your needs.


        • #5
          Thanks very much guys. Very valuable information. I appreciate it


          • #6
            There's a nice 3rd party utility called DBU that we use instead of DFU.


            • #7
              Thanks. I will look into that