Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Axway Automator
Version 3.6
19 June 2013
Copyright Axway Software, 2013
All rights reserved.
This documentation describes the following Axway software: Axway Automator 3.6
No part of this publication may be reproduced, transmitted, stored in a retrieval system, or translated into any human or computer
language, in any form or by any means, electronic, mechanical, magnetic, optical, chemical, manual, or otherwise, without the prior
written permission of the copyright owner, Axway Software S.A.
This document, provided for informational purposes only, may be subject to significant modification. The descriptions and information
in this document may not necessarily accurately represent or reflect the current or planned functions of this product. Axway Software
S.A. may change this publication, the product described herein, or both. These changes will be incorporated in new versions of this
document. Axway Software S.A. does not warrant that this document is error free.
Axway Software S.A. recognizes the rights of the holders of all trademarks used in its publications.
The documentation may provide hyperlinks to third-party web sites or access to third-party content. Links and access to these sites are
provided for your convenience only. Axway Software S.A. does not control, endorse or guarantee content found in such sites. Axway
Software S.A. is not responsible for any content, associated links, resources or services associated with a third-party site.
Axway Software S.A. shall not be liable for any loss or damage of any sort associated with your use of third-party content.
Contents
1 Introduction ............................................................................................................................................................ 6
2 Licence key management ..................................................................................................................................... 7
Overview .................................................................................................................................................. 7
Adding a Key: keyapi addkey ...................................................................................................................... 7
Displaying the details of a Key: keyapi chkkey .............................................................................................. 7
3 Using OPSCMD ...................................................................................................................................................... 9
API enhancements ..................................................................................................................................... 9
Verifying a planning rule: opscmd rulechk .................................................................................................... 9
Displaying object states for a schedule: opscmd dspsts ............................................................................... 10
Modifying a resource: opscmd resval ......................................................................................................... 11
Modifying a vector: opscmd chgvector ....................................................................................................... 12
Deleting joblogs files: opscmd rmlog ......................................................................................................... 12
Modifying the status of an object: opscmd object ....................................................................................... 13
Case: label relaunch.............................................................................................................................. 13
Case: passing or memorizing labels ........................................................................................................ 14
Shutting down a server ............................................................................................................................ 14
Shutdown a production server: opscmd endpsrv ...................................................................................... 14
Shutdown a modeling server: opscmd endmsrv ....................................................................................... 14
Activate or deactivate a server: opscmd activate ..................................................................................... 15
Notifications ............................................................................................................................................ 15
Sending a notification: opscmd notify ..................................................................................................... 15
Deleting a notification: opscmd ntfydel ................................................................................................... 15
Exporting and importing a Chart ............................................................................................................... 15
Exporting 15
Importing 16
Exporting and importing Questionnaires: opscmd qexport, qimport .............................................................. 23
Exporting 23
Importing 23
Creating and attaching Questionnaires: opscmd setquest ............................................................................ 24
Creating a Questionnaire ....................................................................................................................... 24
Attaching Questionnaires ....................................................................................................................... 26
Working with archives .............................................................................................................................. 27
Creating an archive: Opscmd archive ...................................................................................................... 27
Modifying attributes: Opscmd varch ....................................................................................................... 28
Retrieving parameters: Opscmd archvarlist ............................................................................................. 28
Working with instances ............................................................................................................................ 28
Creating or replacing an instance: opscmd crinst ..................................................................................... 28
Displaying instance status: opscmd inststat ............................................................................................. 29
Duplicating an instance: opscmd instdupli ............................................................................................... 30
Displaying the list of duplicate instances: opscmd isduplirun ..................................................................... 30
Displaying instance parameters: opscmd instparam ................................................................................. 31
Overview
The Automator keys are set during the installation step (via the Axway Installer).
The key is stored in the OPSchedule.ini file of the MServer directory (KEY_VALUE parameter).
One API is available in Automator to manage these keys. The keys are named according to the type of
operating system.
Example : keyapi-win-x86-32.exe for windows.
API enhancements
WARNING: In order to work with new constraints imposed by the LDAP connector in the 3.6.0 version,
Automator users were divided into two separate tables that correspond to the login users and submission users.
As in previous versions, the constraint of using the OPSCMD API is the creation of the submit user as login user
(Configuration menu). Whichever migration mode you select, the login users will not automatically be created.
You must either recreate them manually or execute the API dbtools impuser procedure to create
automatically all login users from the submit users.
For more information, refer to the Automator Migration Guide.
Format: INST: Name of the instance DATE: date for the instance OBJ:
name of the object TYPE: type for the object ID: identifier for the
object STATUS: status for the object FLAGS: flag of the object
Notifications
Sending a notification: opscmd notify
Option Description Default (optional parameters)
notif Message to send
inst Instance of where part the notification
date Date todays date
number Number of instance (duplicator jobs as400) 1
pserver Production Server server where opscmd is launched
port Port for the Production Server 10510
target Name of the target Production server
Note: The instance that you select (option inst) to send the notification has no importance, but it remains
mandatory.
Example: Send of the message start to all operational Charts
...\Automator\MServer\bin>opscmd notify -notif "start" -inst inst_n_1
Notification sent
Exporting
The export generates in the form of files, all the information from the Chart required by the import. The API
creates a directory (by default under the Automator export directory) named after the graph name. This
directory contains the files generated after export. To export a Chart directly with the API, use opscmd.exe. In
a DOS window, access the directory that contains the executable opscmd.exe (typically
C:\Automator\MServer\bin), then enter opscmd with the option export and you will obtain the list of the
options available for the export:
Examples:
opscmd export graph billing dir d:\export_import\ mserver finance_1
port 10500
opscmd export graph billing quest 0 dir d:\export_import\ mserver
finance_1 port 10500
opscmd export graph billing quest 0 dir d:\export_import\ -glob 0
mserver finance_1 port 10500
Importing
From an export Chart, you can import this same Chart on the same machine or on another machine. The import
is performed from the directory that was generated during the export. You can move this directory as desired.
It can be practical to copy it to the directory export (under the directory where Automator was installed) of the
server from which you import the Chart (pathname by default).
As for export, in a DOS window, access the directory that contains the executable opscmd.exe (typically
C:\Automator\MServer\bin). Then enter opscmd with the option import to obtain the list of the possible
options for the import:
Example: opscmd import
List of the options: When you do not specify a non-mandatory option, it takes the default value.
Options Description
srcgraph Name of the Chart to import (corresponds to the name given during the export).
(Mandatory option)
Srcdir Directory where the export was performed. By default, the import searches in the directory
export where Automator was installed (of the server that performed the import).
tgtgraph Name that will be given to the imported Chart.
questdir Directory where the Questionnaires were exported. By default, the import searches in the
directory export where Automator was installed (of the server that performed the import).
replace Option for specifying the replacement or of Questionnaires that will be imported, in the case
where they are already present at the level of the Modeling Server. Possible values are 0 or 1
(1 by default for replacement).
createnew Two possibilities:
-yes: if a Chart with the name specified with the option tgtgraph exists already on the server,
the API creates a new Chart by appending _X to the name of the Chart.
-no: if a Chart with the name specified with the option tgtgraph exists already on the server,
it will be replaced.
Options Description
By default, the option is yes.
mserver Modeling Server where you want to import the Chart. By default, mserver takes the value of
the server where you are connected.
Port Number of the port used by the Modeling Server towards which you want to import the Chart.
By default, the API takes the port 10500.
modify Replace values with parmtochg.lst (defaults to no).
chkrule Check validity of rules (defaults to no).
verbose Track the import on screen as it happens (defaults to no).
Arch Import the archives (defaults to no).
context Show Chart context (defaults to no).
Examples:
opscmd import srcgraph billing srcdir d:\export_import\ -tgtgraph
accounting mserver finance_2 port 10500
opscmd import srcgraph billing srcdir d:\export_import\ -questdir
d:\export_quest -tgtgraph accounting mserver finance_2 port 10500
Note: If the same directory contains two exported Charts with the same name, the first one found will be
imported. To avoid this problem, change the directory of the one you do not want to import.
The export generates a directory named with the Chart reference (that can be different for the same
Chart from one server to another). In addition, if you have performed several exports, it can sometimes
be difficult to keep them straight. To learn the name of the Chart corresponding to an export, verify in
the file to_env.exp from the export. The field v_ename corresponds to the name of the Chart.
Files Description
TO_ENV.exp Definition of the Chart
TO_GRES.exp Global resources
TO_JOB.exp Definition of the Jobs
TO_LNCNTX.exp Link context object
TO_LNDSRV.exp Link of domain servers with connection objects
TO_LNPRF.exp Link profiles of user groups
TO_LGR.exp Links for the global resources
TO_LLR.exp Links for the local resources
TO_LRES.exp Local Resources
TO_MSG.exp Messages
TO_PLNG.exp Scheduling Rules
TO_TOKEN.exp Macros
TO_PROFIL.exp Profiles
TO_UGRP.exp User groups
TO_USR.exp Users
TO_VAR.exp Parameters
TO_XGROUP.exp Execution Groups
TO_LINK.exp Attachment of Questionnaires to the objects
Functioning
On export of a Chart, two new files are created in the export directory: parmtochg.lst and propfile.lst. These
two files contain the data used in renaming the objects.
Usage Constraints
This section presents points you should keep in mind while using Automator import-export. If these constraints
are not respected, it could lead to malfunctions and create inconsistencies in the database.
Constraints on users
If the names of users are modified and those users are not known on the Modeling Server that receives the
import, you must modify the passwords for new users directly in the GUI.
This concerns users of the Windows configuration option Settings, the users defined during the creation of an
SAP agent and all the users defined at the level of the SAP jobs.
Keep in mind that if the user used by the SAP agent or by the SAP jobs, was changed at the time of import and
if this user was not known, you must either create the user in the Settings after the import, or modify the user
at the time of the import (description: User Name).Constraints on resources
Constraints on Questionnaires
A Questionnaire can be exported individually or if it is attached to a Chart or to an object of the Chart. In both
cases, a file parmtochg.lst will be created in the Questionnaire directory.
If it is exported individually, the user can modify global resources and execution groups in the same way as for
a Chart in the file parmtochg.lst for the Questionnaire.
If the Questionnaire is exported from the export of a Chart, and the global resources and execution groups are
used by both the Questionnaire and by the Chart, then the user must modify the name of both the resource
and of the execution group in the file parmtochg.lst (for the Questionnaire) and the file parmtochg.lst (for the
Chart). Otherwise, two different resources are created.
Usage
Modify the contents of the file parmtochg.lst, replacing the name or value to establish a new correspondence
between the old name and new name, or an old value and new value.
Example 1 Value of parameter of a job
ITEM {
"<PROP>" "V_PARAM0"
"<DESCRIPTION>" "Job parameters"
"-------------" "--------------"
"2" "8" new value
}
Example 2 Execution group
ITEM {
"<PROP>" "V_GXNAME"
"<DESCRIPTION>" "Execution Group Name"
"-------------" "--------------------"
"exec1" "exec_modif" new value
}
Example 3 Production Server
ITEM {
"<PROP>" "M_HNAME"
"<DESCRIPTION>" "Production Server Name"
"-------------" "----------------------"
"localhost" "monSP"
}
Example 4 User
ITEM {
"<PROP>" "V_UNAME"
"<DESCRIPTION>" "User Name"
"-------------" "---------"
"__default__" "myDefault"
}
Once all the constraints are respected, you can launch the Chart import command. Use the option modify in
the command line (defaults to no).
Examples:
opscmd import srcgraph billing srcdir d:\export_import\ -tgtgraph
accounting modify yes mserver finance_2 port 10500
Modifiable Data
Object What Description
Configuration Setting Objects
Agent
Production Server name Production Server name
Production Server port Production Server port
SAP agent
name of the SAP machine SAP Production Server name
SAP user by default for this SAP login user (default)
machine
sysnum of the SAP machine SAP sysnum
Proxy SAP login proxy (default)
AS/400 Agent
Job description Job description (AS400 Prod.server definition)
Job description library Job description library (AS400 Prod. Server
definition)
Job queue Job queue (AS400 Prod. Server definition)
Job queue library Job queue library (AS400 Prod. Server definition)
Job priority in JOBQ Job priority in JOBQ (AS400 Prod. Server
definition)
Output priority in OUTQ Output priority in OUTQ (AS400 Prod. Server
(in outq) definition)
Print device Print device (AS400 Prod. Server definition)
Output queue Output queue (AS400 Prod. Server definition)
Output queue library Output queue library (AS400 Prod. Server
definition)
Text to be printed Text to be printed (AS400 Prod. Server definition)
Routing data Routing data (AS400 Prod. Server definition)
Data requested or command Request or command data (AS400 Prod. Server
definition)
Library system list System library list (AS400 Prod. Server definition)
Current library Current library (AS400 Prod. Server definition)
Initial library list Initial library list (AS400 Prod. Server definition)
Message logging Message logging (AS400 Prod. Server definition)
Log CL programs Log CL programs (AS400 Prod. Server definition)
Query message response Query message response (AS400 Prod. Server
definition)
Hold in job queue Hold in job queue (AS400 Prod. Server definition)
Scheduled date Scheduled date (AS400 Prod. Server definition)
Scheduled time Scheduled time (AS400 Prod. Server definition)
Job date Job date (AS400 Prod. Server definition)
External flag External flag (AS400 Prod. Server definition)
Display by WRKSBMJOB Display by WRKSBMJOB (AS400 Prod. Server
definition)
Message queue Message queue (AS400 Prod. Server definition)
Message queue Library Message queue library (AS400 Prod. Server
definition)
Sort sequence Sort sequence (AS400 Prod. Server definition)
Sort sequence Library Sort sequence library (AS400 Prod. Server
definition)
Language identifier Language ID (AS400 Prod. Server definition)
Country identifier Country ID (AS400 Prod. Server definition)
Character set coded ID Coded character set ID (AS400 Prod. Server
definition)
Submitted for Submitted for (AS400 Prod. Server definition)
User Submitted for (user) (AS400 Prod. Server
definition)
PeopleSoft
Agent
PeopleSoft JSL connection port PeopleSoft JSL connection port
Server of application PeopleSoft Application Server
User
User name User name
Calendar
Calendar name Calendar name
Connection
object
Connection object name for the Connection object name for the ERP
ERP
Domain server
Domain server name Domain server name
Domain server port Domain server port
Macro
Macro Name Macro Name
Scheduling rule
Planning Name Rule Name
Date Variable
Date name Date name
Local or global
resource
Resource Name Resource Name
Resource Value Resource Value
The maximum value of the weight Weight Max Value (Weight resource)
(if Weight resource)
For the resources used in the jobs
The value to which the resource is Value to compare (for used resource)
compared
Execution Group
Execution group name Execution group name
Objects in the Modeling Panel
Chart
Parameters
Parameter name Parameter name
Parameter value Parameter value
Definition of a
Chart
Default Script Path Default Script Path
For the AS400
jobs
Default JOBD Default JOBD
Default lib for JOBD Default lib for JOBD
Default JOBQ Default JOBQ
Default lib for JOBQ Default lib for JOBQ
Application
Default Production Server Name Production Server Name
Job
Native Job
Script directory (target) Script directory
Script name (target) Script name
Exporting
The export generates in the form of files all the information for the Questionnaire required by the import. The
API creates a file named QQ+(reference for the Questionnaire).lst, (Ex: QQ0000000001.lst) by default under
the export directory, as well as a directory named QQ+(reference for the Questionnaire) (Ex: QQ0000000001).
This directory holds the definitions of the reply cards associated with the Questionnaire.
The file contains the definition for the Questionnaire.
To export a Questionnaire directly with the API, use opscmd.exe.
1. In a DOS window, access the directory that contains the executable opscmd.exe
(typically C:\Automator\MServer\bin).
2. Then enter opscmd with the option qexport.
You will obtain the list of options available for the export.
Example: opscmd qexport
List of options
When you do not specify a non-mandatory option, it takes the default value.
Options Description
quest Name of the Questionnaire for export (respect the upper case and lower case).
If * is specified then the API exports all the Questionnaires present at the level of the
server database.
(Mandatory option)
dir Export destination directory. By default, the export is performed in the directory export or
was installed schedule (if the directory does not exist, it will be created automatically).
mserver Modeling Server where can be found the Questionnaire for export. By default, mserver
takes the value of the server where you are connected.
port Number of the port used by the Modeling Server. By default, the API takes the port
10500.
modify Replace values with parmtochg.lst (defaults to no).
context Show Chart context (defaults to no).
Examples:
opscmd qexport quest Questionnaire dir d:\export_import\ mserver
finance_1 port 10500
opscmd qexport quest * mserver finance_1 port 10500
Importing
From a Questionnaire export, you can import that same Questionnaire to the same machine or to another
machine. The import is performed from the directory and of the file that were generated during the export. You
can move this directory and this file as desired. It can be practical to copy them under the export directory
(under the directory where Automator was installed) of the server from which you import the Chart (pathname
by default).
1. As with export, in a DOS window, access the directory that contains the
executable opscmd.exe (typically C:\Automator\MServer\bin).
2. Then enter opscmd with the option qimport.
You will obtain the list of the possible options for the import.
Example: opscmd qimport
List of options
When you do not specify a non-mandatory option, it takes the default value.
Options Description
Name Name of the Questionnaire to import (respect the upper case and lower case).
If no name is specified, all Questionnaires present will be imported.
Dir Destination directory for the export. By default, the export is performed in the directory
export or was installed schedule (if the directory does not exist, it will be created
automatically).
(Mandatory option)
Replace Specify if the existing Questionnaires must be replaced. By default, they are all replaced.
Mserver Modeling Server where can be found the Questionnaire to import. By default, mserver
takes the value of the server where you are connected.
Port Number of the port used by the Modeling Server. By default, the API takes the port
10500.
Context Show Chart context (defaults to no).
Examples:
opscmd qimport name Questionnaire dir d:\export_import\ mserver
finance_1 port 10500
opscmd qimport dir d:\export_import mserver finance_1 port 10500
Creating a Questionnaire
The creation of a Questionnaire is performed using the following syntax:
opscmd setquest server localhost port default_port path c:\tmp
file quest1.txt.
List of options
When you do not specify a non-mandatory option, it takes the default value.
Options Description
Mserver Modeling Server to contact. By default, mserver takes the value of the server where you are
connected.
Port Number of the port used by the Modeling Server. By default, the API takes the port 10500.
Path Directory that contain the definition files for Questionnaires and attachments
(Mandatory option)
Name In the case of a simple attachment, specify the name for the Questionnaire that you want to
attach to the selected objects.
fileQ File that contains the definition for the Questionnaire to create
fileA File that contains the list of the objects that you want to attach to the Questionnaire in progress.
The attachment is not mandatory.
Formatting a file
The file is defined in the list format. The local properties are used to define the general characteristics for the
Questionnaire and each element is a question. The order of the elements corresponds to the order of the
questions. The questions can be mixed.
The different types can alternate as required.
List of options
The following table shows the local properties accepted and their meaning.
Property Name Property Value
QNAME Name of the Questionnaire
(Mandatory option)
QDESC Description
QMODE For the questions Argument: A | R . Add or replace existing parameters. By default,
Add.
The following table shows the properties of elements accepted and their meaning:
Property Name Property Value
qtype V | S | A (Variable, Substitution or Argument).
(Mandatory option)
qlabel Question to ask.
(Mandatory option)
qname Name of the question to ask.
(Mandatory option)
qgen M | O | F (M=mandatory, O=optional, F=fixed), O by default.
qtype OP . Expression OP if OP is specified, otherwise normal text or regexp. By default,
this is not an expression OP.
qvalcheck Test Mode for response validity: 0=ExpReg, 1=numeric, 2=Alphanumeric,
(Mandatory option)3=Alphabetical, 4=Date, 5=Date intervals (0 by default).
qminchk Minimal Value of the response if numeric mode (0 by default).
qmaxchk Maximal Value of the response if numeric mode (99 by default).
qnset Set of numeric values valid if numeric mode, format n1, n2, n3.
qaset Set of valid alphabetical values if alphanumeric or alphabetical mode, format s1, s2,
s3.
qdformat Format of the date if date mode or interval.
qdsep Separator for the date if date mode or interval.
qregexp Regular expression that the response must match.
qdeft Default value. Systematically ignored for a question of type M. Mandatory for the
other questions.
If type V or A, this is the response by default.
If type S, this is the replacement string.
vname Name of the variable (mandatory if of type variable).
vfill LEFT or RIGHT or NO, to fill to left or right for the variable questions. By default,
NO.
vchar Fill Character for variable questions. By default, (blank).
vmode For the questions of type V:
CONCAT if concat, any questions parameters are concatenated,
EXPORT if export, they are exported.
CONCAT/EXPORT if concat and export then both will be performed.
sline Expression in the form x-y where x is the first line, y the last line where the
replacement is performed for the questions S. If y is not specified, then the
replacement is performed to the end of the file.
sexp Regular expression corresponding to the value to substitute.
smode FIRST = first occurrence or ALL = between the lines specified.
snoccu Number of occurrences per line to be replaced.
Caution: The file that contains the definition for the Questionnaire to create must have a new line at the
end of the file. If this new-line is not present, it could cause problems with the Modeling Server.
The following shows an example of a Questionnaire defined by this file:
"QNAME" "MY_FIRST_ONE"
"QDESC" "Questionnaire example"
"QMODE" "A"
ITEM {
"qtype" "A"
"qlabel" "Enter the number of printouts"
"qname" "example of question argument "
"qgen" "M"
"qop" ""
"qvalcheck" "0"
"qregexp" "^[0-9]2$"
}
ITEM {
"qtype" "S"
"qlabel" "Enter the substitution for REMPL_ME"
"qname" "example of substitution question "
"qgen" "F"
"qop" ""
"qvalcheck" "0"
"qdeft" "TST0"
"sexp" "^.*REMPL_ME.*$"
"qregexp" "TST[0-9]+ "
"sline" "10-20"
"smode" "FIRST"
"snoccu" "2"
}
ITEM {
"qtype" "V"
"qlabel" "Enter the response to the value of $variable"
"qname" "example of question variable"
"qgen" "F"
"qop" ""
"qvalcheck" "1"
"qminchk" "0"
"qmaxchk" "250"
"qnset" "12,20,25,56,150,180,200,210"
"qdeft" "25"
"vname" "$variable"
"vfill" "NO"
"vmode" "CONCAT/EXPORT"
}
Keep in mind that in defining Questionnaire named MY_FIRST_ONE (description: Questionnaire example), that
has a question Argument, a question Substitution and another of type Variable, the argument will be added to
the list of the arguments, the response is mandatory and must be a number of two figures.
Attaching Questionnaires
The API can automatically attach created Questionnaires to existing objects. A file in list format used by the API
must contain the information required for the correct attachment. The API has three possible ways of
functioning:
Create a Questionnaire
Create a Questionnaire and attach it to different objects
Attach an existing Questionnaire
The attachment is not mandatory. The specification of the port and of the server is not mandatory. This
information is the name for the object and the type for the object to which the Questionnaire must be attached.
The following shows an example of a list file:
ITEM {
"OBJTYPE" "PSRV" for a Production Server
"OBJNAME" "prod1"
}
Attachment to the Production Server prod1.
ITEM {
"OBJTYPE" "GRAPH" for a Chart
"OBJNAME" "Chart_Test"
}
Attachment to the Chart Chart_Test.
ITEM {
ITEM {
"OBJTYPE" "DATA" for a data file that belongs to a job
"OBJNAME" "Chart_Test /JOB0"
}
Attachment to the data file of the Job JOB0 that belongs to the Chart
Chart_Test.
ITEM {
"OBJTYPE" "APP" for an application
"OBJNAME" "Chart_Test /APP0"
}
ITEM {
"OBJTYPE" "JOB" for a job in an application
"OBJNAME" "Chart_Test /APP0/JOB1"
}
Attachment to the job JOB1 that belongs to the application APP0, in the Chart
Chart_Test.
ITEM {
"OBJTYPE" "DATA" for a data file of a job in an application
"OBJNAME" "Chart_Test /APP0/JOB1"
}
Attachment to the data file of the job JOB1 that belongs to the application
APP0, in the Chart Chart_Test.
Mandatory options
Option
Inst Name of the instance to create
Graph Name of the Chart
Arch Name of the archive
Optional Options
Option
desc Description. Blank by default.
puttopause Specify yes to create the instance in pause. The value no is taken by default.
pectype Type of implementation. Possible values: now, plannext or deferred. The value now is
taken by default.
date Date of implementation. Format: dd/mm/yyyy
Option
oldinst Name of an existing instance. This last will be then replaced. Blank by default.
keepdata If replacement of an old instance currently executing, then session parameters are
retained. Possible values: yes or no. By default: no. Not implemented at the level of
the server.
starttime Time of startup. Format: hh:mm. By default: as soon as possible.
endtime Time and number of maximum days to end of schedule. Format:
dd/hh:mm. By default: infinite
varlist Defines the pathname and the filename that contains the list of the parameters to
modify. These parameters must exist at the level of the archive.
prodgroup Name of a production group. By default, no group.
expiredate Date maximum of the end of implementation. Format: dd/mm/yyyy. By default,
unlimited.
execgroup Name of the execution group for this instance. By default, no group.
mserver Name of the Modeling Server to contact. By default, the local machine
port TCP Server Port
par Name and value of the parameter to modify. The parameters specified must exist.
main Force main Production server.
stat Set to yes to collect statistics (defaults to no).
context Sets the user context.
If the option keepdata is set to yes, then the parameter oldinst must be set.
If oldinst is set, then the parameters inst and oldinst must have the same value.
For the instance parameters, two options are possible:
Specify the file that contains the list of the parameters to modify
Designate the parameters to modify, one by one
If neither of the two options is used, the instance is created with the values by default for the parameters. If
both are used, the API takes in priority the values defined with the option par.
The syntax of the parameter file is:
"name_param1" "value_param1"
"name_param2" "value_param2"
"name_paramN" "value_paramN"
The syntax for the par option is:
opscmd crinst inst - par name_param1:value_param1 par
name_param2:value_param2 par name_paramN:value_paramN
The separator between the name and the value of the parameter can be defined in the file OPSchedule.ini as
follows: TO_API_SEP_PARAM=/
/ will be then the new separator and the command becomes:
opscmd crinst inst by name_param1/value_param1 by
name_param2/value_param2 par name_paramN/value_paramN
Note:
The all option will only work with the modeling server.
If you use the end option, make sure that you specify a start date as well. If you do not, the default start
date (today) will be used.
Example:
<AutomatorInstallDir>\bin\opscmd inststat -inst Exp -start 20081100 -
end 20081104
INST;ID;CHART;ARCH;DATE;STATUS;SERVER;MAINPS;FLAGS
Exp;IE0000000661;Expressions;Expressions3;20081101;I_NOTSCHED;
ProdServ;ProdServ;(8000: SuiviNiv1)
Exp;IE0000000661;Expressions;Expressions3;20081102;I_NOTSCHED;
ProdServ; ProdServ;(8000: SuiviNiv1)
Exp;IE0000000661;Expressions;Expressions3;20081103;I_HISTO; ProdServ;
ProdServ;(8000: SuiviNiv1)
Exp;IE0000000661;Expressions;Expressions3;20081104;I_HISTO; ProdServ;
ProdServ;(8000: SuiviNiv1)
One of the first 3 options must be specified depending on the selection of objects to display (applications and
jobs).
The option status can be used to filter the objects.
In the case of a parallel Chart, it is possible with the option agent to filter only the objects being executed on
the selected agent.
Example:
...\Automator\bin> opscmd snapshot -inst dem_para -agent true64 -
port 11160
Snapshot - TRANSACTION GOOD END
INSTANCE;APPLICATION;JOB;AGENT;STATUS;WAIT_HOUR?;WAIT_LINK?;WAIT_RES?;W
AIT_ASK?;
dem_para; ;JOB_demo10;true64;RUNNING; ; ; ;
dem_para; ;JOB_demo11; true64;;TOBEDONE; ;Y; ;
dem_para;APP_demo1; ; true64;;ENDED; ; ; ;
Example:
bin> opscmd objplan -inst parallels -port 11160 -date 20020426-20020427 -only no -app APP_0
List ObjPlan - TRANSACTION GOOD END
--DATE---|---INSTANCE---|--APPLICATION--|---JOB---|SCHEDULED?|---WHY?--
20020426 - parallels - APP_0 - SCHED -
20020426 - parallels - - JOB_0 - SCHED -
20020427 - parallels - - JOB_0 - SCHED -
20020427 - parallels - APP_0 - - SCHED -
Operating principle
The action is the same as automatic purge:
For the date D supplied, the API tries to delete the expired PEC (whose end date is prior to D).
No check on the number of days to keep or on the fact that an instance can be in progress is not performed
before the deletion.
Procedure
opscmd inst_purge provides a short set of instructions.
The date in the format YYYYMMDD is mandatory. The current date is not taken as default as for the other APIs
in order to avoid serious disagreements (purge of all the instances). Specify date 20030701 for example.
Next, specify either "inst NAME" to purge a particular instance, or "-inst *" to purge all the instances (Note: In
UNIX, the asterisk character is usually set between quotation marks), or "Chart NAME" to purge all the
instances attached to a certain Chart.
The usual parameters mserver and port can be used to select the target Modeling server (by default
localhost/10500).
Return code
0 if successful non-zero in case of failure.
A message indicates the error encountered.
If the API succeeds, the message "purge done" is displayed. It does not mean than an instance was purged,
but only that no error was encountered (could be no instance).
Overview
The program OPSCMD is subject to the following syntax:
CALL PGM(OPSCMD) PARM(option parameter_option_1 value_
parameter_option_1 parameter_option_2 value_ parameter_option_2
etc ......)
Example:
CALL PGM(OPSCMD) PARM(resval' -res RESSOURCE -value DEFAULT
-inst INSTANCE
For NT / UNIX:
opscmd resval -res RESSOURCE -value DEFAULT -inst INSTANCE
Keep in mind
The parameters passed to the program OPSCMD in the command CALL, must imperatively be between
quotation marks ().
You can use variable AS400 parameters (&option for example) if you use the program OPSCMD within the
program CL for example.
In this case, you must use the program QCMDEXC to which you pass the character string that contains the
command CALL OPSCMD and all its parameters.
Make sure you enclose the values of the PARM in quotation marks, and use the function TCAT to obtain clean
parameters with no unwanted characters.
Example of programming:
0001.00 PGM PARM(&API &OBJ &ACTION &PSERVER &PORT &INST)
0002.00
0003.00 DCL VAR(&API) TYPE(*CHAR) LEN(10)
0005.00 DCL VAR(&OBJ) TYPE(*CHAR) LEN(10)
0007.00 DCL VAR(&ACTION) TYPE(*CHAR) LEN(10)
0009.00 DCL VAR(&PSERVER) TYPE(*CHAR) LEN(10)
0011.00 DCL VAR(&PORT) TYPE(*CHAR) LEN(10)
0013.00 DCL VAR(&INST) TYPE(*CHAR) LEN(10)
0013.01 DCL VAR(&COT) TYPE(*CHAR) LEN(1) VALUE('''')
0013.02 DCL VAR(&CMD) TYPE(*CHAR) LEN(2000)
0013.03 DCL VAR(&LNG) TYPE(*DEC) LEN(15 5) VALUE(1000)
0015.00
0015.01 CHGVAR VAR(&CMD) VALUE( 'CALL OPSCMD PARM(' +
0015.02 *CAT &COT *TCAT &API *TCAT &COT *CAT ' ' +
0015.03 *CAT &COT *TCAT '-obj' *CAT &COT *CAT ' ' +
0015.04 *CAT &COT *TCAT &OBJ *TCAT &COT *CAT ' ' +
0015.05 *CAT &COT *TCAT '-action' *CAT &COT *CAT ' ' +
0015.06 *CAT &COT *TCAT &ACTION *TCAT &COT *CAT ' ' +
0015.07 *CAT &COT *TCAT '-pserver' *CAT &COT *CAT ' ' +
0015.08 *CAT &COT *TCAT &PSERVER *TCAT &COT *CAT ' ' +
0015.09 *CAT &COT *TCAT '-port' *CAT &COT *CAT ' ' +
0015.10 *CAT &COT *TCAT &PORT *TCAT &COT *CAT ' ' +
0015.11 *CAT &COT *TCAT '-inst' *CAT &COT *CAT ' ' +
0015.12 *CAT &COT *TCAT &INST *TCAT &COT *CAT ')')
0015.13
0015.14 CALL PGM(QCMDEXC) PARM(&CMD &LNG)
0026.00 ENDPGM
To obtain help on the command OPSCMD:
1. Add OPSCHEDULE to the library list for the session.
2. Enter CALL OPSCMD.
Obtain the list of options in the same way as in NT or UNIX .
To obtain help on an option, enter (for example): CALL OPSCMD PARM(notify),
and the program returns the same help as with other OSs, that is, the list of parameters used for this option.
If the option keepdata is set to yes, then the parameter oldinst must be set.
If oldinst is set, then the parameters inst and oldinst must have the same value.
For the instance parameters, two options are possible:
Specify the file that contains the list of the parameters to modify
Designate the parameters to modify, one by one
If neither of the two options is used, the instance is created with the values by default for the parameters. If
both are used, the API takes in priority the values defined with the option par.
Example:
<AutomatorInstallDir>\bin\opsadm istatus -dir ../ -date 20081105
| Instance Name | DATE | STATUS | MAIN SP |
| Locke | 20081029 | INIT | shpuxopkl3 |
| Locke | 20081028 | FINISHED | shpuxopkl3 |
| Locke | 20080926 | FINISHED | shpuxopkl3 |
| TestDupl | 20081105 | INIT | |
| TestDupl | 20081104 | FINISHED | |
| TestDupl | 20081029 | FINISHED | |
| ExpPM | 20081105 | INIT | |
| ExpPM | 20081029 | FINISHED | |
| ExpGen | 20081105 | INIT | |
| Exp | 20081029 | FINISHED | |
| Test | 20081029 | RUN | |
.....TO_.....
Info: TO_USER has no problem found.
Default
Option Description
(non-mandatory option)
retry Number of retries if server is occupied
mserver Modeling server
pserver Production server
port Port for the Modeling server or the Production 10500 or 10510
server
The goal is to check any discrepancy that may exist for instances (existence and status):
Warnings
It is not recommended to modify, add configurations, or remove variables. Contact Axway support if you are
unsure of the modification you are about to make.
Make a backup of your configuration file (OPSchedule.ini in the config sub-directory) before modifying it.
Instead of deleting a line from a configuration file, you can comment it out by adding a # at the beginning of
the line.
The server needs to be restarted to take modifications into account.
Overview
Automator uses regular expressions in the public domain written by Henry Spencer (University of Toronto, 1986).
The regular expressions are used to apply a filter. They use special characters to analyze character strings.
Example:
add[0-9]+ recognizes all the character strings that contain the word add followed by one or more figures
(examples: add12, atoiadd9, ypkadd27A9 )
Delimiters
^ Exact beginning: placed in the first position, it indicates that what follows must be at the beginning of
the character string
$ Exact ending: placed in the last position, it indicates that what precedes must be at the end of the
character string
PARTICULAR CHARACTERS
. Joker: hides any character
\n New line
\r Carriage return
\f New page
\t Tabulation
\C Escape the character C removing any particular meaning. Indispensable for characters that have a
particular meaning in the regular expressions (examples: \| \+ \\)
Character Classes
[class] A class can be a set of single characters, an interval or both.
The character means that the two characters surround it are delimiters for an interval.
Examples:
[azerty] hides one of the characters a, z , e, r, t or y
[a-z] hides one of the characters between the a and the z inclusive. Either one of the lower case
[a\-z] hides one of the 3 characters a, z or (the dash is escaped)
[0-9A-Z] hides a number or an upper case letter
[01a-z] hides a lower case letter, the 0 or the 1 ([0a-z1] gives the same result)
[]-a] hides one of the characters between the ] and the a
[^class] The character ^ immediately after the [ indicates the negation of the class.
Example:
[^0-9abc] hides characters except figures and the letters a, b and c
Repetition Operators: specify that the character, the class or the alternative that precedes it can be repeated
* Zero or several times
+ One or more times
? Zero or one times
Alternative:
| When it is within parentheses, it indicates the alternative.
Example:
(one|two|three) hides one of the words one, two, or three
Attention: If | is not inside brackets, it also indicates the alternative. The first alternative is all text
between the start of the regular expression and the first |
To avoid confusion, always escape the character | and always enclose the alternatives in parentheses.
Note: Regular expressions are also used to extract a portion of the string. This involves a limitation on the
character $: The dollar sign must never be placed immediately after a closing parenthesis.
To specify $, escape the character. To set the end to $, change the expression to reposition it
with the closing parenthesis.
Examples
Filter Strings that match Strings that do not match
Binary: expr_test
Evaluation rules
Quotation marks are used to enclose what must be evaluated.
Examples:
2+2 gives 4
2+2 gives 2+2
An expression can contain text, constants (strings or numbers), operators, resources and functions.
The spaces at the beginning or end are ignored.
Example:
one two gives one two (without surrounding spaces)
Resources
Resources are presented in the form $%NAME, $@ NAME or $:NAME.
Where:
NAME is the name of the resource
% indicates a local resource, @ a global resource and : A local resource to the parent Chart (refer to X-
Charts)
In an expression, the NAME is the set of characters up to the first that is not alphanumeric.
Example:
$@RES1~toto assigns toto to the global resource named RES1.
The value returned is toto.
Note: It is possible to use indirection: $@($@RES1) designates the global resource whose name is the value
of the global resource with the name RES1.
With the binary expr_test, the fact of assigning a resource creates this resource in its dictionary. You
cannot assign a non-existing resource. In that case, evaluation terminates in error and indicates the
nature of the error.
To designate a resource from a parent Chart, you can also use multiple colons. All these syntaxes are
equivalent.
Arithmetic operators
The arithmetic operators apply to character strings convertible to integers.
/ is the integer division. // is the rest of the integer division.
Examples:
-12 gives -12
+15 gives 15
15+16 gives 31
15-16 gives -1
14*4 gives 56
14/4 gives 3
14//4 gives 2
3+(5;10) gives 8;13
Concatenation
^^ concatenates two strings. ^ concatenates two strings with a space between them.
Examples:
un^^deux gives undeux
un^deux gives un deux
(12;abc)^^(75;30) gives 1275;1230;abc75;abc30
Logical operators
! is negation, & is AND, | is inclusive OR and || is exclusive OR.
Examples:
!21 gives 0
!0 gives 1
0&1 gives 0
1&1 gives 1
0|1 gives 1
0||1 gives 1
1|1 gives 1
1||1 gives 0
Conditional operator
?: means if / if not.
The expression expression1?expression2:expression3 returns the value of expression2 if expression1 is true,
otherwise it returns expression3.
Example:
0?a:b gives b
1?a:b gives a
(0?ab:(1?cd:ef)) gives cd
Assignment operators
~ assigns the value that follows it to the resource that precedes it.
~~ adds the value that follows it to the resource that precedes it
Examples:
$%RES~(18;15) assigns (18;15) to the local resource RES
$%RES~~(22;23) modifies RES to (18;15;22;23)
Comparison operators
The operators are: = < > <= >= and their negative forms: != !< !> !<= !>=
During the comparison, spaces at the beginning or the end are ignored.
If both strings are convertible to integers, a complete comparison is performed. Otherwise, a character by
character comparison is performed depending on the coding specific to the machine (ASCII, EBCDIC.)
It is possible to force the comparison in a character string with the operators: == << >> <<= >>=
and their negative forms.
255 means true, and 0 means false.
Examples:
2<10 gives 255
2<<10 gives 0
A<a gives 255 (en ASCII)
A<a gives 0 (en EBCDIC)
Escape
Use back-slash to protect special characters.
Examples:
todays date gives todays date
today\s date gives todays date
Precedence of operators
Operators are applied in the order shown below (descending order, that is, first to last):
logical negation operator !
arithmetic operators * / // + -
concatenation ^^ ^
comparison = == < > != <= >= !== etc
other logical operators & | ||
conditional operator ?:
semi-colon operator ;
assignment operators ~ ~~
escape character \
Parentheses specify particular priorities for vectors.
Prerequisites
Only one production server can be rebuilt in a multi-host environment.
Modeling server must be running when rebuild starts.
In a multi-host environment, all the production servers have to be started.
If the production server uses a front-end processor module, it must also be started.
Rebuild modes
The rebuild can start from a backup or on empty data (from scratch). To indicate that the rebuild starts from
scratch, delete the engine directory.
The file mod_srv.lst in the directory MServer/lists is necessary for the production server to contact the modeling
server(s).
Rebuild options
Before restarting the production server, some variables need to be set to indicate that the server must rebuild
data. The variables can be set in the environment variables or in the OPSchedule.ini file (do not forget to
remove these variables for the next server restart).
TO_AGENT_FORCE_RESTORE: Mandatory option, indicating to the production server that it must rebuild
data. Must be set to 1.
TO_AGENT_RESTORE_PAUSE: Change default behavior when data is rebuilt. Default is 1. Two different cases
are possible:
Mono-machine instance:
o Option set to 1: the server will rebuild each date before today. Currently, the instances are set to
paused.
o Option set to 0: The running instances are set to paused. The instance remains at the last known
date.
Multi-machine instance:
o Option set to 1: Running instances are set to paused.
o Option set to 0: Instance status not changed.
TO_AGENT_RESTORE_RETRY: Default is 10. Indicates how many retries are done to retrieve information from
the production or modeling server(s).
TO_AGENT_RESTORE_CHECKALL: Not used when the rebuild is from scratch. Forces the server to check all the
dates when rebuilding data. (When using a backup, last date to be checked is calculated instead).
Rebuild steps
Production server connects to modeling servers to retrieve information about the instances that are supposed to
run on the production server. If a modeling server cannot be reached, the production server stops!
Production server synchronizes with all the production servers to update instances. If a production server
cannot be reached, the instance will be deleted.
Production synchronizes data with front-end processor if needed.
In the last step, global data are synchronized with the modeling server.
Data loss
When the rebuilt production server is the main Production server, it is possible that some data can be lost:
Instance history
Forecast scheduling data on object if they were not sent to a secondary production server
On AS/400: data concerning job interception Main or secondary production server:
o Job PID & OAC
o Joblogs
o Received notifications
Product behavior
Running jobs on the rebuild server are set to failed with a lost flag, unless the job is running through a frontal,
in which case the status is retrieved.
Cyclic objects: the next start of the job cannot be determined. Two cases are possible:
Rebuild in the past: on the running instance, cyclic jobs must be started by hand.
Rebuild for the current day, when the object has already been started on that day: the last start of the
object is taken into account, and the object can start immediately.
Note: Wrong information can go to the GUI when rebuilding a production server. Do not forget to refresh the
GUI when the rebuild has completed.
Backups
Modeling server
In the rebuild process, data on the Modeling server is presumed to be correct. But it could be incomplete if
additional backups were not being performed, and if the Modeling server host crashes. The following procedure
backs up data on the Modeling server.
Use the following command:
opscmd backup mserver host1 script save_sm_pec.sh
Content of the script save_sm_pec.sh:
tar cvf save_sm_pec $TO_INSTALL_DIR/date/TO_EENV*
$TO_INSTALL_DIR/date/TO_PPREV*. $TO_INSTALL_DIR/lists/inst
It is recommended to backup the whole Modeling server database (including both data and lists).
Production server
The data to be saved is found in Automator/PServer/engine.
In addition, do not forget to backup the lists directory. The mod_srv.lst file is mandatory for rebuilding the
Production server.
Introduction
Scripts running on an OPSOD cannot directly use the opscmd command. To allow such a script to return a
piece of information or to update a resource on the production server, three messages can be relayed by the
Frontal module.
The basic principle is that the Frontal, running on the same machine as the production server, will call the
command opscmd with parameters it received from the OPSOD.
The three messages processed are as follows:
OPSOVAR: assign value to a resource
OPSOMSG: send a notification
OPSOETQ: return the label that specifies the level of execution of the script
Opsovar
When the Frontal receives a message, it compares the expression to OPSOVAR. If the expression is identical,
the function traitVar will be started.
The type of received message is in the following form: OPSOVAR Date_and_time Ress1 Val1.
The function traitVar launches a shell or a bat file (depends on the type of OS for the machine) that will
contain following command line:
TO_INSTALL_DIR\bin\opscmd resval res Ress1 val Val1 pserver Hostname
port 10700.
The name of the resource (Ress1) as well as its value (Val1) can be of alphanumeric type.
If the Hostname is not defined in the OpsFrontal.ini preferences file, the shell is started on the local
machine.
The parameters passed to the executable are Ress1 (name of the resource), Val1 (value of the resource),
Hostname (name of the Modeling Server), and Srv_port (port of the Modeling Server).
The function traitVar executes the shell or the bat file and thus sets the resource for the server (modeling
for the global resources, the local resources will be set later with the possibility of processing them in V1).
Opsoetq
This case is not yet handled by the GUI, because it the API does not yet return information to the GUI.
However, the principle will be the following:
The message will be of the type OPSOETQ Date_and_time PID Number of the Label job.
When the Frontal receives the message OPSOETQ, it launches the function traitEtq.
The function traitEtq executes a shell or a bat file that will launch an API opscmd sendetq that sends the label
to the GUI for a given job.
This shell or the bat file will contain the following line:
TO_INSTALL_DIR\bin\opscmd sendetq etq EtqName mserver Hostname port Srv_port pid Num_Pid.
The parameters passed to the executable are EtqName (name for the label), Hostname (name of the Modeling
Server, Srv_port (port of the Modeling Server), Num_Pid (PID number of the job in progress).
The function traitEtq executes the shell or the bat file, thus passing on the label of the Modeling Server that
transmits the information to the GUI.
Opsomsg
When the Frontal receives a message, it compares the expression to OPSOMSG. If the expression is identical,
the function traitMsg will be launched.
The type of received message will be in the following form: OPSOMSG Date_and_time Message.
The function traitVar launches a shell or a bat file that will contain the following command line:
TO_INSTALL_DIR\bin\opscmd notify notif Message pserver agtName port 10510.
The message can be of type alphanumeric and is the only parameter passed to the executable.
The function traitMsg launches the shell or the bat file, sending in this way the notification to all the agents (in
the API, pserver is not specified).
Common terms
Term Definition
Application
An application is a set of objects (jobs, commands, alerts, and so on).
Archive An archive is an executable version of the Chart, from which new instances are
created for execution.
Calendar
A calendar defines the workdays and/or holidays in a year.
Chart
A Chart is a set of objects (applications, jobs, alerts, and so on).
Chart Parameter The Chart parameter is the value passed to the Chart when it is put into
production.
Formula A formula is a rule expressed in a natural language to define complex
scheduling cases.
Instance
An instance is a Chart archive ready to be put into production.
Job A job is an entity that can be executed in batch mode; it points to a script or
command to be run.
Job parameter
The job parameter is the value passed to a script as an argument.
Link
A link is a scheduling dependency between the objects in a Chart.
Macro
A macro is a named formula.
Modeling Server A modeling server is used to configure all scheduling rules (calendars,
resources, and so on) for the jobs to be scheduled, and create Charts.
A notification is a global operating variable that is used to determine job and
application triggering.
Notification Its value can be modified by the Axway Automator Notification object in a Chart
or by external applications (Monitor server, Console server, and so on).
The value of a global operating variable can be modified by the notification, for
Chart synchronization purposes, or by external applications (Monitor server,
Console server, and so on).
Production Server A production server is a standalone module installed on the system controlled
by Axway Automator.
Evaluations
1: Status Evaluation
Ready Executing Terminated Failed Descheduled Not Scheduled
Continue Track the job Finished Finished Finished Finished
2: Schedule Evaluation
Not Scheduled Scheduled
Finished Continue
3: Time Evaluation
Start Time Not Reached On time Maximum time exceeded
Wait Continue Deschedule
5: Watchdog link: It has a timeout which is triggered when the status of the parent object changes to executing.
If the parent object is scheduled or not scheduled, the watchdog link deschedules.
If the parent job is terminated, failed or killed before the timeout has expired, the child object is descheduled.
If the timeout has expired but the parent object is executing, the link is evaluated and the process moves on
to the child object.
The link may kill the parent object process if the parent object is executing when the timeout expires.
File
Text
Path
User
System
Objects
Numeric
Date Variable
Axway Automator
Local Resource
Global Resource
Scheduling Rule
Production Server
Scheduling Rule
Production Server
User
Script Path
Chart Definition
AS/400
File
Numeric
Text
Resources
Local Chart
Weight
Production
Server
User
Scheduling
Rule
Application
AS/400
User
Production
Parameter and resource availability table
Job
Server
Scheduling
Rule
Script Name
Job Parameter
Parameters
67
File Resource
Text Resource
Numeric
Resource
Use of Resources
Weight
Resource
Command to be
Run
Alert
OPS
Notification
Monitor
Console
Test
Use of Other Objects
Assign