You are on page 1of 68

ADVANCED USERS GUIDE

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

Axway Automator Advanced Users Guide 2


Modifying the state of an instance: opscmd instance ................................................................................ 31
Executing an action: opscmd craction ..................................................................................................... 31
Snapshot of requested objects: opscmd snapshot ....................................................................................... 32
Returning the scheduling for objects of an instance: opscmd objplan ........................................................... 32
Manually purging on the modeling server: opscmd inst_purge ..................................................................... 33
Operating principle ............................................................................................................................... 33
Procedure 33
Return code 33
Presence of the modeling server: opscmd transexec ................................................................................... 33
Describing a complete Chart: Opscmd graphview ....................................................................................... 34
Getting a description of all jobs: Opscmd objview ....................................................................................... 34
Listing objects by type: opscmd listeall ...................................................................................................... 34
Displaying script jobs: opscmd listjob ........................................................................................................ 35
Displaying global resources: Opscmd listres ............................................................................................... 35
Modifying a parameter: opscmd alias ......................................................................................................... 36
Displaying a list of objects by type: opscmd apidoc ..................................................................................... 36
Modifying an object property for a coming plan: opscmd objprop ................................................................. 37
Modifying a local resource for a coming plan: opscmd resforcast .................................................................. 37
4 Operating Principles for OPSCMD on AS/400 .................................................................................................. 38
Overview ................................................................................................................................................ 38
5 Using Web services ............................................................................................................................................. 40
Operations Service Description .................................................................................................................. 40
RESVAL Operation : Modifying a resource ............................................................................................... 40
ArchVarLst Operation : Retrieving parameters ......................................................................................... 40
CRINST Operation : Creating or replacing an instance .............................................................................. 41
OBJECT Operation : Modifying the status of an object .............................................................................. 41
INSTANCE Operation: Modifying the state of an instance ......................................................................... 42
DSPSTS Operation : Displaying object states for a schedule ..................................................................... 42
6 Using OPSADM .................................................................................................................................................... 44
Presence and functioning of threads: opsadm chkthr .................................................................................. 44
Verifying production server data: opsadm enginechk .................................................................................. 44
Modifying the log level: opsadm setlog ...................................................................................................... 45
Creating an immediate backup: opsadm backup ......................................................................................... 45
Setting pause mode: opsadm pausemode .................................................................................................. 45
Displaying instance status: opsadm istatus ................................................................................................. 45
Checking the database: opsadm dbchk ...................................................................................................... 46
Check the instances: opsadm chkinst......................................................................................................... 46
7 Useful configuration variables............................................................................................................................ 48
Warnings ................................................................................................................................................ 48
Changing the modeling server ID .............................................................................................................. 48
Changing the log file size and level ............................................................................................................ 48
Submission issues on HPUX / Solaris ......................................................................................................... 49
Formatting names in a domain .................................................................................................................. 49
Disabling system rights verification when editing a script ............................................................................. 49

Axway Automator Advanced Users Guide 3


Problem if jobs ended while production server is offline: access rights .......................................................... 49
Using path variables and VMS opsod ......................................................................................................... 50
Changing the number of execution threads ................................................................................................ 50
Updating X-Chart parameters at PEC ......................................................................................................... 50
Restarting a production server in pause mode ............................................................................................ 50
Enabling the display of an X-Chart when connecting to a production server .................................................. 50
Network protocol (IPv4 / IPv6) ................................................................................................................. 51
8 Regular expressions............................................................................................................................................ 52
Overview ................................................................................................................................................ 52
9 Expressions from V1 ........................................................................................................................................... 54
Binary: expr_test ..................................................................................................................................... 54
Evaluation rules ....................................................................................................................................... 54
Resources ............................................................................................................................................... 54
Semi-colon operator: vectors .................................................................................................................... 55
Arithmetic operators ................................................................................................................................ 55
Concatenation ......................................................................................................................................... 55
Logical operators ..................................................................................................................................... 56
Conditional operator ................................................................................................................................ 56
Assignment operators .............................................................................................................................. 56
Comparison operators .............................................................................................................................. 56
Escape 57
Precedence of operators ........................................................................................................................... 57
10 Rebuilding the Production Server ...................................................................................................................... 58
Prerequisites ........................................................................................................................................... 58
Rebuild modes ........................................................................................................................................ 58
Rebuild options........................................................................................................................................ 58
Rebuild steps .......................................................................................................................................... 59
Data loss ................................................................................................................................................ 59
Product behavior ..................................................................................................................................... 59
Backups .................................................................................................................................................. 59
Modeling server .................................................................................................................................... 59
Production server ................................................................................................................................. 60
11 Frontal commands ............................................................................................................................................... 61
Introduction ............................................................................................................................................ 61
Opsovar .................................................................................................................................................. 61
Opsoetq .................................................................................................................................................. 61
Opsomsg ................................................................................................................................................ 62
Modification of the preference file ............................................................................................................. 62
Modification of the Frontal service ............................................................................................................. 62
Renaming conf directory........................................................................................................................... 63
12 Miscellaneous ...................................................................................................................................................... 64
Common terms ........................................................................................................................................ 64

Axway Automator Advanced Users Guide 4


Evaluations ............................................................................................................................................. 65
Parameter and resource availability table ................................................................................................... 67

Axway Automator Advanced Users Guide 5


1 Introduction
What do you want to do?
This guide describes the main APIs (opscmd and opsadm) of the Axway Automator product.
This document is intended for people who need an appendix reference for Axway Automator.

What do you learn about?


In this guide, we assume that you have a good understanding of Axway Automator.

Axway Automator Advanced Users Guide 6


2 Licence key management
This chapter describes for a specific Modeling server the functions that you can use to add, check the validity or display
the available options of an Automator key.

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.

Adding a Key: keyapi addkey


Use the function addkey to add or check the validity of an Automator key for a specific Modeling server.
Option Description Default (non-mandatory option)
key Key value (attributed by Axway)
mserver Hostname for the Modeling server Server where command is launched
port Modeling server port number port by default
addprop Add the KEY_VALUE property in the 1
OPSchedule.ini file 1/0

keyapi-win-x86-32.exe addkey -key


0PM835184OBZY25W466LHK5E6RL7OY6YMMDFSYZH -addprop 1
keyapi-win-x86-32.exe addkey -key
0PM835184OBZY25W466LHK5E6RL7OY6YMMDFSYZH -addprop 0
Key valid

Displaying the details of a Key: keyapi chkkey


Use this function to display the available options of the Automator key for a specific Modeling server.
Option Description Default (non-mandatory option)
type Key type
'PRD' for general key
'QST' for questionnaire key
'WEB' for Web GUI key
mserver Hostname for the Modeling server Server where command is started
port Modeling server port number port by default
The Modeling server must be started.

Axway Automator Advanced Users Guide 7


Licence key management

Axway Automator Advanced Users Guide 8


3 Using OPSCMD
This chapter lists the OPSCMD commands and describes how to use them.

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.

Verifying a planning rule: opscmd rulechk


