9 Replies Latest reply on Sep 22, 2011 6:17 PM by Trip

    FDM 9.3.3 AftExportToDat Script fails in 11.1.2.1

    Trip
      Any help would be appreciated. We have a script that appends the previously loaded data file to the current data file and puts NODATA for all appened lines to account for any changes to the data from one file to another. When running this 11.1.2.1 the script fails with a 10002 error in the log:

      Error:
      Code............10002
      Description.....Data Load Errors.
      Procedure.......clsHPDataManipulation.fDBLoad
      Component.......T:\oracle\Middleware\EPMSystem11R1\products\FinancialDataQuality\SharedComponents\AdapterComponents\fdmFM11xG5E\fdmFM11XG5E.dll
      Version.........145

      The load file is created however the NODATA lines at the bottom of the file are all in erroneous characters:

      䄀䌀吀唀䄀䰀㬀㈀ ㄀㄀㬀䴀愀礀㬀夀吀䐀㬀䔀㘀

      Has anyone run into thsi problem? Seems like some sort of file encoding issue.
        • 1. Re: FDM 9.3.3 AftExportToDat Script fails in 11.1.2.1
          SH_INT
          11.1.2.1 only supports scripts that are saved as UNICODE. Make sure your AftExportToDat is in Unicode format.
          • 2. Re: FDM 9.3.3 AftExportToDat Script fails in 11.1.2.1
            Trip
            How would I check that it is unicode format?
            • 3. Re: FDM 9.3.3 AftExportToDat Script fails in 11.1.2.1
              SH_INT
              Navigate to the Inbox\Scripts\Event folder. You will find the AftExportToDat script here. Open it with notepad and then save it as Unicode and retest.
              • 4. Re: FDM 9.3.3 AftExportToDat Script fails in 11.1.2.1
                Trip
                I tried this, but the load file created still appends the end of the file with erroneous characters instead of the NODATA lines. Does the script somehow have to be re-imported into the workbench?
                • 5. Re: FDM 9.3.3 AftExportToDat Script fails in 11.1.2.1
                  SH_INT
                  Take a copy of the script body contents. Delete the script file from the Inbox\Scripts\Event folder. In workbench open the AftExprtToDat script and paste your copied script body and save. See if that works.
                  • 6. Re: FDM 9.3.3 AftExportToDat Script fails in 11.1.2.1
                    Trip
                    Tried that already with no luck. Strange since this script is not much different that the examples the give in the Workbench admin guide as far as appending a file. If I go to the Outbox and open any of the files and save as the Notepad encoding comes up as Unicode. I am at a loss.
                    • 7. Re: FDM 9.3.3 AftExportToDat Script fails in 11.1.2.1
                      beyerch2
                      Perhaps, I'm misunderstanding; however, I do not understand why you are focusing on the script text encoding here. If the file was generated, incorrectly or not, that means the script executed. If the script was unreadable due to text encoding issues, it would not have execute nor would it have created the output file.

                      I think you need to look at the settings provided in HFM for the application. Ensure that the encoding file option is set to unicode. I'm guessing in the application it is set as ASCII and the script is writing out unicode which is why you see garbage.

                      Another way to check this is to open the file in a HEX editor. Assuming you are using US code page, you should see the output you are looking for except that there are extra bytes in front of each character. This is because Unicode is a 2 byte character representation where ASCII is one byte. Is using US code page, the second byte would have the same value as the only byte in ASCII, etc. This would be a dead giveaway that the file type for the output is being set incorrectly.
                      • 8. Re: FDM 9.3.3 AftExportToDat Script fails in 11.1.2.1
                        Robb Salzmann
                        >

                        䄀䌀吀唀䄀䰀㬀㈀ ㄀㄀㬀䴀愀礀㬀夀吀䐀㬀䔀㘀

                        Has anyone run into thsi problem? Seems like some sort of file encoding issue.
                        >

                        I see those too, usually when I have drill through enabled. FWIW everything works fine with those characters in the file - so i think you can troubleshoot in a different direction.

                        AFAIK, if a record has nodata, FDM will not attempt to load it, therefore there wont be any nodata records.

                        Regards,
                        Robb Salzmann
                        • 9. Re: FDM 9.3.3 AftExportToDat Script fails in 11.1.2.1
                          Trip
                          Thanks all for the help. We have figured out the issue. Our original script had the two lines below that needed to be edited:

                          'Open the last dat file for read only
                          Set f1 = fso.OpenTextFile(strLastDatFile, 1)

                          'Open the new dat file for appending
                          Set f2 = fso.OpenTextFile(strFile, 8)

                          We needed to add additional parameters to the lines to indicate that it should read and append the file with Unicode format. Placing the -1 fixes this as shown below.

                          Open the last dat file for read only
                          Set f1 = fso.OpenTextFile(strLastDatFile, 1 , False , -1)

                          'Open the new dat file for appending
                          Set f2 = fso.OpenTextFile(strFile, 8 , False , -1)

                          In 11.1.2.1 they took away the Configuration Setting allowing you to choose ASCII or Unicode for File Encoding (or at least it is not an option in that list anymore) so hardcoding it in the script worked.

                          Thanks for all the responses.