When Optio breaks with a Fatal error on a spoolfile it creates an error in the eventlog and discards the spoolfile. In most cases it also diverts all of the output into hyperspace. In some cases it is impossible or hard to get the spoolfile back, and you still want to see the output.
In Windows it can even happen that the spoolfile in the printerspool directory (.SPL file) is NOT exactly the same as the file sent to ODCS. you can use this code to harvest the file. (remove the delete part at the end)
This code is rather Windows specific, as you unix gurus should not have these strange problems. Ask your local admin to change the ocserver/eiserver script to do something similar, there is a big chance that they can do that.
Add the following code to your DCL program using notepad :
Please Note that the files are stored in a directory D:\archive\BusySpool
it is assumed to exists, change the path according to your needs.
!! Created by: Optio DesignStudio Version X.Y.Z !! NODES: on !! RANGES: on DOCUMENT "Unnamed"
// Start New code to save the file part 1 LET TmpIncomingSpool = PARAMETER("*",1) // Get the name of the temp spool file IF WHERE("~",TmpIncomingSpool) = 0 THEN // check to see if you started from command line LET TmpIncomingSpool = "~"& NOW() & ".tmp" // if so, create an alternative name END IF // create a new, rather unique (not 100% unique !) file name in a temp directory LET TmpIncomingSpoolName = "D:\archive\BusySpool\Busy_" & TmpIncomingSpool[1,WHERE("~",TmpIncomingSpool)->LENGTH(TmpIncomingSpool)] // copy the file from it's original loction to the temp folder LET ignore = SYSTEM("COPY " & TmpIncomingSpool & " " & TmpIncomingSpoolName) // End New code to save the file part 1
LOAD "~fun\ODUtils77.fun" SET INPUT "Someinput" LET globals::__FirstPass = TRUE SET SEQUENCE "PrimaryInput", "Part1", "PartPass" CALL "__InitWorksheets" PROCESS PARTS LET globals::__LastPass = TRUE PROCESS "Part1"
// Start New code to save the file part 2 LET ignore = SYSTEM("DEL " & TmpIncomingSpoolName) // delete the file because all is well // End New code to save the file part 2
END DOCUMENT
As is stated in the comment, the filename created is not unique, but in normal circumstances it is adequate, if you have a large amount of printing, or restart the server often, you might want to add & NOW() &
somewhere.