Option Description Default (non-mandatory options)
Rule Name of the planning rule
date (format YYYYMMDD) First date to verify by default Todays date
Opend Number of open days to verify
Days Number of days to verify 1
Mserver Modeling Server Server where opscmd is launched
Port Port for the Modeling Server 10500
Note: The options opend and days cannot be used at the same time.
Example:
\Automator\MServer\bin>opscmd rulechk -rule sched_rule days 20
RULE:sched_rule - DATE:20020116 (WEDNESDAY) - RESULT:TRUE
RULE:sched_rule - DATE:20020117 (THURSDAY) - RESULT:TRUE
RULE:sched_rule - DATE:20020118 (FRIDAY) - RESULT:TRUE
RULE:sched_rule - DATE:20020119 (SATURDAY) - RESULT:FALSE
RULE:sched_rule - DATE:20020120 (SUNDAY) - RESULT:FALSE
RULE:sched_rule - DATE:20020121 (MONDAY) - RESULT:TRUE
RULE:sched_rule - DATE:20020122 (TUESDAY) - RESULT:TRUE
RULE:sched_rule - DATE:20020123 (WEDNESDAY) - RESULT:TRUE
RULE:sched_rule - DATE:20020124 (THURSDAY) - RESULT:TRUE
RULE:sched_rule - DATE:20020125 (FRIDAY) - RESULT:TRUE
RULE:sched_rule - DATE:20020126 (SATURDAY) - RESULT:FALSE
RULE:sched_rule - DATE:20020127 (SUNDAY) - RESULT:FALSE
RULE:sched_rule - DATE:20020128 (MONDAY) - RESULT:TRUE
RULE:sched_rule - DATE:20020129 (TUESDAY) - RESULT:TRUE
RULE:sched_rule - DATE:20020130 (WEDNESDAY) - RESULT:TRUE
RULE:sched_rule - DATE:20020131 (THURSDAY) - RESULT:TRUE
RULE:sched_rule - DATE:20020201 (FRIDAY) - RESULT:TRUE
RULE:sched_rule - DATE:20020202 (SATURDAY) - RESULT:FALSE
RULE:sched_rule - DATE:20020203 (SUNDAY) - RESULT:FALSE
RULE:sched_rule - DATE:20020204 (MONDAY) - RESULT:TRUE
RESULT=true: the day is scheduled
RESULT=false: the day is not scheduled

Axway Automator Advanced Users Guide 9


Using OPSCMD

Displaying object states for a schedule: opscmd


dspsts
Option Description Default (non-mandatory option)
inst Name of the instance
date Date todays date
(format YYYYMMDD)
dspid Displays the identifier for the object: yes no
or no
dsptype Displays the type for the object: yes or no
no
dspdate Displays the date for the instance: yes no
or no
Dspflags Displays the flag for the object: yes or no
no
Mserver Modeling Server server where opscmd is launched
Pserver Production Server server where opscmd is launched
Port Server Port (modeling or production) 10500 (opt mserver) 10510 (opt pserver)
Status Filter on the status of objects: None
* IN_PROGRESS:in progress
* END_ERROR:terminated in error
* DESCHED:descheduled
* NOTSCHED:not scheduled
* END_OK:terminated
* COMING:future
Name Filter on the name of objects None
Level Level Chart: all
* all all objects
1 first-level graphical
2 second-level graphical
Note: The options mserver and pserver cannot be used at the same time.
Example:
\Automator\MServer\bin>opscmd dspsts -inst inst_n_1 -dspid yes -
dsptype yes -dspdate yes -dspflags yes
INST:rhodia DATE:20020116 OBJ:OU_0 TYPE:OR ID:OU0000000007
STATUS:END_OK FLAGS:
INST:rhodia DATE:20020116 OBJ:JOB_4 TYPE:JOB ID:JO0000000032
STATUS:END_ERROR FLAGS:
INST:rhodia DATE:20020116 OBJ:JOB_3 TYPE:JOB ID:JO0000000031
STATUS:NOTSCHED FLAGS:
INST:rhodia DATE:20020116 OBJ:JOB_2 TYPE:JOB ID:JO0000000030
STATUS:DESCHED FLAGS:
INST:rhodia DATE:20020116 OBJ:JOB_1 TYPE:JOB ID:JO0000000029
STATUS:COMING FLAGS:(20: Locked)
INST:rhodia DATE:20020116 OBJ:JOB_0 TYPE:JOB ID:JO0000000028
STATUS:END_OK FLAGS:
INST:rhodia DATE:20020116 OBJ:ET_0 TYPE:AND ID:ET0000000007
STATUS:END_OK FLAGS:
INST:rhodia DATE:20020116 OBJ:CMD_0 TYPE:COMMAND ID:CM0000000007
STATUS:END_OK FLAGS:
INST:rhodia DATE:20020116 OBJ:ATT_0 TYPE:WAIT ID:AT0000000007
STATUS:END_OK FLAGS:
INST:rhodia DATE:20020116 OBJ:APP_1 TYPE:APP ID:AP0000000006
STATUS:END_ERROR FLAGS:(100: Respect)
INST:rhodia DATE:20020116 OBJ:APP_0 TYPE:APP ID:AP0000000005
STATUS:END_OK FLAGS:(100: Respect)

Axway Automator Advanced Users Guide 10


Using OPSCMD

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

Modifying a resource: opscmd resval


Modify the value of a local or global resource.
Options Description Default value
res Name of the resource
value New value of the resource
inst Name of the instance, if the resource is local
date Date for the instance (if the resource is local). Format Today
(YYYYMMDD).
Only with FIFO resources
Push Add a line in the resource
Pop one: clear a line in the FIFO resource
all: empty the FIFO resource
move Move the value of a resource in the FIFO (-x/+x/top/bottom)
delete Delete a specific value from a resource FIFO(first/all)
repeat To add the same value to a FIFO multiple times
Only with Weight resources
Inc Value to which the Weight resource is incremented
pserver Production Server (agent) if the resource is local
mserver Modeling Server if the resource is global
Port Server Port MS: 10500
PS: 10510
retry Number of retries if server is occupied 30
retryd Time between retries 1 second
context Specify the context. Separate using '/'
Example: context1/context2/context3 (global resources only)
globsp Specify 1 only for a global resource for the production server. 0
Note: The options mserver and pserver cannot be used at the same time.
Examples:
Move the value 1 in the global resource RGFifo by two places:
D:\Automator\MServer\bin\opscmd resval -res RGFifo -value 1 -move +2
port 10800
Add the value 8 to the global resource RGFifo
D:\Automator\MServer\bin\opscmd resval -res RGFifo -push 8 -port 10800
Add the value 8 to the global resource RGFifo with 50 retries and a wait time of 2 seconds between each
D:\Automator\MServer\bin\opscmd resval -res RGFifo -push 8 -port 10800
retry 50 retryd 2

Axway Automator Advanced Users Guide 11


Using OPSCMD

Modifying a vector: opscmd chgvector


The API opscmd chgvector applies the two vector functions, allowing you to modify the content from command
line.
These two functions are addv() and setv().
This API calls the Modeling Server if you modify a global resource and the Production Server if this is a local
resource that you want to change. Same principle as the API resval.
Default
Option Description
(non-mandatory option)
inst Name of the instance
date Date of the schedule (if local resource) (format YYYYMMDD)
number Number of executions for the instance (if local resource)
function Name of the function (addv or setv)
vector Name for the resource that represents the vector
value Value of the element to add to the vector
index For the functions setv (mandatory) and addv (optional)
pserver Name of the host of the Production Server server where opscmd is
launched
mserver Name of the host for the Modeling Server server where opscmd is
launched
port Port number of the Modeling server, or of the Production port by default
server, depending on use
The prototypes of the functions addv and setv are: $setv(vector, index, value), $addv(vector, value) and
$addv(vector, value, index).
If the function setv is used, the parameter index is mandatory.

Deleting joblogs files: opscmd rmlog


Default
Option Description
(non-mandatory option)
Inst Name of the instance
date (format YYYYMMDD) Date
Dir Pathname for the joblogs
Trace Displays the traces: yes or no no
Example:
\Automator\PServer\bin>opscmd rmlog -inst inst_n_1 -date 20020116 -
trace yes -dir d:\Automator\PServer\joblogs
Inspecting dir: d:\ Automator\PServer\joblogs\inst_n_1
Found: 20020116_0000__JOB_0_20020116-113703.e Deleted
Found: 20020116_0000__JOB_0_20020116-113703.s Deleted
Found: 20020116_0000__JOB_0_C0_20020116-113704.e Deleted
Found: 20020116_0000__JOB_0_C0_20020116-113704.s Deleted
Found: 20020116_0000__JOB_0_C1_20020116-113704.e Deleted
Found: 20020116_0000__JOB_0_C1_20020116-113704.s Deleted
Found: 20020116_0000__JOB_0_C2_20020116-113704.e Deleted
Found: 20020116_0000__JOB_0_C2_20020116-113704.s Deleted

FOUND: Name of the file deleted


