Skip to content

DF_ALL_FILES_TOUCHED

Indicates which tables have been acted upon by the last reread or relate command.

Level

Global

Supported by

All Drivers

Type

String, temporary

Access

Read Only

Values

4095-byte combinations of: - DF_FILE_NOT_TOUCHED - DF_FILE_TOUCHED_INACTIVE - DF_FILE_TOUCHED_ACTIVE

Remarks

DF_ALL_FILES_TOUCHED is a string of 4095 bytes. Each byte represents a table. The first byte represents table number 1, and the last byte represents table number 4095. Each byte may have one of three values: - DF_FILE_NOT_TOUCHED: if the table was not involved in the last reread or relate. - DF_FILE_TOUCHED_INACTIVE: if the table was involved in the last reread or relate and its record buffer was inactive. - DF_FILE_TOUCHED_ACTIVE: if the table was involved in the last reread or relate and its record buffer was active.

The DF_ALL_FILES_TOUCHED attribute is updated when a relate or reread operation occurs. This update does not take place when using the reread command with arguments! There are two ways to use the reread command: without arguments and with arguments. Although it is the same command that is used, its implementation is different.

Procedure ShowAllTouched
    Handle hTable
    String sTable
    String sTouched
    Integer iTouched

    Get_Attribute DF_ALL_FILES_TOUCHED To sTouched
    Move 0 To hTable

    Repeat
        Get_Attribute DF_FILE_NEXT_OPENED Of hTable To hTable
        If (hTable > 0) Begin
            Get_Attribute DF_FILE_LOGICAL_NAME Of hTable To sTable
            Move (Ascii(Mid(sTouched, 1, hTable))) To iTouched

            Case Begin
                Case (iTouched = DF_FILE_NOT_TOUCHED)
                    Showln sTable " NOT touched."
                Case Break

                Case (iTouched = DF_FILE_TOUCHED_INACTIVE)
                    Showln sTable " touched INACTIVE."
                Case Break

                Case (iTouched = DF_FILE_TOUCHED_ACTIVE)
                    Showln sTable " touched ACTIVE."
                Case Break
            Case End
        End
    Until (hTable = 0)
End_Procedure // ShowAllTouched

Procedure ManipulateTouched
    Open Salesp
    Open Customer
    Open Invt
    Open Vendor
    Open OrderHea
    Open OrderDtl
    Clear OrderHea
    Find Gt OrderHea By 1

    If (Found) Begin
        Relate OrderHea
        Showln "The touched status of the open buffers after Relate OrderHea:"
        Send ShowAllTouched
    End

    Find Gt OrderDtl By 1
    Reread OrderDtl
    Unlock
    Showln
    Showln "The touched status of the open buffers after Relate OrderHea,"
    Showln "a find on OrderDtl and then a reread with argument:"
    Send ShowAllTouched

    Reread
    Unlock
    Showln
    Showln "The touched status of the open buffers after Relate OrderHea,"
    Showln "a find on OrderDtl and then a reread without argument:"
    Send ShowAllTouched
End_Procedure // ManipulateTouched

The procedure above shows the touched status after a relate, a reread with, and a reread without arguments.