Show/Hide Toolbars

SpendMap User Guide (v14.5)

 
In addition to launching utilities and reports from within SpendMap by selecting the applicable menu or toolbar button, you can also run utilities and reports in "unattended mode", that is, with no human interaction.

Unattended mode is most commonly used to run maintenance utilities after hours (e.g. reindexing the system) but might also be used during regular business hours if there is a procedure that you want to run frequently throughout the day (e.g. building POs from approved Requisitions).

Running a utility unattended performs the same function as manually selecting the applicable menu option in the system; it simply alleviates the user from having to do it. Again, this is most beneficial for operations that are run frequently, such as reindexing, exporting data/transactions to other systems, refreshing the Dashboards, running nightly reports, etc.

To run a utility unattended, you will make a call to the application with the appropriate parameters. This can be done from the Command Prompt, from a batch file, from another software system, or from a task scheduler. For details, see Command Line Parameters, below.

Unlike when a user selects an option from the Main Menu, there is no one present to answer questions (prompts), so there are some special considerations, as outlined below.

 
Are you a SpendMap On-Demand (SaaS) Customer?

If you are using the On-Demand (hosted, SaaS) version of SpendMap, unattended processes (if any are required) will be set up for you by SpendMap Client Services, so you will have no need for the information in this section.
 

Scripts to Default Prompts

To run a utility in unattended mode, there can be no prompts that require user interaction (or the operation will stop and wait for user input).  Since most utilities and reports in SpendMap will prompt the user to answer questions, these prompts need to be defaulted.

This is accomplished by recording a script with the applicable prompt selections.  The name of the script will be included in the Command Line Parameters that you will use to run the unattended process.
 

User Setup Considerations

When launching utilities and reports in unattended mode, you will specify a user account (user ID code) as one of the Command Line Parameters.  

Some maintenance operations require exclusive use of the system or the use of the Priority Maintenance feature (if other users may be in the system when the maintenance operation is launched). Consider enabling the Priority Maintenance feature in the [PERMISSIONS] folder of the User Master File for the user account that you will be using.  See also Lockdown Feature, below.

Also, if you have set your passwords to expire, don't forget to periodically reset the passwords that are used for unattended processes.
 

Special Considerations for Reports

When running reports in unattended mode, rather than printing to a printer, you can save the reports to disk or deliver the reports by e-mail. You can specify the "report destination" when you record the script.
 

Special Considerations for Interfaces

Filenames

When running interfaces  (i.e. imports and exports) that use external “bridge” files, the system needs to know the applicable filenames.

For the Invoice Export, Receipts Export and Expense Reimbursements Export,  the files are hard coded to "AP-TRAN.TXT/CSV", "REC-TRAN.TXT/CSV" and "EXP-TRAN.TXT/CSV"  respectively.

For all other imports and exports, the system will remember the filename from the last time the operation was run. Therefore, run the import or export manually once (using the same user ID) before launching it in unattended mode.

Interface File Configurations

You cannot use multiple interface file configurations when running an import or export function unattended. There can only be one configuration file for the applicable interface and the system will use that configuration automatically when running in unattended mode.
 

Workstation or Server Initial Setup

Since SpendMap performs various setup operations automatically when the system is launched for the first time on any machine (workstation or server), you should run the system manually at least once before launching commands in unattended mode on that computer. Please see the Installation Instructions for complete details.

 

Command Line Parameters

To run a utility in unattended mode, you must call the PPSTART.EXE (located in the main system folder) with a set of parameters/switches. You can call PPSTART.EXE from the Command Prompt, from a batch file, or from a task scheduler.

The syntax is...

PPSTART.EXE  <local path>  "<user ID>,<password>,<script name>"

Where:

Parameter/Switch

Description

<Local path>

The folder on the local drive that contains the local system files. The default local folder is C:\_$palmas but you may have used a different folder. See the Installation Instructions for complete details.

<User ID>

The user ID that will be used to run the unattended process.

Any user ID code can be used to run unattended processes.  However, since the system records the user ID that performs many of the system’s maintenance operations, for audit purposes you may want to create a dedicated user account for these purposes.  This not mandatory...just something to consider.

<Password>

The password associated with the user ID.

<Script name>

The name of the script that you recorded to default the prompts for the operation.

 

Examples

1) When using a mapped drive letter, you must first change to the main SpendMap folder, for example...

X:
CD\SpendMapFolder
PPSTART.EXE  C:\_$PALMAS  "JOHN,PSWD,SCRIPTNAME"

2) If using a UNC path, you do not need to first change to the main SpendMap folder but you must call the full path to PPSTART.EXE...

\\computer\C$\SpendMapFolder\PPSTART.EXE  C:\_$PALMAS  "JOHN,PSWD,SCRIPTNAME"

 

Feedback and Errors

