ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

File and dates

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

  • File and dates

    I have a file f65238d.

    Is there a way to reset the objects change and last used dates? I know I could create the file, but I want the dates to be old for testing.

    Tanks.
    Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

  • #2
    Re: File and dates

    DMW,

    I see API's that let you GET the info but I couldn't find one that lets you CHANGE that info. Maybe someone else will find one.

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

    Comment


    • #3
      Re: File and dates

      I dont know any apis that let you change last used date...sorry
      All my answers were extracted from the "Big Dummy's Guide to the As400"
      and I take no responsibility for any of them.

      www.code400.com

      Comment


      • #4
        Re: File and dates

        Here is the little story to see if this triggers someone.

        So file F65238D gets used by CLs and Rpgs everynight.
        The CLs add members, remove members and overrides.

        The rpg fills the file.

        The object has a change date that is equal to the removing of the members(date of the CLs used).
        The object does not have a last used date that is the same as the CLs or RPG. Its old.

        We thought that it might be becuse of the *first member not being used.

        I just have *use access to the object.
        I asked our lord to look at the object. He has *all.
        The last used date is now today. I sat there. All he did was wrkobj then "8" for display object discription.

        Odd stuff.
        Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

        Comment


        • #5
          Re: File and dates

          Hi All:

          I beleive the API QLICOBJD allows you to change the last used and change dates but I don't have an example of how to use it

          Best of Luck
          GLS
          The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

          Comment


          • #6
            Re: File and dates

            Hi All:

            This link lists how the last used date can get changed:




            Date and time of last change

            When an object is created or changed, the system time stamps the object,
            indicating the date and time the change occurred.


            Date of last use


            The date of last use is only updated once per day (the first time an object is used in a day). The system date is used.

            An unsuccessful attempt to use an object does not update the last used date.
            For example, if a user tries to use an object for which the user is not authorized,
            the date of last use does not change.

            The date of last use is blank for new objects.

            When an object that already exists on the system is restored, the date of last use
            comes from the object on the system. If it does not already exist when restored,
            the date is blank.

            Objects that are deleted and re-created during the restore operation
            lose the date of last use.

            The last used date for a database file is not updated when the number of members
            in the file is zero. For example, if you use the CRTDUPOBJ to copy objects and
            there are no members in the database file, the last used date is not updated.
            The last used date for a database file is the last used date of the file member
            with the most current last used date.

            For logical files, the last used date is the last time a logical
            member (or cursor) was used.

            For physical files, the last used date is the last time the data in the
            data space was used through a physical or logical access.

            Best of luck
            GLS
            The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

            Comment

            Working...
            X