I have a job which gives a report with some value. I want that report as. a text file to be transferred to another server. is there a way to do that from automic. or any code can help?
The simplest solution here would probably be to update your job so that it redirects the output to a file so that you can then move it around with a file transfer job.
E.g., "<batch script> > output.txt"
Another idea is to code a post-process script that uses the prep_process_report() function to access the report and then use the write_process() function to write it out to a flat file of your choice. I haven't used this method before, but I tested it once and was impressed by its speed. Here is my test-code;
:SET &HND# = PREP_PROCESS_REPORT(,&$RUNID#,'REP'):SET &RET# = WRITE_PROCESS(&HND#,'<path>\<filename>',&$AGENT# ,'<my.login.object>',OVERWRITE):print "Results of write operation: &RET#":CLOSE_PROCESS &HND#
Retrieving data ...