XCOPY equivalent on UNIX box for UBE CSV file copying

johndanter

Legendary Poster
Hi folks,

A while ago I wrote a little nifty UBE to sweep completed jobs F986110 on email out the CSV/PDF attachment if a match on UBE and VERS was found in a config table of mine.
https://www.jdelist.com/vb4/showthread.php/48223-Emailing-completed-UBE-jobs-CSV-PDF

I'd like to add to this functionality and actually move the competed jobs CSV/PDF from the print Q to a network location for future FTP access. So maybe I could use BSFN Call External Program to do this by writing a unix command to move/copy the file.

Has anyone here done something like this before? I know I could create the file myself but the CSV file is very complex and I don't have the time/resources to code it all in.

Thanks

John
 

Larry_Jones

Legendary Poster
Actually John I think you can.
The Report Level Event "End Report (Future)" triggers AFTER the report PDF (and presumable the CSV) file has been created, written to, and closed.
In the past I've placed code to email UBE output in this event.

Cheers,
Larry
 

Larry_Jones

Legendary Poster
Whenever we've done CSV output we've rolled our own inside UBEs. Allowing us to control destination, do something with the file after its been closed, don't have to worry about alignment issues, etc.
 

johndanter

Legendary Poster
Whenever we've done CSV output we've rolled our own inside UBEs. Allowing us to control destination, do something with the file after its been closed, don't have to worry about alignment issues, etc.

Yeah I don't have the time to do that now sadly. Hence looking for alternatives
 

johndanter

Legendary Poster
Thanks folks.

I've managed to get the Email side of this working by getting the attachment in the Report Level Event "End Report (Future)" (as suggested above - thank Larry)

All you need to do is get the UBE job number (there are many way to do this but I've used Get Audit Info B9800100 to get the machine key, then used B984054 to get the Job # using machine key as szExecutionHostName then use mnServerJobNumber to create the filename as follows:

OBJ_VERS_JOBNBR_PDF.csv

Then using a simple C+ BSFN to use API GetPrintQueueDirectoryPathName I slap them all together to pick up the attachment and out of the door she goes via EmailMergeLetter B0500725

Now I need to plug in the FTP side of things using Execute External Program and I am done
 
Top