1 Reply Latest reply: Sep 11, 2012 8:09 AM by macyankee86 RSS

    Batch Script Processing - Please Help

    788350
      Hello,

      Have an issue in my version 11.1.2.1, for my batch script. In my earlier version, 11.1.2.0.1, the batch script works fine and is able to generate messages when a validation error has occurred.

      However when we upgraded, my batch script can no longer generate my email messages. Does anyone have any suggestions on how to trouble shoot this issue.

      I keep getting this error. Shown below is a portion of our code, and we are noticing that it usually bombs at around Test for PoV Errors section.

      *1032 - Invalid character Script=CreateXSL*
      Line 43

      'Use Serial Processing
      '--------------------------
      'Declare Local Variables
      Dim lngProcessLevel
      Dim strDelimiter
      Dim blnAutoMapCorrect

      'Initialize Variables
      lngProcessLevel = 8 'Up-To-Load
      strDelimiter = "~"
      blnAutoMapCorrect = 0

      'Create the file collection
      Set BATCHENG.PcolFiles = BATCHENG.fFileCollectionCreate(CStr(strDelimiter))

      'Execute a Standard Serial batch
      BATCHENG.mFileCollectionProcess BATCHENG.PcolFiles, CLng(lngProcessLevel), , CBool(blnAutoMapCorrect)

      'Assign Batch ID to a variable
      bid = BATCHENG.PcolFiles.strBatchID

      'Check if there are any files in the batch job
      bfilelist = BATCHENG.PcolFiles.Count

      'Test if a batch job was initiated (files were in OpenBatch)
      If bfilelist > 0 Then

      '******************************************************************
      'Test for POV Errors
      '******************************************************************

           'Determine if the file names conform to the BatchLoader requirements
           strSQL = "Select * FROM TBatchContents "
           strSQL = strSQl & "WHERE BatchPOVValid ='0' "
           strSQL = strSQL & "And BatchID = '" & bid & "'"
           
           'Declare local Variables
           Dim rs
           Dim varValue
           
           'Initialize the recordset object
           Set rs = DW.DataAccess.farsKeySet(strSQL)
           
           'Process Records
           If Not rs.BOF And Not rs.EOF Then
                Do While Not rs.EOF
                     'Process the field value
                     varValue = rs.Fields("BatchFileTitle").Value
                     strpoverr = strpoverr & vbcrlf & " " & VarValue
                     'Move to the next record
                     rs.Movenext
                Loop
           Else
                'No Records
           End If
           
           'Close and destroy objects
           rs.Close
           Set rs = Nothing
           
           'Test for POV errors
           If varValue <> "" Then

      '******************************************************************
      'Send Email - POV Errors
      '******************************************************************          
                'Declare local variables
                Dim strMessage
                
                'Set the message value
                strMessage = "The Hyperion FDM Batch job failed because the following file(s) do not conform to the BatchLoader naming convention requirements:" & vbcrlf
                strMessage = strMessage & strpoverr & vbcrlf & vbcrlf
                strMessage = strMessage & "The FDM BatchLoader file naming convention is: FileID~FDM Location~FDM Category~FDM Period~RR.CSV"
                
                strSubject = "FDM Batch Error - File Point of View"

                SCRIPTENG.fCompileScript "SendMail", SCRIPTENG.fOpenScripts("Custom", "SendMail")
                Call SendMail(strMessage,strSubject,"")

           'No POV errors
           End If
      '     Else