Mailing a Report [ HP DeskManager Customization ] MPE/iX 5.0 Documentation
HP DeskManager Customization
Mailing a Report
An application is run once a week by the Sales and Marketing department.
It produces a report showing sales figures for each region during the
previous week and projected sales figures for the next 52 weeks.
The application is run overnight because it creates a heavy load on the
system. The following morning the report is photocopied and mailed to
each regional sales manager.
Could this report be distributed automatically using HP Desk?
Solution A
Run the application overnight as usual, but always write the report to
the same MPE file. Write a script which mails the MPE file to a
Distribution List, held in the Public Distribution Lists folder,
containing the names of all the regional sales managers.
For example:
SEND (REPORT) TO "REGIONAL SALES MANAGERS"
URGENT
MAIL
The System Administrator could execute the script manually after signing
on to HP Desk the next day. However, the Administrator would have to
remember to do this and it would take some time, since the report is
copied into HP Desk before it is mailed.
A better method would be to set up a job which runs HP Desk and executes
the script. This job could be scheduled to start automatically at any
convenient time when HP Desk is available.
Some points to consider are:
* The application and Mailmaint can overlap because the application
does not need to access the HP Desk database.
* The script file cannot change the Distribution List, but the
System Administrator can update it manually from within HP Desk.
* The report will not be mailed until HP Desk is run and the script
executed.
Solution B
Create a job which runs HP Desk and executes a script file which starts
the application. The application passes the report produced to the HP
Desk user's Work Area, and then terminates. When the script regains
control, it mails the report in the Work Area to all the regional sales
managers.
For example:
:RUN APPLIC
SEND "REPORT" OF WORKAREA TO "REGIONAL MANAGERS"
URGENT
MAIL
Some points to consider are:
* The job would not be able to run at the same time as Mailmaint as
it needs the HP Desk user interface to be enabled. There may not
be time to run both overnight.
* The application cannot dynamically change the Distribution List,
but the System Administrator can update it from within HP Desk.
Solution C
Run the application overnight, as usual. When it has generated the
report, the application writes an ARPA header to a file, specifying the
Distribution List and the name of the MPE file containing the
report. It then writes a record to the ARPA Reference IPC file
(AREFIPC.MAILDB.HPOFFICE), and the report is mailed by the FSC
(Reference) Slave Truck (FSCAREF).
Some points to consider are:
* The application can be run at the same time as MAILMAINT, as it
does not need access to the HP Desk database.
* The solution is dependent on an operator doing a MAILFSCAREFON
command when MAILMAINT has finished. However, this may be added
to the end of the last MAILMAINT job.
* The application can control the Distribution List itself, or it
can use a fixed Distribution List.
Recommendations
The quickest and simplest solution to implement is solution A. It has the
advantage of requiring very few application code changes. It could
probably be implemented without any programming changes if a suitable
file equation can be used to re-route the report to a disk file.
Solution B needs some programming changes to the application and it could
cause a timing problem. There may not be enough time overnight to run
MAILMAINT and the application one after the other.
Solution C is the most flexible solution. However, it needs many
programming changes to the application. It may not be worth the
investment unless other FSC applications are planned in the future.
Considering the above points, solution A would be the best solution in
most circumstances.
MPE/iX 5.0 Documentation