Kal Posted November 10, 2017 Share Posted November 10, 2017 Is there a way for the .cfg & .msg files to output with the name of the input data filename? Input Data file = datafile01.txt cfg file needs to output name datafile01.cfg msg file needs to output name datafile01.msg Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted November 10, 2017 Share Posted November 10, 2017 In Desktop / Creator, no, there's no way to change the names of the CFG or .msg files. For what reason would you need to change them? Quote Link to comment Share on other sites More sharing options...
Kal Posted November 11, 2017 Author Share Posted November 11, 2017 When I have to compose 10 to 40 different files, the company wants to keep each file it creates for "logging". To review if needed for errors. I really just need the .msg file with all the record counts. Or is there a way to create a text file with the unique input name with the same info as the .msg file? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted November 13, 2017 Share Posted November 13, 2017 When I have to compose 10 to 40 different files, the company wants to keep each file it creates for "logging". To review if needed for errors. It sounds like you're on the cusp of needing a more automated solution using FusionPro Server. I really just need the .msg file with all the record counts. Or is there a way to create a text file with the unique input name with the same info as the .msg file? I would use the XML log file for that. It's more easily parse-able than the main .msg log file. In your OnJobStart rule, you can do this: FusionPro.Composition.CreateXMLLogFile(); The XML log will be in the same location as the main .msg file, with the same name and ".xml" on the end. Or you can do something like this, also in OnJobStart, to specify the path and name of the XML log: FusionPro.Composition.CreateXMLLogFile(FusionPro.Composition.inputFileName + ".xml"); You could, of course, use any name you want, or redirect the XML log to any folder you want, for example: FusionPro.Composition.CreateXMLLogFile("/custom folder/" + GetFileName(FusionPro.Composition.inputFileName) + ".xml"); Or, in FusionPro Server, you can add the "XMLLogFile=" setting to the CFG file, with the path, for any job, without having to add or modify the OnJobStart rule. Again, FP Server allows much more automation. You might also consider adding some error handling to your templates, so that you don't compose "bad" output in the first place. On the Advanced tab of the Composition Settings, you can set the "Abort on Errors of This Type" and then an abort mode. Or you can call FusionPro.Composition.Abort() for any condition you want, in any rule. I still don't understand why you need custom names for CFG files. Quote Link to comment Share on other sites More sharing options...
Kal Posted November 13, 2017 Author Share Posted November 13, 2017 Thanks Dan, I think we can work with the XML log file. As for why, it's for a few of our clients that for some reason want log files of all of their composed files. We've been doing them manually by renaming the .msg files. I was hoping to avoid the manual part because it really slows us down and mistakes are made doing this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.