Results 1 to 3 of 3

Thread: Script File

  1. #1
    Join Date
    Jul 2006
    Posts
    157

    Unanswered: Script File

    Hi: When i run the program and it goes to function InitializeDestFields on line .Run "InitializeFields". The transfer jumps to function AddFieldDef. There is a script file name Household Convert_OCS.TXT, which also calls some where in the program. In that script file there is a function name InitializeFields() which is called in the function AddFieldDef. I need help in
    here as i am debugging the old code.

    1. How to i find that code which load that script file. I try to search by script file name in the whole project but unable to find it

    2. When the program goes to line .Run "InitializeFields" then why it call function AddFieldDef. Also in AddFieldDef when i debug the line Debug.Print FieldName it start printing data from the script file

    AIF-HEADER-RECORD.HDR-DATE
    AIF-EXP-DETAIL-RECORD.AIF-EXP-PRIMARY-KEY.AIF-EXP-ACCT-NBR

    Thanks.


    Code:
    Private Function InitializeDestFields()
      If Not ConfigScript Is Nothing Then
        With ConfigScript
          .Run "InitializeFields"
    '      .Eval("OCSMaintenance").InitializeImpExp
        End With
      End If
    '  With modGeneral.ImpExp
    '    .Buffer = ""
    '    .LineNumber = 0
    '    .RecordNumber = 0
    '    .RecordLineIndex = 0
    '  End With
    End Function
    
    
    Public Sub AddFieldDef(ByVal Position As Integer, ByVal FieldName As String, ByVal CharPosition As Integer, ByVal CharLength 
    
    As Integer, Optional ByVal ValidationPattern As String = ".*", Optional ByVal DefaultValue As String = "", Optional ByVal 
    
    DefaultAccessProperty As FieldAccessPropertyEnum, Optional PropertyParamString As String, Optional ByVal DatabaseDataTypeName 
    
    As String, Optional DefaultFieldType As typImpExpFieldTypes = typImpExpFieldTypes.ietField, Optional Indexed As Boolean = 
    
    False)
    
      Dim MaxSize As Long
      If Not DefExists(FieldName) Then
        MaxSize = CharLength
        mFieldDefCol.Add Position & "," & FieldName & "," & CharPosition & "," & CharLength & "," & ValidationPattern & "," & 
    
    DefaultValue, FieldName
        Debug.Print FieldName
        Select Case DefaultAccessProperty
        Case FieldAccessPropertyEnum.faLiteral, FieldAccessPropertyEnum.faTrim
          If MaxSize = 0 Then MaxSize = 255
        Case Else
          MaxSize = 0
        End Select
        mFieldExtDefCol.Add Array(MaxSize, ValidationPattern, DefaultValue, DefaultAccessProperty, PropertyParamString, 
    
    DatabaseDataTypeName, DefaultFieldType, Indexed), FieldName
      End If
    End Sub
    
    Private Function DefExists(Index As Variant) As Boolean
      On Error Resume Next
      DefExists = VarType(mFieldDefCol(Index)) >= 0
    End Function
    
    SCRIPT FILE FUNCTION
    -----------------
    Sub InitializeFields()
      Set OMSPlacement = New clsFBugAsOMSPlacement
      Set OMSMaintenance = New clsFBugAsOMSMaintenance
    
      'Header Record
      ImpExp.AddFieldDef 1, "AIF-HEADER-RECORD.HDR-DATE", 15, 8, ".*"
    
      'New Work Record
      ImpExp.AddFieldDef 1, "AIF-EXP-DETAIL-RECORD.AIF-EXP-PRIMARY-KEY.AIF-EXP-ACCT-NBR", 1, 20, ".*"
      ImpExp.AddFieldDef 2, "AIF-EXP-DETAIL-RECORD.AIF-EXP-PRIMARY-KEY.AIF-EXP-RECORD-TYPE", 21, 1, ".*"
      ImpExp.AddFieldDef 3, "AIF-EXP-DETAIL-RECORD.AIF-EXP-PRIMARY-KEY.AIF-EXP-RECORD-SEQUENCE", 22, 2, ".*"
      ImpExp.AddFieldDef 4, "AIF-EXP-DETAIL-RECORD.AIF-EXP-TITLE", 24, 4, ".*"
      ImpExp.AddFieldDef 5, "AIF-EXP-DETAIL-RECORD.AIF-EXP-CUST-TYP", 28, 1, ".*"
      ImpExp.AddFieldDef 6, "AIF-EXP-DETAIL-RECORD.AIF-EXP-CORPORATE-Name.AIF-EXP-LAST-NAME", 29, 25, ".*"
      ImpExp.AddFieldDef 7, "AIF-EXP-DETAIL-RECORD.AIF-EXP-CORPORATE-Name.AIF-EXP-FIRST-NAME", 54, 15, ".*"
      ImpExp.AddFieldDef 8, "AIF-EXP-DETAIL-RECORD.AIF-EXP-ADDRESS.AIF-EXP-ADDR1", 69, 25, ".*"
      ImpExp.AddFieldDef 9, "AIF-EXP-DETAIL-RECORD.AIF-EXP-ADDRESS.AIF-EXP-ADDR2", 94, 25, ".*"
      ImpExp.AddFieldDef 10, "AIF-EXP-DETAIL-RECORD.AIF-EXP-ADDRESS.AIF-EXP-CITY", 119, 20, ".*"
      ImpExp.AddFieldDef 11, "AIF-EXP-DETAIL-RECORD.AIF-EXP-ADDRESS.AIF-EXP-COUNTY", 139, 15, ".*"
      ImpExp.AddFieldDef 12, "AIF-EXP-DETAIL-RECORD.AIF-EXP-ADDRESS.AIF-EXP-STATE", 154, 2, ".*"
      ImpExp.AddFieldDef 13, "AIF-EXP-DETAIL-RECORD.AIF-EXP-ADDRESS.AIF-EXP-ZIP-CODE", 156, 10, ".*"
      ImpExp.AddFieldDef 14, "AIF-EXP-DETAIL-RECORD.AIF-EXP-HOME-PHONE", 166, 16, ".*"
      ImpExp.AddFieldDef 15, "AIF-EXP-DETAIL-RECORD.AIF-EXP-WORK-PHONE", 182, 16, ".*"
      ImpExp.AddFieldDef 16, "AIF-EXP-DETAIL-RECORD.AIF-EXP-BIRTH-DATE", 198, 8, ".*"
      ImpExp.AddFieldDef 17, "AIF-EXP-DETAIL-RECORD.AIF-EXP-POE-NAME", 206, 40, ".*"
      ImpExp.AddFieldDef 18, "AIF-EXP-DETAIL-RECORD.AIF-EXP-POE-ADDRESS", 246, 40, ".*"
      ImpExp.AddFieldDef 19, "AIF-EXP-DETAIL-RECORD.AIF-EXP-LOAN-TYPE-CD", 286, 4, ".*"
      ImpExp.AddFieldDef 20, "AIF-EXP-DETAIL-RECORD.AIF-EXP-OFFICER-CODE", 290, 6, ".*"
      ImpExp.AddFieldDef 21, "AIF-EXP-DETAIL-RECORD.AIF-EXP-USER-FIELD", 296, 10, ".*"
      ImpExp.AddFieldDef 22, "AIF-EXP-DETAIL-RECORD.AIF-EXP-ATTY-CODE", 306, 4, ".*"
      ImpExp.AddFieldDef 23, "AIF-EXP-DETAIL-RECORD. AIF-EXP-DEALER-CODE", 310, 16, ".*"
      ImpExp.AddFieldDef 24, "AIF-EXP-DETAIL-RECORD.AIF-EXP-CHG-OFF-REASON", 326, 4, ".*"
      ImpExp.AddFieldDef 25, "AIF-EXP-DETAIL-RECORD.AIF-EXP-ACCT-STATUS", 330, 3, ".*"
      ImpExp.AddFieldDef 26, "AIF-EXP-DETAIL-RECORD.AIF-EXP-MATH-INT-RATE", 333, 4, ".*"
      ImpExp.AddFieldDef 27, "AIF-EXP-DETAIL-RECORD.AIF-EXP-LIABLE-FLAG", 337, 1, ".*"
      ImpExp.AddFieldDef 28, "AIF-EXP-DETAIL-RECORD.AIF-EXP-RECEIPT-DATE", 338, 8, ".*"
      ImpExp.AddFieldDef 29, "AIF-EXP-DETAIL-RECORD.AIF-EXP-CONT-DATE", 346, 8, ".*"
      ImpExp.AddFieldDef 30, "AIF-EXP-DETAIL-RECORD.AIF-EXP-CHG-OFF-DATE", 354, 8, ".*"
      ImpExp.AddFieldDef 31, "AIF-EXP-DETAIL-RECORD.AIF-EXP-LAST-PAY-DATE", 362, 8, ".*"
      ImpExp.AddFieldDef 32, "AIF-EXP-DETAIL-RECORD.AIF-EXP-CHG-OFF-AMT", 370, 10, ".*"
      ImpExp.AddFieldDef 33, "AIF-EXP-DETAIL-RECORD.AIF-EXP-ASSOC-COSTS", 380, 9, ".*"
      ImpExp.AddFieldDef 34, "AIF-EXP-DETAIL-RECORD.AIF-EXP-ACCRU-INT", 389, 9, ".*"
      ImpExp.AddFieldDef 35, "AIF-EXP-DETAIL-RECORD.AIF-EXP-CURRENT-BALANCE", 398, 10, ".*"
      ImpExp.AddFieldDef 36, "AIF-EXP-DETAIL-RECORD.AIF-EXP-NET-PRIN", 408, 9, ".*"
      ImpExp.AddFieldDef 37, "AIF-EXP-DETAIL-RECORD.AIF-EXP-NET-ASSOC-COSTS", 417, 9, ".*"
      ImpExp.AddFieldDef 38, "AIF-EXP-DETAIL-RECORD.AIF-EXP-NET-INTER", 426, 9, ".*"
      ImpExp.AddFieldDef 39, "AIF-EXP-DETAIL-RECORD.AIF-EXP-LAST-COMMENT-1", 435, 40, ".*"
      ImpExp.AddFieldDef 40, "AIF-EXP-DETAIL-RECORD.AIF-EXP-LAST-COMMENT-2", 475, 40, ".*"
      ImpExp.AddFieldDef 41, "AIF-EXP-DETAIL-RECORD.AIF-EXP-LAST-COMMENT-3", 515, 40, ".*"
      ImpExp.AddFieldDef 42, "AIF-EXP-DETAIL-RECORD.AIF-EXP-LAST-COMMENT-DATE", 555, 8, ".*"
      ImpExp.AddFieldDef 43, "AIF-EXP-DETAIL-RECORD.AIF-EXP-SECOND-NAME1", 563, 25, ".*"
      ImpExp.AddFieldDef 44, "AIF-EXP-DETAIL-RECORD.AIF-EXP-SECOND-NAME2", 588, 15, ".*"
      ImpExp.AddFieldDef 45, "AIF-EXP-DETAIL-RECORD.AIF-EXP-MONTHLY-INCOME", 603, 9, ".*"
      ImpExp.AddFieldDef 46, "AIF-EXP-DETAIL-RECORD.AIF-EXP-OTHER-INCOME", 612, 9, ".*"
      ImpExp.AddFieldDef 47, "AIF-EXP-DETAIL-RECORD.AIF-EXP-MONTHLY-PYMT", 621, 9, ".*"
      ImpExp.AddFieldDef 48, "AIF-EXP-DETAIL-RECORD.AIF-EXP-OTHER-OBLIG", 630, 9, ".*"
      ImpExp.AddFieldDef 49, "AIF-EXP-DETAIL-RECORD.AIF-EXP-OWN-RENT-CODE", 639, 1, ".*"
      ImpExp.AddFieldDef 50, "AIF-EXP-DETAIL-RECORD.AIF-EXP-RECOVERY-SCORE", 640, 4, ".*"
      ImpExp.AddFieldDef 51, "AIF-EXP-DETAIL-RECORD.AIF-EXP-NEXT-PAY-DATE", 644, 8, ".*"
      ImpExp.AddFieldDef 52, "AIF-EXP-DETAIL-RECORD.AIF-EXP-LAST-INT-DATE", 652, 8, ".*"
      ImpExp.AddFieldDef 53, "AIF-EXP-DETAIL-RECORD.AIF-EXP-LAST-CONTACT-DATE", 660, 8, ".*"
      ImpExp.AddFieldDef 54, "AIF-EXP-DETAIL-RECORD.AIF-EXP-COMM-PCT", 668, 4, ".*"
      ImpExp.AddFieldDef 55, "AIF-EXP-DETAIL-RECORD.AIF-EXP-HOME-PHONE-FLAG", 672, 1, ".*"
      ImpExp.AddFieldDef 56, "AIF-EXP-DETAIL-RECORD.AIF-EXP-WORK-PHONE-FLAG", 673, 1, ".*"
      ImpExp.AddFieldDef 57, "AIF-EXP-DETAIL-RECORD.AIF-EXP-ADDRESS-FLAG", 674, 1, ".*"
      ImpExp.AddFieldDef 58, "AIF-EXP-DETAIL-RECORD.AIF-EXP-CUSTOMER-ID", 675, 16, ".*"
      ImpExp.AddFieldDef 59, "AIF-EXP-DETAIL-RECORD.FILLER", 691, 1, ".*"
      ImpExp.AddFieldDef 60, "AIF-EXP-DETAIL-RECORD.AIF-EXP-PARENT-ORG-CODE", 692, 4, ".*"
      ImpExp.AddFieldDef 61, "AIF-EXP-DETAIL-RECORD.AIF-EXP-AGENCY-CODE", 696, 4, ".*"
      ImpExp.AddFieldDef 62, "AIF-EXP-DETAIL-RECORD.AIF-EXP-FORMAT-CODE", 700, 1, ".*"
    
    End Sub
    Last edited by loquin; 02-16-07 at 15:46.

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    what version of VB are you using?
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  3. #3
    Join Date
    Jul 2006
    Posts
    157
    I am using VB6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •