0% found this document useful (0 votes)
12 views33 pages

Block 18 Maintain Automation Scripts

Uploaded by

muyiwa07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views33 pages

Block 18 Maintain Automation Scripts

Uploaded by

muyiwa07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 33

Maintain Automation Scripts

Maintain Automation Scripts

Introduction

The Maintain Automation Scripts module within the MerciaLincs PC system provides
users with functionality to run batch processes either manually or by external tools
such as Norton Scheduler. Batch Scripts can be created containing details of the
programmes to be run and with what parameters.

The module will enable users to create, edit, show, copy, rename and drop scripts and
Script batch file as well as run the automated programs.

The following programs are available in Release 14:

Drop Lists
Import Product Master Record
Import Account Master Record
Import Latest Demand
Import Latest TPW
Report Demand Filter
Report Forecast Monitor
Remove File Overhead
Roll Database Forward
Category List Generator
Export Forecast
Export Variable Stock Target
Export to OFW
Regenerate Archive Lists

813321921.doc – Release 14 Page 1


Maintain Automation Scripts

Core Concepts

 Setting up Global Parameters

 Creating a new Script file

 Creating a new Batch file

 Running a Batch Process

 Viewing the Progress Report

 Editing/Deleting Scripts

 Editing/Deleting Batch files

 Program Parameters

813321921.doc – Release 14 Page 2


Maintain Automation Scripts

On entering the module the following screen is displayed listing all the Available
Programs. The user id is shown at the bottom of the screen.

There are 7 icons displayed in the top left-hand corner of the screen. There is also a
‘Help’ icon in the top right-hand corner. These icons provide fast access to the most
commonly used menu options:

New: To create a new script or batch file.

Open: To open an existing script or batch file.

Save: To save a newly created script or batch file or to save changes to


existing ones.

Print: Print scripts and/or batch files.

Delete: Delete existing scripts and/or batch files.

Options: To create/change a set of global information to be used by ALL


scripts and batch files
View Progress Record: Display a Porgies Record of previously run batch
files showing Date, Time and Text.

813321921.doc – Release 14 Page 3


Maintain Automation Scripts

1) Setting up Global Parameters:

Either click on the icon described above or select Tools and Options. The
following screen is displayed:

The default for ‘Number of minutes to wait for single user mode’ and for ‘Number of
minutes to wait for import file’ is ‘1’. The options are 1 to 59 inclusive.
The default for ‘Number of batch processes to be recorded in progress record’ is 50.
The options are 1 to 50 inclusive.

To change the Import file path click the Change Import Directory button.

Select the new path from either the C:\ drive or any Network drives. To change the
Import file path click the Change Export Directory button.

Clicking OK will automatically file any changes.

813321921.doc – Release 14 Page 4


Maintain Automation Scripts

2) Creating a new Script file:

Select File and New or click on the icon

Click on the Script Files radio button and OK.

Left click on the program name and click the Add > button to include in the Script
box on the right-hand side. It is possible to select more than one program by using
Shift/Ctrl click or click and drag techniques and then Add >. In the example below
the ‘Import Latest Demand’ program has been selected:

Highlighted programs can be deselected from the Script box with the <Remove
button. <<Remove All will remove all selected programs. If multiple programs are
selected, the order in which they are to be run is controlled by the order in which they
appear in the Script box. To change the sequence of the programs, highlight a
program name in the Script box and use the Move Up and Move Down buttons.

Highlight the relevant program and click on the Program Parameters button:

813321921.doc – Release 14 Page 5


Maintain Automation Scripts

The ‘Program Parameters’ window will vary depending on the program selected (see
Section 8 for more detail). In the above example the program needs the following
information:

To change the import file path, click the Change Directory button if different from
the default. The default path is defined in the MLPC.INI file.

Click OK when the new path has been selected. The Network button will allow
mapping to network drives.

Enter the Import file name and select the appropriate radio buttons to identify sales
and demand in the file. As in the normal version of this program there are options to
accept additional SKUs and create a list of all imported SKUs.

813321921.doc – Release 14 Page 6


Maintain Automation Scripts

If, when running the process, the import file does not exist, the system will re-try the
search in the number of minutes defined in the Options window. (See Section 1 –
Setting up Global Parameters).

Click OK when all parameters have been entered.

To display the program parameters from the main window click on the ‘+’ symbol as
shown below:

If a program name is selected which has multiple occurrences in the script, there is an
option to apply the parameters to be entered to all occurrences of the program or just
the currently selected one.

As many programs as necessary may be added to the script. In the example overleaf
‘Import Latest Demand’, ‘Report Demand Filter’, ‘Import Latest TPW’ and ‘Roll
Database Forward’. Relevant parameters must be set up for the programs selected (see
section 8 for details).

813321921.doc – Release 14 Page 7


Maintain Automation Scripts

A Description of the script maybe entered here.

Some programs e.g. ‘Roll Database Forward’ and ‘Remove File Overhead’ do not
need parameters. If the program parameters button is selected for such a program the
following message is displayed:

To save the script click on File and Save As. The system will default to the ‘Scripts’
directory defined in the MLPC.INI file.

813321921.doc – Release 14 Page 8


Maintain Automation Scripts

Enter a File name and Save.

813321921.doc – Release 14 Page 9


Maintain Automation Scripts

3) Creating a new Batch file:

Select File and New or click on the icon.

Click on the Script Batch Files radio button. The following screen is displayed listing
all the existing Script files available in the default Scripts sub-directory:

Either double click on ‘Database’ in the Batch file box or single click the Batch
Parameters button.

The database options defined in the MLPC.INI file will be displayed as shown
overleaf:

813321921.doc – Release 14 Page 10


Maintain Automation Scripts

Highlight the database the Batch file is to be run on and click OK.

Click on the script file(s) to be included in the Batch and click on the Add > button.

Click on the ‘+’ symbol on the left hand side of the script will display the programs
included:

As many script as necessary may be added to a batch script.

Highlighted scripts can be deselected from the Batch file list with the <Remove
button. <<Remove All will remove all selected scripts. If multiple scripts are selected
the order in which they are to be run is controlled by the order in which they appear in

813321921.doc – Release 14 Page 11


Maintain Automation Scripts

the Script box. To change the sequence of the scripts, highlight the script name and
use the Move Up and Move Down buttons.

A Description of the Batch file maybe entered here.

To save the batch file click on File and Save As. The system will default to the
‘SCRIPTS’ directory defined in the MLPC.INI file.

Enter a File name and Save.

813321921.doc – Release 14 Page 12


Maintain Automation Scripts

4) Running a Batch Process:

Batch files can be run manually or automatically; manually from either Windows
Explorer or from a desktop shortcut or automatically by using external scheduling
tools such as ‘Norton Scheduler’.

During running, a progress window is displayed consisting of 3 progress bars showing


the progress of the current batch file, script and program.

The process may be cancelled by clicking the Cancel button. This will only take
effect at ‘safe’ points in the script, so, for some programs the Cancel option will stop
the program at a safe point, and for other programs it will stop the script after the
current program has completed. For example ‘Roll database forward’ is not
cancellable. If the Cancel button is selected, and the script cannot be stopped straight
away, then an information message is displayed that the script will stop at the next
safe point.

The Details >> / << No Details button will enable the user to display or hide the
contents of the progress record. If displayed the contents will appear as shown
overleaf. The screen can be maximised and the scroll bars will enable the data to be
viewed as it is written to the progress record.

813321921.doc – Release 14 Page 13


Maintain Automation Scripts

N.B. Scripts will ALWAYS be executed by the MAS module using user number
5555.

813321921.doc – Release 14 Page 14


Maintain Automation Scripts

5) Viewing the Progress Report:

When scripts are run, a progress record is maintained to allow subsequent reporting of
the performance of the batch file. This will include start and end times for each script
and program, as well as any warning and action messages that would have otherwise
been displayed on screen by the user driven version of the equivalent function. The
parameter maintained in Options controls the maximum number of batch scripts that
can be recorded, before the progress file is cleared out.

The progress report can be viewed in the MAS module by clicking the icon or
via the Tools, ‘View Progress Record’ menu option. Click here to print the report

The progress record is a text file so it is also possible to view it in Windows Notepad
by double clicking on the file name in Windows Explorer. It is created in the
‘SCRIPTS’ sub-directory and the file name is MLMASPR.TXT. The maximum
number of batch processes stored in the file will depend on the number defined in the
Options window. See section 1 ‘Setting up Global Parameters’.

813321921.doc – Release 14 Page 15


Maintain Automation Scripts

6) Editing/Deleting Scripts:

Select File and Open or click on the icon

Highlight the Script file to edit and click Open.

The program names are displayed in the Script box. The date and time the file was
last edited is shown in the bottom left hand corner, next to the user id.

Programs can then be added or removed by using the relevant buttons.

813321921.doc – Release 14 Page 16


Maintain Automation Scripts

To change the sequence of the programs within a script, highlight the relevant
program name and use the Move Up and Move Down buttons.