Format for the filename: date of the schedule instance number for the duplicator jobs name of the job
date and Time of execution.
s= standard output, e=error output

Axway Automator Advanced Users Guide 12


Using OPSCMD

Modifying the status of an object: opscmd object


Option Description Default (non-mandatory option)
obj Name of the object
action Action on the object:
restart:
hold:
release:
request:
cancel': kill
f_tobedone: future
f_running: started
f_finished: terminated
f_failed: in error
f_desched: descheduled
f_notsched: not scheduled
f_tobedoneheld: future kept
f_etqcur': pass label
inst Name of the instance
number Number of instance (duplicator jobs as400) 1
date date for the instance todays date
etqsrt Start Label (for the actions f_tobedone and f_running)

etqend End Label (for the actions f_tobedone and f_running)


etqcur Current Label (only for the action f_etqcur)
pserver Production Server server where opscmd is launched
mserver Modeling Server server where opscmd is launched
port Server Port (modeling or production) 10500 (opt mserver) 10510 (opt
pserver)
Note: Depending on the type of the object or on the status of the object at the time you launch the command,
the actions are not all usable (ex: it is impossible to request (action request) the clock object: only
jobs and applications can be requested).
Example: (Relaunch a job)
...\Automator\MServer\bin\>opscmd object -obj JOB_0_C1 -action restart
-inst inst_n_1
Action on object JOB_0_C1 registered
If you see the message action on object registered, the action was taken into account but not necessarily
executed (refer to the note above).
Note: If several objects have the same name but different graphical levels, it can be useful to specify for the
option obj, the application that contains the object:
-obj APPLICATION/OBJECT

Case: label relaunch


To relaunch the job JOB_ETQ for the instance relance_etq with labels. This instance runs on the Production
Server Tru64 with the port 10960. This instance was created on the Modeling Server Tru64 with the port
10950. To relaunch this job, you can use the API as follows:
By directly contacting the Production Server:
Opscmd object -obj JOB_ETQ -action f_tobedone -inst relance_etq -number
1 -date 20011218 - pserver true64 -port 10960 -etqsrt ETQ_DBT -etqend
ETQ_END

Axway Automator Advanced Users Guide 13


Using OPSCMD

By contacting the Modeling Server:


Opscmd object -obj JOB_ETQ -action f_tobedone -inst relance_etq -number
1 -date 20011218 - mserver true64 port 10960 -etqsrt ETQ_DBT -etqend
ETQ_END
If the options etqsrt and etqend are completed while the selected action is not in progress or future (f_running
and f_tobedone), the API terminates in error with the following message:
Start point or end point not alloyed for action restart

Case: passing or memorizing labels


You want to be informed that the job JOB_0 situated in the application APP_0 for the instance current_etq is at
the label ETQ_CUR. This instance runs on the Production Server Tru64 with the port 10960. This instance was
created on the Modeling Server Tru64 with the port 10950. To pass this information, insert the API OPSCMD
in the job after the labels (the steps) as follows:
By directly contacting the Production Server:
Opscmd object -obj APP_0/JOB_0 -action f_etqcur -inst current_etq -
number 1 -date 20011218 - pserver true64 -port 10960 -etqcur ETQ_CUR
Note: In the case of a script executed by a job, environment variables are set to indicate the object, the
instance and the current date. So in this case, to pass the label:
opscmd object -action f_etqcur -obj %TO_JOB_NAME% -etqcur
name_of_label
or
opscmd object -action f_etqcur -obj ${TO_JOB_NAME} -etqcur
name_of_label

Shutting down a server


Shutdown a production server: opscmd endpsrv
Option Description Default (non-mandatory option)
pserver Production Server server where opscmd is launched
Port Port of the Production Server 10510
Note: The Production Servers are normally shutdown by the services.
Example: Shutdown the Production Server
...\Automator\PServer\bin\>opscmd endpsrv
opspserver must no longer be found in the list of the processes.

Shutdown a modeling server: opscmd endmsrv


Option Description Default (non-mandatory option)
mserver Modeling Server server where opscmd is launched
Port Port for the Modeling Server 10500
Note: The Modeling Server is normally shutdown by the services.
Example: Shutdown the Modeling Server
...\Automator\MServer\bin\>opscmd endmsrv
opsmserver must no longer be found in the list of processes.

Axway Automator Advanced Users Guide 14


Using OPSCMD

Activate or deactivate a server: opscmd activate


Use this function to activate or deactivate a Production server.
Option Description Default (non-mandatory option)
name Name of the Production server
mode On to activate, Off to deactivate. On
mserver Hostname for the Modeling server Server where opscmd is launched
port Modeling server port number port by default

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

Deleting a notification: opscmd ntfydel


Use this function to delete a notification on hold, on one or more servers.
Option Description Default (non-mandatory option)
ntfy Content of the notification
date Date of the schedule (format YYYYMMDD) Current date
pserver Production server cabled. If not specified, the command is sent to
all Production servers.
mserver Hostname for the Modeling server Server where opscmd is launched
Port Modeling server port number Port by default

Exporting and importing a Chart


This functionality can be used to transfer Charts from one server to another. All parameters used by the Chart
are automatically reused.

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:

Axway Automator Advanced Users Guide 15


Using OPSCMD

Example: opscmd export


List of options
When you do not specify a non-mandatory option, it takes the default value.
Options Description
Graph Name of the Chart to export (respect upper case and lower case).
(Mandatory option)
Quest Export Questionnaires that could be associated with all graphical environments.
The Questionnaires present are exported by default. The possible values are 0 or 1
(1 by default for the export).
Dir Destination directory for the export. By default, the export is performed in the directory
export where Automator was installed (if the directory does not exist, it will be created
automatically).
Glob Export global resources. By default, the resources detected in the chart are exported
(0 by default).
1 If you went export all Global Resources.
Warning: The values of global resources can be used in the responses associated with
the Questionnaires that could be present at the graphical level. If yes, use option 1 to be
sure to export them.
Mserver Modeling Server where the Chart to export can be found. 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.
Arch Export archives (all, none, archive1| archive2|archive3 ...). By default, no 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.

Axway Automator Advanced Users Guide 16


Using OPSCMD

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.

Listing imported data


Apart from the parameters of the Chart, certain data in the configuration portion is automatically carried over,
if used by the same Chart.
Note: If the data already exists (identical names), that data will not be replaced. This can pose problems if
the parameters are different.
Data Reuse
Modeling Server No
Production Servers Yes
Domain Servers Yes
Connection objects Yes
Users Yes
Calendars Yes
Macros Yes
Planning Rules Yes
Variables date Yes
Global resources Yes
Chart views No
Execution group Yes

Description of exported files


Files Description
*.cons Recommendations
EB*.def Definition of the first level
EB*_AP*.def Definition of sublevels of the application
EB*_JO*.par Parameters of the job
EB*_JO*.400 Parameters AS400 of the job
TO_400DP.exp AS400
TO_AGT.exp Agents
TO_APP.exp Applications
TO_CAL.exp Calendar
TO_CALY.exp Calendar of the year
TO_CNTX.exp Contexts
TO_CNXOBJ.exp Connection objects
TO_DSRV.exp Domain servers

Axway Automator Advanced Users Guide 17


Using OPSCMD

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

Renaming object contents


You can rename object contents when you import a Chart. This functionality can adapt the import around the
destination machine, particularly at the level of the Production Servers.

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 the names of resources


Global resources and local resources have the same description in the file parmtochg.lst, as a result a single
proposition to change a value will be proposed for the name of two resources with the same name.

Constraints on the type of resources


The Automator resources are typed, you have, for example a Text resource and a Numeric resource. Identical
values for these resources mean that the user does not which one grants modification rights (though in this
case, it would be the Numeric resource).

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.

Axway Automator Advanced Users Guide 18


Using OPSCMD

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.

Constraints on the format of values


