Help/Systems SEQUEL Software PowerTech Skybot Software
Help/Systems
The World's Leader in IBM iSeries Software Solutions

May 2011

Using Robot/SCHEDULE Enterprise and Robot/ALERT to distribute files

Take advantage of a powerful Robot/SCHEDULE Enterprise feature

Robot/SCHEDULE Enterprise can monitor for a file on an agent (server) and transfer that file to the enterprise server for Robot/ALERT to distribute. Assuming that you have the Robot/SCHEDULE Enterprise agent software installed on the Windows®, UNIX®, or Linux® server you want to monitor, here’s an example of how you can make this work. First, use the Robot/SCHEDULE Enterprise Agent Event Properties window (Figure 1) to create a File Event-type Agent Event Monitor. This monitor checks for files being added to a specific directory on your agent. (For a discussion of Agent Events, see the July 2009 issue of Robot/NEWS Flash.)

Figure 1: Create a File Event-type Agent Event Monitor

Next, use the Robot/SCHEDULE Enterprise Job Properties window to create an Agent-type Robot/SCHEDULE job for the agent where the file exists. This job should react to the Agent Event defined in Figure 1. On the job’s Agent Output tab (Figure 2), specify the server directory and either a document name or a wildcard specification (*.*) for all documents.

Note: Be careful if you decide to use a wildcard specification.

Figure 2: Specify the enterprise server directory and document(s)

Next, in the Robot/SCHEDULE Enterprise Copy Agent Files window (Figure 3) use a wildcard specification (*.*) to copy all documents from the directory C:\ENTERPRISE\.

Also specify the IFS directory to copy the files to, and the Robot/ALERT device that will distribute the files electronically from the IFS directory.

Note: If you do not specify Replace existing IFS files, you can use the Robot/SCHEDULE AGEIFS command to clean up the IFS directory.

Figure 3: Specify an IFS directory and Robot/ALERT device

That’s it. For housekeeping, you also can add a command to your agent job that clears the agent directory after the files are copied to the enterprise server.

Contributed by Kim Loesch, Research Technical Consultant



Using Robot/REPORTS & Robot/ALERT to create and e-mail PDF files

You can combine Robot/REPORTS with Robot/ALERT to create what I like to call a “PDF outqueue.” Robot/REPORTS converts every spooled file you place into this output queue into a PDF file, and Robot/ALERT e-mails the PDF file to you. This can be really useful for your users—they can PDF any spooled file to their desktop.

Here’s an example of how you could do this for a user named Chuck. First, create an output queue for the user using the following command:

(CRTOUTQ OUTQ(CHUCKPDF))

Next, have Robot/REPORTS monitor the queue by using the Start Output Queue Monitoring option on the Setup Menu.

Then, from the Robot/REPORTS Recipient panel (Figure 4), set up the recipient in Robot/REPORTS using the user’s e-mail address and IFS home directory (if one exists).

Figure 4: Define a recipient

Now, create a Robot/REPORTS Report Set to monitor for all spooled files from this output queue by using the keyword *ALL. Set the archiving strategy for this report set to one day and on-line (extended archiving, such as short-term or long-term, doesn’t make sense).

For comparison criteria, specify Spool Name equal to *ALL and Output Queue equal to CHUCKPDF.

From the Report Distribution Output Options panel (Figure 5), add the recipient to the *REPORT segment, using a distribution type of D (PDF) for the recipient and a generic name for the PDF file. Specify Yes (Y) for E-Mail Upon Completion.

Figure 5: Specify report distribution output options

Now, whenever Chuck places a spooled file in this output queue, Robot/REPORTS captures it, converts it to PDF, and e-mails him the PDF file. Nice!

Contributed by Chuck Losinski, Product Support Manager

Q & A

Q: What is the difference between the three flavors of the REPEAT variable in Robot/CONSOLE OPAL?

A: The three OPAL variables count messages differently:

  • REPEAT—The REPEAT variable uses the number of times a message has repeated within the time limit set by the message set or by system defaults. To be considered a REPEAT, the messages being compared must match exactly—the message ID and the message data must both match.
  • REPEATJOB—Similar to REPEAT (the message IDs must match), but the message data is not compared. The messages must be from the same job.
  • REPEATMSG—Similar to REPEAT (the message IDs must match), but the message data is not compared and the messages do not have to come from the same job.

Q: Do I need administrator rights to install the Product Maintenance Wizard on my PC?

A: Yes

Comments

REPEATSET

I preferred the functionality of REPEATSET in certain circumstances. The current options are too specific. Sometimes I like to define a message set to collect all messages of a certain type or group... then process differently based on how many times the set is fired. My request would be to please not drop support for REPEATSET. Thanks,

PDF creation

I went one step further and created the output queue as PDF and then used it as a common output queue for everyone in the company. I created a report name for each user that requested this capability and userd the userid to qualify the reports to each user. Then with one output queue and one report set, we can use a common process to get a PDF. We know have ESEND on our system and use it to manage this output now. It takes less steps to setup a new user. Our customers love this option. I also have another queue called TXT for a text version of a spool file.

PDF outq

Kerry, Very cool way to set it up. Well done!

IFS Files

Why do you use *RECIPIENT in the Directory field in the PDF Target, I use PDF REPORTS in the Directory field. What command can I use to see how big my IFS files are getting.

*RECIPIENT

*RECIPIENT will take the target IFS directory from the individual's recipient setup. If you specify "PDF REPORTS" I would guess someone created a custom directory for you to store PDFs to. So to I would guess you are using only one directory for all your recipients rather than a custom home directory for each recipient (/home/chuck, etc). This is fine unless you are re-using an identical PDF document name for different spool files. If you use the same PDF document name for a payroll report and an accounts payable report one will overwrite the other. This could possibly cause problems depending upon the timing of when each was created and emailed out. You can use the WRKLNK '/PDF REPORTS' command to see how many files are in this directory. Otherwise if you have Robot/SCHEDULE you could use the AGEIFS command (included) to clean out old PDF documents or Robot/SPACE has the same feature plus will report on the size of the directory and growth rate, etc. Hope this helps!