To change arguments within the program, click on the program name to highlight the
one to change and click the Program Parameters button (see section 8 for details).

When all changes have been made, select File and Save or click on the icon.

Scripts can be deleted by either selecting File and Delete or clicking the icon.

Select the script to be deleted and click the Delete button. It is possible to select more
than one script by using Shift/Ctrl click techniques. If the selected script is used in an
existing Batch file the following message is displayed:

The script will not be dropped.

If the selected script is currently open the following is displayed:

The script will not be dropped.

813321921.doc – Release 14 Page 17


Maintain Automation Scripts

If the selected file(s) passes the above tests, confirm deletion by clicking the Yes
button.

813321921.doc – Release 14 Page 18


Maintain Automation Scripts

7) Editing/Deleting Batch files:

Select File and Open or click on the icon

Click on the Files of type: drop-down box. And select Batch Files (*.BAT).

Highlight the Batch file to edit and click Open.

The scripts are displayed in the Batch file box. The date and time the file was last
edited is shown in the bottom left hand corner, next to the user id.

813321921.doc – Release 14 Page 19


Maintain Automation Scripts

Scripts can then be added or removed by using the relevant buttons.


To change the sequence of the scripts within a batch script file, highlight the relevant
script name in the Batch File list and use the Move Up and Move Down buttons.

To change the database, click the Batch Parameters button.

Select the new database on click OK


When all changes have been made, select File and Save or click on the icon.

Batch files can be deleted by either selecting File and Delete or clicking the
icon.

Click on the Files of type: drop-down box. And select Batch Files (*.BAT).

Select the batch file to be deleted and click the Delete button. It is possible to select
more than one batch by using Shift/Ctrl click techniques.

If the selected batch file is currently open the following information window is
displayed:

813321921.doc – Release 14 Page 20


Maintain Automation Scripts

The batch file will not be dropped.

If the batch file passes the above test, confirm deletion by clicking the Yes button.

813321921.doc – Release 14 Page 21


Maintain Automation Scripts

8) Program Parameters:

Parameters will vary from program to program:

(a) Drop Lists

Use Shift/Ctrl click or click and drag techniques to highlight the prefixes to drop. Any
list flagged as ‘Do Not Drop’ within the DBA module (Maintain - Lists), will NOT be
deleted. Similarly any Batch Groups, Family Groups, Level Codes, Marketing
Groups, Production Groups and any lists used by WorkCentres will NOT be dropped.

Click OK when prefixes have been selected.

(b) Import Product Master Record

Click the Change Directory button if different from the default. The default path is
defined in the MLPC.INI file.

Enter the import file name and the Master Record field numbers to populate. The field
numbers must be separated by either a space or a comma.

If, when running the process, the import file does not exist, the system will re-try the
search in the number of minutes defined in the Options window. (See Section 1 –
Setting up Global Parameters).

There are check boxes to Add New Products to the Database i.e. item codes on the
import file which do not exist in the database, and to Create List of all Imported
Products.

Click OK when complete.

The screen shot is shown overleaf:

813321921.doc – Release 14 Page 22


Maintain Automation Scripts

(c) Import Account Master Record

Click the Change Directory button if different from the default. The default path is
defined in the MLPC.INI file.

Enter the import file name and the Account Master Record field numbers to populate.
The field numbers must be separated by either a space or a comma.

813321921.doc – Release 14 Page 23


Maintain Automation Scripts
If, when running the process, the import file does not exist, the system will re-try the
search in the number of minutes defined in the Options window. (See Section 1 –
Setting up Global Parameters).

There are check boxes to Accept additional SKUs to the database i.e. item/account
relationships in the import file which do not exist in the database, and to Create List
of all imported SKUs.

(d) Import Latest Demand

See Section 2 for details.

(e) Import Latest TPW

Click the Change Directory button if different from the default. The default path is
defined in the MLPC.INI file.

Enter the Import file name and check the Create List if all Imported SKUs box if
this exception list is required.

If, when running the process, the import file does not exist, the system will re-try the
search in the number of minutes defined in the Options window. (See Section 1 –
Setting up Global Parameters).

Click OK when all parameters have been entered.

(f) Report Demand Filter

Select the items to include in the report in the usual way. There are check boxes to
Include family groups, Include SKUs exported to OFW and to select All items.

Click on the Next > button when item selection is complete.

813321921.doc – Release 14 Page 24


Maintain Automation Scripts

On the second screen, select the Account codes to be included in the report. Select the
appropriate radio button or enter the Account codes required in the Choices box. The
account codes must be separated by a comma, since account codes with spaces are
allowed by the system.