A certain number of fields that the user can modify can take as value a parameter or a resource (ex: the
pathname for scripts).
If the user has as value a string of 12 characters composed of 2 alpha characters then 10 numeric characters,
or of a string that contain the sequence <$ and :, this value will not be supplied by the software in the file
parmtochg.lst because Automator sees this as a parameter or resource ID.
If the value is a concatenation that contains a parameter or a resource, the user can modify this value. So make
sure that the formats are respected.
The values that contain special characters such as \ are doubled.
Example:
c:\\scripts\\

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).

Axway Automator Advanced Users Guide 19


Using OPSCMD

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)

Axway Automator Advanced Users Guide 20


Using OPSCMD

Object What Description


Number Submitted for (number) (AS400 Prod. Server
definition)
Maximum messages / job queue Max. Mess./Job queue size (AS400 Prod. Server
size definition)
Action if messages / job queue full Action if Mess./Job queue full (AS400 Prod.
Server definition)
Copy environment variables Copy environment variables (AS400 Prod. Server
definition)
Multiple Exec Devices allowed Multiple Exec Devices allowed (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

Axway Automator Advanced Users Guide 21


Using OPSCMD

Object What Description


Script directory (source) Source script directory
Script name (source) Source script name
Job parameters Job parameters
Definition of an
SAP job
Specific SAP User Name Specific SAP User Name
Specific SAP login proxy Specific SAP login proxy
AS400 Job
Job description Job description (AS400 jobs definition)
Job description library Job description library
Job queue Job queue
Job queue library Job queue library
Job priority in JOBQ Job priority in JOBQ
Output priority in OUTQ Output priority in OUTQ
Print device Print device
Output queue Output queue
Output queue library Output queue library
Text to be printed Text to be printed
Routing data Routing data
Request or command data Request or command data
System library list System library list
Current library Current library
Initial library list Initial library list
Message logging Message logging
Log CL programs Log CL programs
Query message response Query message response
Hold in job queue Hold in job queue
Scheduled date Scheduled date
Scheduled time Scheduled time
Job date Job date
External flag External flag
Display by WRKSBMJOB Display WRKSBMJOB
Message queue Message queue
Message queue library Message queue library
Sort sequence Sort sequence
Sort sequence library Sort sequence library
Language ID Language ID
Country ID Country ID
Coded character set ID Coded character set ID
Submitted for Submitted for
Submitted for (user) Submitted for (user)
Submitted for (number) Submitted for (number)
Max. Mess./Job queue size Max. Mess./Job queue size
Action if Mess./Job queue full Action if Mess./Job queue full
Copy environment variables Copy environment variables
Multiple Exec Devices allowed Multiple Exec Devices allowed
PeopleSoft Job
Status Check Time between two scan to check Run Status
Output format Format for output log type
Output log type Output log type
Process type Process type
Execution Machine Process
Run Control Id Run Control Id
Name of the Process Process Name
Port JSL for connection to the Port to connect Application server
application server
Application Server Application Server

Axway Automator Advanced Users Guide 22


Using OPSCMD

Exporting and importing Questionnaires:


opscmd qexport, qimport
This functionality can be used to transfer Questionnaires and the associated responses from one server to
another. All data used by the Questionnaire is automatically forwarded.

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

Axway Automator Advanced Users Guide 23


Using OPSCMD

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 and attaching Questionnaires: opscmd


setquest
This functionality creates Questionnaires via an API.

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.

Axway Automator Advanced Users Guide 24


Using OPSCMD

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" ""

Axway Automator Advanced Users Guide 25


Using OPSCMD

"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 {

Axway Automator Advanced Users Guide 26


Using OPSCMD

"OBJTYPE" "JOB" for a job


"OBJNAME" "Chart_Test /JOB0"
}
Attachment to the Job JOB0 that belongs to the Chart Chart_Test.

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"
}

Attachment to the application APP0 that belongs to the Chart Chart_Test.

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.

Working with archives


These two commands are used to work on Charts archives. All actions available through the GUI are also
available through those two commands.

Creating an archive: Opscmd archive


Creates, deletes an archive, or list all archives of a graph.
Option Description Default (non-mandatory option)
action Action to perform. Possible values: create
create, delete, list
graph Name of the Chart (mandatory)
arch Name of the archive (optional with list
action)
mserver Modeling server Modeling server hosting the Chart
Port Port for the Modeling server 10500
Example:
<AutomatorInstallDir>\bin\opscmd archive -action list -graph Test
Liste of archive for graph : Test
Archive: Test_2
Archive: Test

Axway Automator Advanced Users Guide 27


Using OPSCMD

Modifying attributes: Opscmd varch


Change the state of the archive. (working version, reference version )
Default
Option Description
(non-mandatory option)
set Set the version ( ref | work )
Rmv Remove a version ( ref | work )
arch Name of the archive (optional with list action)
mserver Modeling server Modeling server hosting the
Chart
Port Port for the Modeling server 10500
Example:
<AutomatorInstallDir>\bin\opscmd varch -arch Test_2 -set ref
Version of archive 'Test_2' correctly updated

Retrieving parameters: Opscmd archvarlist


Returns the list of parameters of an archive in a file, for further use with opscmd crinst
Option Description Default (non-mandatory option)
arch [Mandatory]Name of the archive
path Output path Bin directory
file Output file name Var.lst
mserver Modeling server Modeling server hosting the Chart
Port Port for the Modeling server 10500
Example:
<AutomatorInstallDir>\bin\opscmd archvarlst -arch Test
Contents of the var.lst file
"Utilisateur" "__default__"
"toto.text" "c:\\toto.txt"
"Scripts" "D:\\Axway\\Automator\\Scripts\\"

Working with instances


Creating or replacing an instance: opscmd crinst
Output: Message that indicates if the instance was created or not (correct termination or incorrect termination).

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

Axway Automator Advanced Users Guide 28


Using OPSCMD

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

Displaying instance status: opscmd inststat


The inststat function displays the status and general information of the instances matching the parameters.
Option
inst [Mandatory] Instance name. Use *all to display all instances.
arch Display only instance for this archive.
all Display instances for all production server. (yes|no). Default is no.
start Display instances from this date. Default is today.
end Display instances until this date.
mserver Name of the Modeling Server to contact. By default, the local machine
pserver Name of the Production Server to contact. By default, the local machine
port TCP Server Port

Axway Automator Advanced Users Guide 29


Using OPSCMD

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)

Duplicating an instance: opscmd instdupli


Create a duplicated instance
Option
Inst [Mandatory] Instance name.
Date Date YYYYMMDD (default is today)
starttime Start time of the instance hh:mm (default is ASAP)
endtime Time limit of the instance dd/hh:mm (default is never)
Lres List of local resources to update (format ResName=value;ResName2=value2)
pserver Name of the Production Server to contact. By default, the local machine
Port TCP Server Port
Note:
You can only create a duplicate from a running instance.
The command does not return any status or value. Youll have to manually verify the instance to verify if it
has been created. (see next section)
Example:
<AutomatorInstallDir>\bin\opscmd instdupli -inst TestDupl date
20081104
UDP '5400' sended to host 'localhost'

Displaying the list of duplicate instances: opscmd isduplirun


Verifys if an instance has duplicates running and displays the list of it does.
Option
Inst [Mandatory] Instance name.
Date Date YYYYMMDD (default is today)
Pserver Name of the Production Server to contact. By default, the local machine
Port TCP Server Port
Example:
<AutomatorInstallDir>\bin\opscmd isduplirun -inst TestDupl
2
List:
0002;I_PAUSE
0003;I_RUN

Axway Automator Advanced Users Guide 30


Using OPSCMD

Displaying instance parameters: opscmd instparam


Displays the list of parameters of an instance.
Option
Inst [Mandatory] Instance name.
Date Date YYYYMMDD (default is today)
Pserver Name of the Production Server to contact. By default, the local machine
Mserver Name of the Production Server to contact. By default, the local machine
Port TCP Server Port
Example:
D:\Axway\Automator\Automator_V320_SP\bin>opscmd instparam -inst Test
Results for instance <Test>
=======================================================================
Instance
-----------------------------------------------------------------------
Pameter Type Value
=======================================================================
Scripts DIR D:\Axway\Automator\Scripts\
toto.text TEXT c:\toto.txt
Utilisateur USER __default__

