Creating an Input File for Access Manager Batch Maintenance

May 14, 2008 · Filed Under Code Samples, Security, Series 7 

Creating users in a Series 7 namespace can be automated with Access Manager Batch Maintenance, but writing the required input file is an error prone and time consuming chore. This Visual Basic script will take a list of users from a comma-delimited file (it could be exported from Excel or some other system), create the users in the namespace, create the user classes, assign the users to their user class and then create a signon for the user. When the file is ready, the input file is run with Access Manager Batch Maintenance (via a batch file, so additional code can be inserted here if necessary). Finally, an email message is sent with the log file attached.

Notes:

  • This example is written in Visual Basic, and it can be run as is on a Windows system under the Windows Scripting host (a vbs file). It can also be integrated into a Visual Basic or Cognos Script application.
  • The message is sent via Outlook on the machine where the script is run. If you are not using Outlook or Outlook is not installed where this script is being run, then this subroutine must be replaced by alternate code.

Download the files:

accman_maintenance.vbs

users.csv

Links to social bookmarking sites.
  • Digg
  • StumbleUpon
  • Technorati
  • del.icio.us
  • Reddit
  • TwitThis
  • Live

Series 7 Impromptu Automation

May 14, 2008 · Filed Under Code Samples, Series 7 

Here are two sample scripts to illustrate how to automate Impromptu using the Cognos Script macro language. Cognos scripts can be easily integrated into a Visual Basic, VB Script or an ASP script, as the language follows the same conventions as Visual Basic.

The first script will run a report and save the output as a pdf file. The format can easily be changed to csv or another supported format. This script is useful when you have long running reports that you would like to run in off hours.

This second script runs the report and saves the output, like in the first script, but it also sends it as an email attachment. It uses Microsoft Outlook libraries to create and to send the message.

Download the sample code here:

save_pdf

email_pdf

Links to social bookmarking sites.
  • Digg
  • StumbleUpon
  • Technorati
  • del.icio.us
  • Reddit
  • TwitThis
  • Live