7 Replies Latest reply: May 15, 2014 9:55 AM by Grant Perkins RSS

    Command line exports fail

    rnd _

      I have an export I call posipay.  If I open Monarch and apply the model and manually go to the export, everything is fine. 

       

      However, if I try the same export on this file using a command line batch file, it fails.  The error message prints in the box as it attempts to export, but it isn't on the screen long enough for me to read it.  I have run the export about 50 times trying to read the error message.  All I can read is "Export Failed....   The rest of the message is unreadable because of the speed.

       

      Why would the export work properly when doing it within Monarch, but fail using a batch file?

        • Command line exports fail
          Tom Whiteside

          What format or application are you exporting to?

          • Command line exports fail
            rnd _

            I have named the export file posipay.asc.  Therefore, I believe it will export in a comma delimited format.  Thanks for considering helping me.

            • Command line exports fail
              Tom Whiteside

              There is an old Knowledge Base article that talks about the difference between exporting to a tab delimited text file and to a comma delimited text file.  If I read it correctly, using a .txt extension in a batch file command will cause the file to properly export to a tab delimited text file.

               

              However, the comma delimited text file is not quite as easy to achieve.  While you are free to specify any file extension other than .txt - - as in your choice of .asc - - or to specify no extension at all, and then use Windows Explorer to add one later on - - I believe I'm reading correctly when it implies that you must manually choose Export Table - Save As Type - Delimited Text (.*).  Since your manual exports are working, I'm sure you are being forced to specify this choice as you do each one.

               

              Hopefully I'm overlooking something simple, but this seems to imply that command line export syntax of filename.txt will always export to tab delimited text, but that command line export syntax of filename.asc (or .*) is not specific enough to create comma delimited text.

               

              As I am nowhere near an expert on this,   :confused:    can anyone (a) supply working command line switches to specify export as comma delimited text files, and/or, (b) point out faulty assumptions I am making?  Either option will be appreciated!

              • Command line exports fail
                rnd _

                Thanks Tom for your help. 

                I have not told you that I have about 14 other exports that work fine using the same filename.asc as the naming convention. 

                I am beginning to think that there might be something peculiar with the model or something unrelated to the naming. 

                Perhaps I should really take a hard look at the report file, model and create new ones.  (The model is far from complex.)

                • Command line exports fail
                  Tom Whiteside

                  Based on your information given, I'm not able to diagnose your problem.  Hopefully someone else on the Forum will be able to take a look at the specifics of your model and your coding and understand what is going on.

                   

                  Best regards,

                  • Command line exports fail
                    rnd _

                    Let me answer my own question.  Upon further head banging, I finally realized that there was a summary sort that still existed but didn't refer to anything currently defined. 

                    After I deleted that, the export started working.  It is peculiar that I could export while within Monarch, but I couldn't export using the command files. 

                    So, there you have it.

                    • Command line exports fail
                      Grant Perkins

                      Originally posted by rnd:

                      I finally realized that there was a summary sort that still existed but didn't refer to anything currently defined. 

                      After I deleted that, the export started working.  It is peculiar that I could export while within Monarch, but I couldn't export using the command files. 

                      So, there you have it. /b[/quote]Interesting and useful to know and be able to refer back to when these rare events occur.

                       

                      When you ran the process outside the batch did you get the error message or did the program just ignore the problem?

                       

                      Grant