Modifying the state of an instance: opscmd instance


Option Description Default (non-mandatory option)
Inst Name of the instance
Action on the object:
stop: the instance
Action pause: the instance
play: the instance
reset: the instance again
Number Number of instance (duplicator jobs as400) 1
Date Date for the instance todays date
Pserver Production Server server where opscmd is launched
Mserver Modeling Server server where opscmd is launched
10500 (opt mserver) 10510 (opt
Port Server Port (modeling or production)
pserver)
Note: Depending on the state for the instance at the moment where you launch the command, the actions are
not all usable (ex: it is not possible to force an instance to the state: stopped, to the state in progress
(action play). You must first replay it (action reset).
Example: (Switch a paused instance to the state in progress)
...\Automator\bin>opscmd instance - inst inst_n_1 -action play
Action on instance inst_n_1 registered
If you see the message action on instance registered, the action has been taken into account, but is not
necessarily executed (refer to the note above).

Executing an action: opscmd craction


If you have created actions to automate the creation of your instances, you can run an action in command line
(from a script, for example), using opscmd action.
Option Description Default (non-mandatory option)
Name [Mandatory] Name of the action to execute
Timeout Wait time between two instance creation 30 seconds
Mserver Modeling server Modeling server
Port Port for the Modeling server 10500

Axway Automator Advanced Users Guide 31


Using OPSCMD

Snapshot of requested objects: opscmd


snapshot
Option Description Default (non-mandatory options)
inst Name of the instance
view Name of the view
graph Name of the Chart
status Status of objects to display all
agent Name of the agent for a parallel Chart
mserver Modeling Server server where opscmd is launched
port Port of the server modeling 10500

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; ; ; ;

Returning the scheduling for objects of an


instance: opscmd objplan
Option Description Default (non-mandatory option)
Inst Name of the instance
Date A day (YYYYMMDD) todays date
or a range (YYYYMMDD-YYYYMMDD)
App Name of an application
Job Name of a job
Only Do not list sub-objects? yes
File Output file
Mserver Modeling Server server where opscmd is launched
Port Port for the Modeling Server 10500
Only the option instance is mandatory. In this case, the scheduling of all the objects (jobs and applications) for
the instance will be listed for the current day.
The option date is used to specify a date or a period.
The option app can be used to filter a graphical level.
The option job displays the scheduling of a job in particular.
The option only specifies if the scheduling of objects for the instance should not be displayed.

Axway Automator Advanced Users Guide 32


Using OPSCMD

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 -

Manually purging on the modeling server:


opscmd inst_purge
Note: This option does not perform checks on the pertinence of a request. The API is only used to fix the
replacement of versions that were not purged on the Modeling Server automatically.

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).

Presence of the modeling server: opscmd


transexec
Used in the UNIX script /scripts/opsprobeprd.sh (to verify that the product is still correctly functioning),
the following command, verifies the presence of the Modeling Server.

Axway Automator Advanced Users Guide 33


Using OPSCMD

opscmd transexec -trans get_srv [server name_of_the_server [port


number_port_IP]]
[]: optional parameters
If the transaction terminates (meaning that the server is present), the script returns 0.

Describing a complete Chart: Opscmd


graphview
This API is used to give the content for a Chart in text form. It can be used in the case of the creation of
operational documentation.
Use this function to describe a Chart completely, including the objects, description, links with resources, and
dependencies.
Option Description Default (non-mandatory option)
graph Chart name
isarch Determines if Chart is an Archive. defaults to no
mserver Modeling server Server where opscmd is launched
Port Port for the Modeling server 10500

Getting a description of all jobs: Opscmd


objview
This API is used to give a description of all jobs for a Chart, application or X-Chart, in text in CSV format.
Option Description Default (non-mandatory option)
graph Chart name
isarch Determines if Chart is an Archive. defaults to no
mserver Modeling server Server where opscmd is launched
port Port for the Modeling server 10500

Listing objects by type: opscmd listeall


Use this API to list all objects by type (Production server, user, calendar, scheduling rule, macro, variable date,
global resource, production group, Charts).
Option Description Default (non-mandatory option)
Type Type of objects to list
Values: SP, USER, CAL, SCH, MAC,
DATE, RES, GXP, CHART
Id Return ID for the object defaults to no
mserver Modeling server Server where opscmd is launched
Port Port for the Modeling server 10500

Axway Automator Advanced Users Guide 34


Using OPSCMD

Displaying script jobs: opscmd listjob


Use this API to display a list of all script jobs, for a given Chart or archive.
Option Description Default (non-mandatory option)
Chart Name of the Chart or archive to search. (
*all for all Charts )
isarch Whether the name given is a Chart (0) or 0
an archive name (1)
mserver Modeling server Modeling server hosting the Chart
Port Port for the Modeling server 10500
Example:
<AutomatorInstallDir>\bin\opscmd listjob -Chart Test
List Job - TRANSACTION GOOD END
Chart ; Application ; App_desc ; Job ; Job_desc ; Path ; Script ; Cmd ;
Param0 #: Param1 #: ...
-----------------------------------------------------------------------
--
Test;APP_0;;JOB_0;;<$VA0000000030:Scripts>;TestFile.bat;;<$VA0000000040
:toto.text>
Test;;;JOB_0;;<$VA0000000030:Scripts>;CopyFiles.bat;;<$VA0000000040:tot
o.text>
Test;APP_0_C0;;JOB_0;;<$VA0000000030:Scripts>;Testfile.bat;;<$VA0000000
040:toto.text>

Displaying global resources: Opscmd listres


This function displays the list of global resources managed by the modeling server were connecting on. Neither
production server global resources nor FIFO are displayed.
The command displays the name, the internal ID and the current value of the resource.
Option Description Default (non-mandatory option)
mserver Modeling server Modeling server hosting the Chart
Port Port for the Modeling server 10500
Example:
<AutomatorInstallDir>\bin\opscmd listres
0(localhost)(10500)
List Res - TRANSACTION GOOD END
Resource |ID |Value(max)
-----------------------------------------------------------------------
--
Date1 |RG0000000006|11022008
Date2 |RG0000000007|11022008
GAOX_T_maj_afer_afn3 |RG0000000014|0
GAPX_DC_BTOSGT |RG0000000012|0
GAPX_DC_FIN-GRAPHE |RG0000000017|0
GAPX_DC_PMTREAO |RG0000000010|0
GAPX_TOP_DCC_SAVE_MENS |RG0000000015|0
PARAM1 |RG0000000004|100
PARAM2 |RG0000000001|200
P_1 |RG0000000003|0(4)
Scripts |RG0000000005|C:\Scripts

Axway Automator Advanced Users Guide 35


Using OPSCMD

Modifying a parameter: opscmd alias


This command modifies the value of a parameter on a production server.
Option Description Default (non-mandatory option)
Chart [Mandatory] Name of the Chart
Param [Mandatory] Name of the parameter
Oldvalue [Mandatory]Previous value of the parameter
Newvalue [Mandatory]Value to set
mserver Modeling server Modeling server hosting the Chart
Port Port for the Modeling server 10500
Note:
The current user MUST have access to both production servers.
This command only works with production servers parameters; you cannot use it to update another type
of parameter.
Example:
<AutomatorInstallDir>\bin\opscmd alias -Chart Test -param SP -oldvalue
PC1 -newvalue PC2
Parameter SP of Chart Test changed from PC1 to PC2

Displaying a list of objects by type: opscmd