Click Next > when selection complete.

On the third screen the default export directory can be changed by clicking the
Change Directory button. The default is taken from the MLPC.INI file. Enter the
Export file name.

813321921.doc – Release 14 Page 25


Maintain Automation Scripts

As with the normal version of this program, there are options to Report all negative
demand, Include description and Include Non Standard Pack details in the Standard
Pack figures. The sorting options are Descending value, Product and Account.

Click the Finish button when all selections have been entered.

(g) Report Forecast Monitor

Select the items to include in the report in the usual way. There are check boxes to
Include family groups, Include SKUs exported to OFW and to select All items.

Click on the Next > button when item selection complete.

On the second screen, select the Account codes to be included in the report. Select the

813321921.doc – Release 14 Page 26


Maintain Automation Scripts

appropriate radio button or enter the Account codes required in the Choices box. The
account codes must be separated by a comma since account codes with spaces are
allowed by the system.

Click Next > when selection complete.

On the third screen the default export directory can be changed by clicking the
Change Directory button. The default is taken from the MLPC.INI file. Enter the
Export file name.

As with the normal version of this program, there are options to Include description,
Include Non Standard Pack details in the Standard Pack figures and to sort the report
by significant errors.

813321921.doc – Release 14 Page 27


Maintain Automation Scripts

Select how to evaluate the forecast errors (e.g. Percent difference as in the screen shot
on the previous page) and the Minimum threshold to be considered (e.g. 85 for 85%).

Click the Finish button when all selections have been entered.

(h) Remove File Overhead

No parameters required. The program will assume that the database has been backed
up and that ALL files are to be included.

(i) Roll Database Forward

No parameters required. The program will assume that the database has been backed
up and that the Demand Filter report has been run and checked.

(j) Category List Generator

Select to create either a Master Record or an Account Master Record category list by
clicking the appropriate radio button.

Enter the MR/AMR field numbers in the box remembering to separate the numbers by
either a space or a comma.

Click the Next > button when details are complete.

Enter the items to include in the usual way and click the Next > button.

813321921.doc – Release 14 Page 28


Maintain Automation Scripts

If Master Records are chosen then the process is complete.


If Account Master Records are chosen a third screen is displayed:

On the third screen, select the Account codes to be included in the process. Select the
appropriate radio button or enter the Account codes required in the Choices box. The
codes must be separated by either a space or a comma.

(k) Export Forecast

Select items and account codes in the usual way (Steps 1 and 2).
Step 3 includes an option to include a ‘mask’ in the export file.

813321921.doc – Release 14 Page 29


Maintain Automation Scripts

Chose either Weekly or Monthly periods and the number of periods to export (Default
12 for Monthly and 52 for Weekly). Finally select the element(s) of the forecast to
include in the export file. Click the Next > button when details are complete

Finally, in Step 4, the default export directory can be changed by clicking the Change
Directory button. The default is taken from the MLPC.INI file. Enter the Export file
name.

Select how to weight the forecasts (default Units) and the number of Digits to Drop
(default zero). Click the Finish button when all selections have been entered.

(l) Export Variable Stock Target

Select items and account codes in the usual way (Steps 1 and 2).

813321921.doc – Release 14 Page 30


Maintain Automation Scripts

Step 3 below includes an option to include a ‘mask’ in the export file:

Chose either Weekly or Monthly periods and the number of periods to export (Default
12 for Monthly and 52 for Weekly). Click the Next > button when details complete.

In Step 4, the default export directory can be changed by clicking the Change
Directory button. The default is taken from the MLPC.INI file. Enter the Export file
name.

Select how to weight the forecasts (default Units) and the number of Digits to Drop
(default zero). Click the Finish button when all selections have been entered.

813321921.doc – Release 14 Page 31


Maintain Automation Scripts

(m) Export to OFW

Select items and account codes in the usual way (Steps 1 and 2).

Step 3 allows the user to select up to 3 Weighting fields (either Master Records,
Account Master Records or a combination of both) and up to 3 Grouping fields.
Use either a comma or a space to separate the field numbers selected.

Choose to export either Demand or Sales history and enter the number of historical
periods to export. Finally, enter the number of forecast periods to export. Click the
Next > button when details are complete.

In Step 4, the default export directory can be changed by clicking the Change
Directory button. The default is taken from the MLPC.INI file. Enter the Export file
name.

813321921.doc – Release 14 Page 32


Maintain Automation Scripts

Click the Finish button when all selections have been entered.

(n) Regenerate Archive Lists

Choose to include or exclude Family Group items.

813321921.doc – Release 14 Page 33

You might also like