Function GetObjJournalRecord

 

Function GetObjJournalRecord( ByVal hHandle& ) As String

Purpose: Retrieve journal jounal record details of a data object in the OLR file.

Works in:      OneLiner and Power Flow.

Parameters:     

nHandle       [in] data object handle

Return value:

String of journal record fields, separated by new line character:

-   Create date and time

-   Created by

-   Last modified date and time

-   Modified by

Remarks:

 

Example:

 

Sub main

  hnd& = 0

  count = 0

  While 1 = GetEquipment(TC_RLYOCG,hnd)

    JRec$ = GetObjJournalRecord(hnd)

    Call parseALine( JRec$, Chr(10), dateCreated$, JRec$ )

    Call parseALine( JRec$, Chr(10), CreatedBy$, JRec$ )

    Call parseALine( JRec$, Chr(10), dateModified$, JRec$ )

    Call parseALine( JRec$, Chr(10), ModifiedBy$, JRec$ )

    Print PrintObj1LPF(hnd) & Chr(10) & _

      " Created: " & dateCreated & " by: " & CreatedBy & _

      Chr(10) & " Modified: " & dateModified & " by: " & ModifiedBy

    If count >= 5 Then Stop

    count = count + 1

  Wend

End Sub

 

Sub parseALine( ByVal aLine$, ByVal Delim$, ByRef sLeft$,  ByRef sRight$ )

  nPos = InStr( 1, aLine$, Delim$ )

  If nPos = 0 Then

    sLeft = aLine$

    sRight = ""

  Else

    sLeft = Left(aLine$, nPos-1)

    sRight = Mid(aLine$, nPos+Len(Delim), 9999 )

  End If

  sLeft  = Trim(sLeft)

  sRight = Trim(sRight)

End Sub