apidoc
Display the list of objects for a given type by matching the name given as a parameter.
Option Description Default (non-mandatory option)
Name [Mandatory] object name (* for all )
Type [Mandatory] object type
Path [Mandatory] Output path
File [Mandatory] Output file name
Out Output file type
mserver Modeling server Modeling server
Port Port for the Modeling server 10500
Note: If you do not give the path and file name, the command displays no errors, and does not write anything.
Example:
<AutomatorInstallDir>\bin\opscmd apidoc -name * -type SP -path <Path> -
file <File> -out csv
Contents of an output file
Production server:
Name;Port;Description;Type;Active;Max jobs;Standalone server;Dir
joblogs;Purge; Intercept jobs;JDE server;JDE env;JDE log level;SAP server;SAP
User;Proxy;Batch input;Audit level;Message server;Application server
grp;Application server;SysNum;
SAP route;Language;ABAP debug;Control connect;Debug;Psoft server;Application
server;Port;Domain server;Quests;Contexts
ITEM-
54381;32010;;1;1;250;;;8;0;0;;0;0;;0;;0;;PUBLIC;;0;;E;0;0;0;1;wpsoft03.ancy.fr
.sopra;9210;ITEM-54381;
re1x;9999;;20;1;30;ITEM-
54381;;8;0;0;;0;0;;0;;;;PUBLIC;;0;;E;0;0;0;0;;0;;Contexte_Restreint/;
rs12;10510;;20;1;30;ITEM-54381;;8;0;0;;0;0;;0;;;;PUBLIC;;0;;E;0;0;0;0;;;;
AXP2;10510;;11;1;30;ITEM-54381;;8;0;0;;0;0;;0;;;;PUBLIC;;0;;E;0;0;0;0;;0;;
VMS_Bogus;9999;;11;1;30;ITEM-54381-
2;;8;0;0;;0;0;;0;;;;PUBLIC;;0;;E;0;0;0;0;;0;;

Axway Automator Advanced Users Guide 36


Using OPSCMD

Modifying an object property for a coming plan:


opscmd objprop
By clicking on a coming instance in the GUI, you can modify some properties of its objects (start date, mode,
etc). It can be also done with this command.
Option Description Default (non-mandatory option)
Inst [Mandatory] Name of the instance
Date Plan date Today
Obj [Mandatory] object name
Dem Start mode ( 0 = manual, 1 = auto )
earlier Dont start before this time
Later Dont start after this time
mode '0:', '2:exec', '3:simu'
Log '0:never', '1:always', '2:error only'
srcpath Job only: source script path
srcfile Job only: source script file
Destpath Job only: dest script path
destfile Job only: dest script name
Param0, Additional script parameters
param1, etc
mserver Modeling server Modeling server
Port Port for the Modeling server 10500
The command displays Action registered if it succeeded.
Note: If you specify a date for which the instance is not scheduled, no error is returned. The modifications
made on the object will appear in engine/pprev, but will not have any effect.

Modifying a local resource for a coming plan:


opscmd resforcast
By clicking on a coming instance in the GUI, you can modify the values of its local resources. The command
resforcast allows you to do exactly the same through command line.
Option Description Default (non-mandatory option)
inst [Mandatory] Name of the instance
Number Duplication index
date Plan date Today
res [Mandatory] resource name
Val value to set
Act Action ( keep / reinit )
mserver Modeling server Modeling server
Port Port for the Modeling server 10500
You can either set the action or a new value, but you cant use both. The command does not returns anything if
the function succeeded.
Note: If you specify a date for which there is no plan, no error is returned. The modification of the value is
stored (appears in engine/pprev), but it will be ignored.Use the sp style.

Axway Automator Advanced Users Guide 37


4 Operating Principles for OPSCMD
on AS/400

This chapter describes the specific use of OPSCMD on AS/400.

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 ' ' +

Axway Automator Advanced Users Guide 38


Operating Principles for OPSCMD
on AS/400

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.

Advanced Users Guide Advanced Users Guide 39


5 Using Web services
This chapter describes how to use the operations in the Web Services.

Operations Service Description


All parameter values must be lowercase, except for resource, instance or object names.

RESVAL Operation : Modifying a resource


Modify the value of an Automator resource (Global, Local and Global SP).
Options Description Default value
res Name of the resource
user [Mandatory] User Login
pwd [Mandatory] User Password
value New value of the resource
inst Name of the instance, if the resource is local
number Instance number
date Date for the instance (if the resource is local) Today
push Add a line in the resource
pop one: clear a line in the FIFO resource
all: empty the FIFO resource
move Move the value of a resource in the FIFO (-x/+x/top/bottom)
delete Delete a specific value from a resource FIFO(first/all)
inc Value to which the Weight resource is incremented
pserver Production Server (agent) if the resource is local
mserver Modeling Server if the resource is global
port Server Port MS : 10500
PS : 10510
repeat To add the same value to a FIFO multiple times
modeling Specify 0 or 1, 1 for modify the value for a local resource for the
modeling server (only for WEIGHT and FIFO)
globsp Specify 1 only for a global resource for the production server. 0
retry Number of retries if server is occupied 30
retryd Time between retries 1 second
context Specify the context. Separate using '/'
Example: context1/context2/context3 (global resources only)
Note: The options mserver and pserver cannot be used at the same time.
Idem for push, pop, move and value options.

ArchVarLst Operation : Retrieving parameters


Retrieves the list of all parameters of an archive in XML format.
Option Description Default value
arch [Mandatory] Name of the archive
server Modeling server localhost
port Port for the Modeling server 10500
user [Mandatory] User Login
pwd [Mandatory] User Password

Axway Automator Advanced Users Guide 40


Using Web services

CRINST Operation : Creating or replacing an instance


Option Description
inst Name of the instance to create
graph Name of the chart
arch Name of the archive
desc Description. Blank by default
pectype Type of implementation. Possible values: now, plannext or deferred. The value now is
taken by default
puttopause Specify yes to create the instance in pause. The value no is taken by default
date Date of implementation
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
prodgroup Dont use : no more implemented
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
main Force main Production server
mserver Name of the Modeling Server to contact. By default, the local machine
port TCP Server Port
stat Set to yes to collect statistics (defaults to no)
context Sets the user context
Example: context1/context2/context3
user [Mandatory] User Login
pwd [Mandatory] User Password
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
par Name and value of the parameter to modify. The parameters specified must exist
Syntaxe : nom_param:valeur_param.

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.

OBJECT Operation : Modifying the status of an object


Option Description Default value
obj Name of the object
action Action on the object:
restart
hold
release
request
cancel' : kill
f_tobedone : future
f_running : started
f_finished : terminated
f_failed : in error
f_desched : descheduled
f_notsched : not scheduled
f_tobedoneheld: future kept
f_etqcur' : pass label

Axway Automator Advanced Users Guide 41


Using Web services

Option Description Default value


revert_act
suspend
continue
inst Name of the instance
number Number of instance (duplicator jobs as400) 1
date date for the instance todays date
pserver Production Server localhost
mserver Modeling Server
port Server Port SM : 10500
SP : 10510
etqsrt Start Label (for the actions f_tobedone and f_running)

etqend End Label (for the actions f_tobedone and f_running)


etqcur Current Label (only for the action f_etqcur)
user [Mandatory] User Login
pwd [Mandatory] User Password
Note: Depending on the type of the object or on the status of the object at the time you launch the command,
the actions are not all usable (ex: it is impossible to request (action request) the clock object: only
jobs and applications can be requested).

INSTANCE Operation: Modifying the state of an instance


