ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

physical file's last change date/time attribute

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

  • physical file's last change date/time attribute

    Hi all,

    I wrote an RPG program and it's updating a physical file (after clearing in a CL pgm) but the 'Change date/time' attribute doesn't change everytime the program runs and actually updates the file. What could be the reason. Thanks in advance.

    Tasho

  • #2
    Re: physical file's last change date/time attribute

    tasho,

    You should be looking at the last used date instead. The changed date won't change until the file layout changes.

    HTH,
    MdnghtPgmr
    "Tis better to be thought a fool then to open one's mouth and remove all doubt." - Benjamin Franklin

    Comment


    • #3
      Re: physical file's last change date/time attribute

      hi mdnpgmr,

      But the other file's Change date/time changes everytime it's cleared and updated by another pgm (no layout changes). 'Last used date' could be just 'viewing' date but I am interested in when the file was updated or records were added to it. Any idea why.

      Change/Usage information:
      Change date/time . . . . . . . . . : 30/10/08 23:00:02
      Usage data collected . . . . . . . : YES
      Last used date . . . . . . . . . . : 31/10/08
      Days used count . . . . . . . . . : 12
      Reset date . . . . . . . . . . . :

      Thanks
      Tasho
      Last edited by tasho; October 30, 2008, 11:24 AM.

      Comment


      • #4
        Re: physical file's last change date/time attribute

        - If no record is updated in the program, Change Date/Time does not occur.
        - CLRPFM changes the value only if the file contains data.
        Philippe

        Comment


        • #5
          Re: physical file's last change date/time attribute

          Hmmmm. That's how I thought it worked. It's hard to tell on our development box due to Sun. night restore from production. Here's is what I'm seeing:
          Code:
           Last change date/time . . . . . . . . . . :            10/26/08  19:53:58
           Last save date/time . . . . . . . . . . . :            10/26/08  19:29:47
           Last restore date/time  . . . . . . . . . :            10/26/08  19:29:35
           Last used date  . . . . . . . . . . . . . :            10/30/08
          Where the last used date got changed just because I did a DSPFD. Now I'm not so sure.

          Confused again,
          MdnghtPgmr
          "Tis better to be thought a fool then to open one's mouth and remove all doubt." - Benjamin Franklin

          Comment


          • #6
            Re: physical file's last change date/time attribute

            Thanks Mercury, that helps!
            "Tis better to be thought a fool then to open one's mouth and remove all doubt." - Benjamin Franklin

            Comment


            • #7
              Re: physical file's last change date/time attribute

              MdnghtPgmr,

              Beware when using DSPOBJD or WRKOBJ + 8 for database files as the Change Date/Time definition is not the same as DSPFD.

              Below the green screen help on Change Date/Time for DSPOBJD/WRKOBJ.
              For database files:
              Indicates the date and time that the object was first modified
              after a SAVLIB request
              . If the data is changed again, the
              change is not reflected on the DSPOBJD command until another
              SAVLIB request is processed and the data is changed again. You
              can use the Display File Description (DSPFD) command to show the
              last change date and time value to find out when each member of
              the file was modified.
              Philippe

              Comment


              • #8
                Re: physical file's last change date/time attribute

                thanks mercury...this explains...and solves the mystery...

                Comment

                Working...
                X