11 Replies Latest reply on Mar 20, 2013 8:04 PM by 847750

    Create and execute .bat file in FDM

    847750
      Hi,

      We are loading data to HFM through FDM. I've used Batch processing and loaded data to HFM. I also used custom script to load data to HFM by scheduling script in Task Manager. Now,I need to create a batch file which should complete 4-fish process in FDM and load data to HFM.Can this be achieved or is scheduling script through task manager is the only way to automate FDM load process..

      Thanks in advance
        • 1. Re: Create and execute .bat file in FDM
          user10757003
          Have a search in the FDM documentation (or on the web) for UPSSHELL.EXE. this provides another option for executing a custom script to execute the batch process. there is also a function called fExecuteCustomScriptAsync which initiates the UPSSHELL.EXE, which might allow you to intiate it from a web script within FDM if you wanted.
          • 2. Re: Create and execute .bat file in FDM
            847750
            Hi,

            Thanks for your reply.

            I went through UPSSHELL.exe and tried implementing it.

            Below is the statement I have used (only statement in my file)

            D:\xxxx\SharedComponents\upsShell.exe
            CustomScriptEx=TEST~xxxx~xxxx~~Loadbalanceserver~D:\Logs.txt~xxxx.uss~1033~1

            This script should load maps in FDM after successful execution. But, nothing happens after I execute the batch, even log file is also not getting generated.

            I'm able to load map when I maunally run custom script through web client.

            Can you let me know what is that I'm missing here..

            Thanks,

            Edited by: 844747 on Mar 13, 2013 9:47 AM
            • 3. Re: Create and execute .bat file in FDM
              847750
              Hi All,

              Any suggestions??
              • 4. Re: Create and execute .bat file in FDM
                user10757003
                Have you tried it without the Log.txt? I think you just need the directory, not file name.
                • 5. Re: Create and execute .bat file in FDM
                  847750
                  Hi,

                  I've tried without Logs.txt and tried.I'm not getting any error, but still batch is not processing my script.Also, nothing gets generated in logs.


                  D:\xxxx\SharedComponents\upsShell.exe
                  CustomScriptEx=TEST~xxxx~xxxx~~Loadbalanceserver~D:\Logs\~xxxx~1033~1

                  I have also included below code in existing code,but of no use

                  Dim BATCHENG

                  'Initialize batch engine
                  Set BATCHENG = CreateObject("upsWBatchLoaderDM.clsBatchLoader")
                  BATCHENG.mInitialize API, SCRIPTENG

                  Is there anything else I'm missing

                  Thanks
                  • 6. Re: Create and execute .bat file in FDM
                    user10757003
                    Instead of specifying the loadbalanceserver, try ~localhost~ (My memory from a few years back was that it was server/host rather than load balancer, although they could be the same.)

                    Edited by: user10757003 on 15-Mar-2013 14:36
                    1 person found this helpful
                    • 7. Re: Create and execute .bat file in FDM
                      847750
                      Hi,

                      Thanks for your suggestion.I replaced load balancer with local host and could load data in FDM.

                      But when, I use the same statement to load maps, I am not able to load maps. I wrote a custom script which picks files from Inbox folder and load them in FDM.

                      The script works perfectly when I execute manually. But when I execute the same through upsshell.exe, maps are not loaded to FDM.

                      Also, In either case (batch successfully executed or not), logs are not getting generated. Can you let me know, if we can use upsshell.exe for any custom script or only for batchload script.

                      Thanks
                      • 8. Re: Create and execute .bat file in FDM
                        847750
                        Hi,

                        Thanks for your suggestion.I replaced load balancer with local host and could load data in FDM.

                        But when, I use the same statement to load maps, I am not able to do it. I wrote a custom script which picks files from Inbox folder and load them in FDM.

                        The script works perfectly when I execute manually. But when I execute the same through upsshell.exe, maps are not loaded to FDM.

                        Also, In either case (batch successfully executed or not), logs are not getting generated. Can you let me know, if we can use upsshell.exe for any custom script or only for batchload script.

                        Thanks
                        • 9. Re: Create and execute .bat file in FDM
                          847750
                          Hi All,

                          Any suggestions?

                          Thanks
                          • 10. Re: Create and execute .bat file in FDM
                            997870
                            You can use upsShell.exe to run any custom script, not just batchload scripts.

                            Try looking in the tAuditLog table to see if there is any error message there.
                            • 11. Re: Create and execute .bat file in FDM
                              847750
                              Hi,

                              I looked into application schema where I did not find tAuditLog table.Can you let me know where can I get this table.

                              Thanks