Option Description Default value
inst Name of the instance
number Number of instance (duplicator jobs as400) 1
action Action on the object:
stop, pause, play, reset, stopsched, desched, revert, fpause
date Date for the instance todays date
pserver Production Server localhost
mserver Modeling Server
port Server Port SM : 10500
SP : 10510
user [Mandatory] User Login
pwd [Mandatory] User Password
Note: Depending on the state for the instance at the moment where you launch the command, the actions
are not all usable (ex: it is not possible to force an instance to the state: stopped, to the state in
progress (action play). You must first replay it (action reset).

DSPSTS Operation : Displaying object states for a schedule


Option Description Default value
inst Name of the instance
date Date todays date
dspid Displays the identifier for the object: yes or no
no
dsptype Displays the type for the object: yes or no no
dspdate Displays the date for the instance: yes or no
no
dspflags Displays the flag for the object: yes or no no
mserver Modeling Server
pserver Production Server
port Server Port SM : 10500
SP : 10510
status Filter on the status of objects:
* IN_PROGRESS:in progress
* END_ERROR:terminated in error
* DESCHED:descheduled
* NOTSCHED:not scheduled
* END_OK:terminated
* COMING:future
name Filter on the name of objects

Axway Automator Advanced Users Guide 42


Using Web services

Option Description Default value


level Level Chart: all
* all all objects
1 first-level graphical
2 second-level graphical
3 all objects of all levels
type Filter on object types:
APP ; JOB ; OR ; AND ; NOTIF_WAIT ;
COMMAND ; FOCAL ; ALERT ;
AFFECTATION ; TEST_RES ;
NOTIF_AUTO ; NOTIF_MONITOR ;
WAIT ; RES_INIT ; STOP ; ABORT ;
RESOURCE ; EXPRESSION ; XCHART ;
XCHARTEXEC ; INSTEXEC
user [Mandatory] User Login
pwd [Mandatory] User Password

Axway Automator Advanced Users Guide 43


6 Using OPSADM
This chapter lists the OPSADM commands and describes how to use them.

Presence and functioning of threads: opsadm


chkthr
Used in the script /scripts/opsprobeprd.sh (to verify that the product is still functioning correctly), the
following command, verifies the presence and the functioning of threads.
opsadm chkthr -chkudp no [pserver name_of the_server [port number_port_IP]]
[]: optional parameters
The option chkudp can exclude the UDP threads (in mono machine, they do not necessarily work).
Example result of the command:
LIST {
"udp send" "sleep since(0/00:00:09) on error after(0/00:00:20)"
"udp recv" "sleep since(0/00:01:43) on error after(0/00:00:20)"
"timer" "sleep since(0/00:00:10) on error after(0/00:10:00)"
"job" "sleep since(0/00:00:01) on error after(0/00:05:00)"
"file" "sleep since(0/00:00:04) on error after(0/00:05:00)"
"engine" "sleep since(0/00:00:02) on error after(0/00:04:10)"
}
The thread file has not worked for 4 seconds. If it does not work for 5 min, the transaction will send 0.
The timeouts for the return on error can be modified:
#define TMT_THR_ENGINE 1500 /* 15 min */
#define TMT_THR_FILE 300 /* 5 min */
#define TMT_THR_JOB 300 /* 5 min */
#define TMT_THR_TIMER 600 /* 10 min */
#define TMT_THR_UPD_REV 30000 /* 8 hours */
#define TMT_THR_UPD_SND 30000 /* 8 hours */

Verifying production server data: opsadm


enginechk
This function verifies the consistency and correct functioning of the Production Server.
It displays missing or corrupted files for every plan of every instance.
There are no parameters for this function. Run this command from the bin directory of your installation folder.

Axway Automator Advanced Users Guide 44


Using OPSADM

Modifying the log level: opsadm setlog


Use this API to dynamically modify the logging level of a Modeling or Production server, without having to
shutdown or to modify the parameter settings in the file OPSchedule.ini.
Changing the log level with this function does NOT update the configuration file. After the server is rebooted,
the value stored in the configuration file is used.
Option Description Default (non-mandatory option)
Level Desired logging level. Possible values are in the
range 1 to 4.
Mserver Modeling server Server where opscmd is launched
pserver Production server Server where opscmd is launched
Port Port for the Modeling server 10500

Creating an immediate backup: opsadm backup


Use this API for an immediate backup of a Modeling or Production server. This hot backup does not need to
shutdown the server to backup the server files.
Option Description Default (non-mandatory option)
cmd Backup command to launch, or script
timeout Timeout for the command if blocked.
mserver Modeling server Server where opscmd is launched
pserver Production server Server where opscmd is launched
port Port for the Modeling server or the Production 10500 or 10510
server

Setting pause mode: opsadm pausemode


Use this API to set pause mode for instances of Production server reboot for future use or during startup.
This API is the dynamic complement to the existing preference variable: TO_PAUSE_MODE. Use this API to
avoid having to restart the Production server.
Option Description Default (non-mandatory option)
Activate Backup command to launch, or script
pserver Production server Server where opscmd is launched
port Port for the Modeling server or for the 10500 or 10510
Production server

Displaying instance status: opsadm istatus


Use this command to display the status of instances on the production server, matching the parameters.
Default
Option Description
(non-mandatory option)
dir Installation directory (/home/Axway /Automator/)
date Instance running after this day will not appear
status Only display instances with this particular status All

Axway Automator Advanced Users Guide 45


Using OPSADM

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 | |

Checking the database: opsadm dbchk


Use this command to perform a check on the modeling server database.
Note: The modeling server has to be stopped. As a measure of safety, it is better to make a backup of the
data and lists directory beforehand. A modification on a table may invalidate another one.
Default
Option Description
(non-mandatory option)
check What kind of information to check
log Level of log information ( 1 | 2 |3 ) 1
modif Fix errors (yes|no) no
The check parameter can take many values: Any database table name, all, TO_ALL ( all database tables),
formula, lists, lists1, listDB, list2server, list2arch, listslevel, listsarch, listsobj, objenv, freef, lugu.
This command has to be run from the bin subfolder of the modeling server installation directory
Example:
<AutomatorInstallDir>\bin\opsadm.exe dbchk -check TO_USER
Opening DB..... Optimize ON, memStartMax=983040

.....TO_.....
Info: TO_USER has no problem found.

Check the instances: opsadm chkinst


Use this commande to check the validity of the instances for a Modeling server or a Production server.
Transactions on a production server only check duplicated instances.

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):

Axway Automator Advanced Users Guide 46


Using OPSADM

Existence of the instance on the Production servers on which it is defined or running.


Same status of the instance on each of the Production servers.
All Instances must exist on the Modeling server.

Axway Automator Advanced Users Guide 47


7 Useful configuration variables
This chapter describes several environment variables that can be set to fix various issues you may encounter.
Every variable described in this section has to be added to the OPSchedule.ini configuration file.

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.

Changing the modeling server ID


If you have several modeling servers on the network, it is recommended to give them each a different ID.
Simply add this line in the OPSchedule.ini file:
TO_SERVER_NUM_ID
Value: The variable TO_SERVER_NUM_ID can be any printable character.
Note: It has to have one character.
Every ID of every object contains that character; therefore, you must not change it once the modeling
server has been started for the first time, or you will lose all the objects and break production.

Changing the log file size and level


The files impacted by the modifications described in this section are opsmserver.lg* and opspserver.lg*
(not the sp_*.log files).
By default, Automator adds errors only in the lg log files, plus some miscellaneous information: it is logging
level 1.
To have more information about the servers actions, you can change the logging level using
TO_SERVER_LOGLEVEL and TO_AGENT_LOGLEVEL for both the modeling and production servers. Level 2
provides detailed information as the programs enter and exit functions.
Note: This slows down the application! We do not recommend running production with level 2 logs set.
It is used for diagnostic purposes only.
A higher log level exists, but it is strongly advised NOT to use it because it saves even more information and
may hang the system.
When using a log level higher than one, the log files tends to fill up very quickly. You can modify the log file size
using the variable MAX_LOGSIZE. The value given is in bytes: 10000000 equals 10Mo.
Note: The size equals one log file, not two combined.

Axway Automator Advanced Users Guide 48


Useful configuration variables

Submission issues on HPUX / Solaris


A glitch that causes interference with job submissions exists on Solaris and HP-UX systems in the tracker
window. It causes some jobs to never finish and some processes to hang on the production server, which then
uses all the available CPU.
To prevent this issue, you can use the variable TO_ALL_USERS_PATH. This variable must contain the full path
of a directory, which was created before with all rights given to all users (777 permissions).
The forking process used when submitting a job can still fail. The production server retries until it reaches the
maximum number of retries. This number can be set using the TO_ALL_USERS_PATH_RETRY variables. The
default value is 30.

Formatting names in a domain


If you run the production in a Windows, Novell, or other domain, you may have issues using the command line
functions opscmd and opsadm. These commands use the name of the current session user when connecting to
the modeling or production servers. You can specify how the name should be formatted using
TO_API_CHECK_DOMAIN.
Value Format
0 user
1 \\domain\user
2 domain\user