If a problem occurred when attempting to run an unattended process, the system will create a file in the root folder called “AUTORUN.ERR” that will be displayed in the System Error window when logging into the system. The file will contain details of why the system could not run the unattended process.

Note: To see system errors upon logging in, you must have the applicable setting turned on in [PERMISSIONS] folder of the User Master File. To ensure that errors are dealt with in a timely fashion, at least one regular system user (preferably all system administrators) should be able to see that errors have occurred.

In addition, a list of ALL unattended processes (both successful and unsuccessful) will be logged to a file called AUTORUN.LOG.

You can also optionally receive an e-mail notification to inform you of the success or failure of an unattended operation.

 

Lockdown Feature

This optional feature can be used to prohibit users from accessing the system while you perform external maintenance procedures (e.g. backups).

Overview and Purpose

Some maintenance operations require exclusive use of the system (i.e. users cannot be in the system while the maintenance is being performed). When running maintenance procedures that are available from within SpendMap, you can use the Priority Maintenance feature to get exclusive use of the system.

However, if you ever need to perform an external maintenance operation that is not within the control of SpendMap (e.g. backing up using third-party backup software), this Lockdown feature can be used to restrict user access to SpendMap while the maintenance is being performed.

Like the Priority Maintenance feature, this Lockdown feature will 1) suspend any active users, and 2) prohibit new users from logging into the system.

However, unlike Priority Maintenance that unlocks the system as soon as the (internal) system maintenance operation is complete, the Lockdown feature can be use to keep the system locked indefinitely (for as long as is needed for the maintenance operation to complete). This may be needed when running external maintenance operations that are not in control of the system (and, therefore, not in control of Priority Maintenance).

For example, if it is possible that a user may attempt to log in when backups are being performed, you can use Lockdown to ensure that transactions aren’t being processed for the duration for the backup.

Again, this is an optional feature.  If you are confident that users will not be accessing the system while you perform your external maintenance, you will have no need for this feature.

Reminder: The e-Series service is considered a user in this context since it accesses SpendMap's database, processes transactions, etc. just like any user of the system.

Command Line Parameters

Call the PPSTART.EXE (located in the main system data folder) with a set of parameters (switches). You can call PPSTART.EXE from the Command Prompt, from a batch file or from a task scheduler.

The syntax is...

PPSTART  <LocalFolder>  "<User>,<Password>,<Procedure>,<TimeoutMinutes>,<DurationMinutes>"

Where:

 

Parameter/Switch

Description

<LocalFolder>

The folder on the local drive that contains the local system files. The default local folder is C:\_$palmas but you may have used a different folder. See the Installation Instructions for complete details.

<User>

The system user ID that will be used run the unattended process.

Note: Priority Maintenance needs to be enabled in the system in order to use this feature and the user account that you are using must have a user access level of 9.

<Password>

The password associated with the user ID.

<Procedure>

LOCKDOWN or LOCKDOWN_NO_SUSPEND.

How the LOCKDOWN option works...

oIf users are at the Main Menu, their sessions will close automatically, otherwise if they are actively working in the system, they will receive a message asking them to exit the system.  

oIf active users do not respond to the request to exit the system within a short period of time, their sessions will be suspended, and they will resume where they left off when the maintenance is finished.

oAlso, other users will not be able to log into SpendMap until maintenance is finished.

How the LOCKDOWN_NO_SUSPEND option works...

oSame as the LOCKDOWN (suspend) option, above, only user sessions will NOT be suspended if users to not respond to the request to exit the system.  That is, the system will not be locked until all users exit SpendMap.

oUse this when zero user activity is required to perform a maintenance operation (e.g. restarting server).

<TimeoutMinutes>

The system will attempt to lock the system for this duration of time, after which an AUTORUN.ERR file will be created (see Feedback section, below). The timeout value can be from 5 to 60 minutes. Values outside of these parameters will default to 5 minutes.

<DurationMinutes>

This optional parameter is the period of time that the lockdown should be in effect for. Once the duration has been reached, the system will be unlocked automatically. Use this if you can reliably determine how long the external maintenance procedure will take. If not, the system can be unlocked manually (see references to LOCKDOWN.SYS file in Feedback section, below.

 

Example

To lock the system for 60 minutes and give up trying after 30 minutes

PPSTART C:\_$PALMAS "JOHN,PASSWD,LOCKDOWN,30,60"
 

Feedback

The following files may appear in the ROOT folder of the system on the server:

1.LOCKDOWN.SYS - This indicates that the system is locked-down and it is ready for the maintenance operation to begin (e.g. start the backup). You can manually unlock the system to allow users to resume using the system by deleting this file or you can use the <DurationMinutes> switch, as outlined above.

2.AUTORUN.ERR - This indicates that the system could not be locked-down. This is a plain text file and contains the reason for the failure.
 

Suggestion: The process starting the lock-down process should delete any previous AUTORUN.ERR files before it runs PPSTART.EXE to begin the lock-down process.