Disabling system rights verification when editing


a script
The GUI allows you to modify a script without logging on to the machine hosting it. In version 2.21 and earlier,
no right verification was made. You could modify a script if the production server could access it, even if the
user you used to log into the GUI did not exist on the target machine, which is a potential security risk.
From version 3.00 on, if the connection user does not exist on the target environment and/or does not have the
right to modify the file, Automator returns a message saying that the current user does not have the rights to
edit the script.
To be able to edit a distant script, you need to either:
Create a user matching the connection user with the necessary rights on the target system
Add TO_UNUSE_SYSTEM_RIGHTS=1 to your configuration file, which disables the rights verification

Problem if jobs ended while production server is


offline: access rights
A temporary folder is used to store job outputs when the production server is down. The default path is
<windows_dir>\opspserver_exit under Windows, /opspserver_exit under UNIX and Linux.
For security reasons, the process may not have write access to this default directory. To change it, use the
TO_EXIT_DIR variable.
Note: Do not use a temporary folder that could be emptied before the production server is restarted, or the
jobs are set to lost when the server restarts.

Axway Automator Advanced Users Guide 49


Useful configuration variables

Using path variables and VMS opsod


If you are running an OPSOD on a VMS machine, you will experience a bug when specifying a path variable if
the path contains the character $ because it is a tag used by Automator for variables.
To solve the issue, add TO_VMS_SPEC_PATH=1 to your configuration file.

Changing the number of execution threads


Automator allows you to modify the number of processing threads through the TO_SERVER_NB_EXECUTER
and TO_AGENT_NB_EXECUTER variables. By default, the value is 5, on both the modeling and production
servers.
If the machine running the server has multiple cores and/or processors (6+), it may be interesting to raise that
value. Typically, when you see that some of the cores have a high load while others are idling.
Warning: Having a lot more execution threads than core/processors will not speed up the process, it's the
contrary. The mechanism needed to switch from one thread to another on a single chip may slow
down the application.

Updating X-Chart parameters at PEC


It is possible to update the X-Chart parameters by:
Setting the TO_USE_PEC_XCHART_PARAM to 1
Deleting the files in engine\pec\xcpec\*.* on all production servers
(Re)Creating an instance and updating the parameters

Restarting a production server in pause mode


If for some reason a production server has crashed, it may be interesting to restart it in PAUSE mode, which
pauses all running instances, to check their state in case an error occurred in a chart.
This mode can be enabled using the TO_PAUSE_MODE variable.
Note: This option does not apply to the modeling server.

Enabling the display of an X-Chart when


connecting to a production server
By default, the GUI cannot display the content of an X-chart when connecting directly to a production server.
To enable this feature, set TO_GUI_AGT_SHOW_XE to 1 in the configuration file.

Axway Automator Advanced Users Guide 50


Useful configuration variables

Network protocol (IPv4 / IPv6)


Restricted communications in IPv4 can be forced by a preference variable:
Add TO_COM_MODE_IPV6=0 to the MS or PS in the configuration file.
Restricted communications in IPv6 can be forced by a preference variable:
Add TO_COM_MODE_IPV6=1 to the MS or PS in the configuration file.
Else if dual mode is selected, set TO_COM_MODE_IPV6=2.

Axway Automator Advanced Users Guide 51


8 Regular expressions
This chapter describes the regular expressions that you can use and their syntax.

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.

Axway Automator Advanced Users Guide 52


Regular expressions

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

^Axway Axway Software Sopra Group & Away Software


Axway products
ay$ Axway Sopra
^Axway$ Axway All other strings
fo.t American football Foot
fo8t
serfo*tar
^fo\\\*t$ fo\*t All other strings
^OPSV2\.[0-2]\.[0-9] OPSV2.2.0 OPSV1.0.0
OPSV2.1.1gM6 OPSV2.0
[a-z][1-8]-[a-z][1-8] Te5-f7 Te5-f9
^[^0-9]*$ All strings without numbers OPSV2
^Agency at (Lyon|Paris|Lille)\.$ Agency at Paris Any other string
Agency at Lyon
Agency at Lille
^(Paris[12]?[0-9]|Lyon[1-9])\.$ Paris7. Paris32.
Paris12. Lyon0.
Lyon6. Paris.

Axway Automator Advanced Users Guide 53


9 Expressions from V1
This chapter describes the syntax of the expressions.

Binary: expr_test

Use it to test expressions. Launch using expr_test. Quit using q or quit.

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.

Axway Automator Advanced Users Guide 54


Expressions from V1

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.

Semi-colon operator: vectors


All data can be considered as vectors. A vector is a set of elements separated by semi-colons.
A number is a vector of a single element.
The operations are distributed on the vectors.
Example:
(12;2)+(15;20) gives 27;17;32;22

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

Axway Automator Advanced Users Guide 55


Expressions from V1

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.

Axway Automator Advanced Users Guide 56


Expressions from V1

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.

Axway Automator Advanced Users Guide 57


10 Rebuilding the Production Server
This chapter describes how to rebuild the Production Server.

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).

Axway Automator Advanced Users Guide 58


Rebuilding the Production Server

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).

Axway Automator Advanced Users Guide 59


Rebuilding the Production Server

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.

Axway Automator Advanced Users Guide 60


11 Frontal commands
This chapter describes how to use Frontal commands.

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.

Axway Automator Advanced Users Guide 61


Frontal commands

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).

Modification of the preference file


In order to be able to set a resource correctly (cf. OPSOVAR), you need both the names of the modeling and
Production Servers, and their contact ports.
The preferences used are the following:
AUTFRONT_OPSAGT_NAME: name of the Production Server
AUTFRONT_OPSAGT_PORT: port of the Production Server
AUTFRONT_OPSSRV_NAME: name of the Modeling Server
AUTFRONT_OPSSRV_PORT: port of the Modeling Server
If the two preferences are not present in the file OpsFrontal.ini, the name of the local machine and the port by
default will be used to assign a value to the resource.
Currently, the Frontal recovers the preference parameters from the file packcenter.ini. The preferences in the
directory Frontal_Install_Directory\config file will be named OpsFrontal.ini.

Modification of the Frontal service


The installation procedure for the Frontal will be modified as follows:
Launch of the Frontal by the services: before launching the service Packcenter Sysauto: Frontal, now,
you launch Axway Automator Frontal
Modification of the installation screen for the Frontal so it is the same as Automators

Axway Automator Advanced Users Guide 62


Frontal commands

Renaming conf directory


Currently, the Frontal possesses a directory Frontal_Install_Directory\conf. This directory will be renamed as
follows Frontal_Install_Directory\config in order to harmonize the structure with that of OPSV2.
Note: The API opscmd must be delivered during the installation of a Frontal so that it can send information to
Automator even if none is installed on the Frontal machine.

Axway Automator Advanced Users Guide 63


12 Miscellaneous
This chapter provides information about Automator terminology.

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.

Resource A resource is a global or local operating variable. It is used to store parameter


values and can be involved in event-based scheduling: an application or job
can be triggered according to the resource value.
Script A script is a program written in the command language specific to the target
OS.
A user may be:
User An identifier, via which a person has interactive access to Axway
Automator
A batch user intended to execute a job
View
A view is a logical group of Charts.

Axway Automator Advanced Users Guide 64


Miscellaneous

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

Axway Automator Advanced Users Guide 65


Miscellaneous

4: Child / Parent Link Evaluation


Parent Ready Executing Terminated Failed Descheduled Not Scheduled
Link DschSucc DNDSucc WDschSucc DschSucc DNDSucc WDschSucc DschSucc DNDSucc WDschSucc

Mandatory Wait Wait Pass Deschedule Wait De- Deschedule Resulting


schedule
Optional Continue

Failed Deschedule Continue Wait Deschedule Deschedule Deschedule

Exclusive Deschedule Deschedule Continue

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.

Axway Automator Advanced Users Guide 66


Parameters

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

Advanced Users Guide


Script Path
Script +

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

You might also like