PML Publisher User Guide 1.1
PML Publisher User Guide 1.1
PML Publisher User Guide 1.1
User Guide
AVEVA Solutions Limited
PML Disclaimer
1.1 AVEVA does not warrant that the use of the AVEVA software will be uninterrupted, error-free or free from
viruses.
1.2 AVEVA shall not be liable for: loss of profits; loss of business; depletion of goodwill and/or similar losses; loss of
anticipated savings; loss of goods; loss of contract; loss of use; loss or corruption of data or information; any
special, indirect, consequential or pure economic loss, costs, damages, charges or expenses which may be
suffered by the user, including any loss suffered by the user resulting from the inaccuracy or invalidity of any data
created by the AVEVA software, irrespective of whether such losses are suffered directly or indirectly, or arise in
contract, tort (including negligence) or otherwise.
1.3 AVEVA shall have no liability in contract, tort (including negligence), or otherwise, arising in connection with the
performance of the AVEVA software where the faulty performance of the AVEVA software results from a user's
modification of the AVEVA software. User's rights to modify the AVEVA software are strictly limited to those set out
in the Customisation Manual.
1.4 AVEVA shall not be liable for any breach or infringement of a third party's intellectual property rights where such
breach results from a user's modification of the AVEVA software or associated documentation.
1.5 AVEVA's total liability in contract, tort (including negligence), or otherwise, arising in connection with the
performance of the AVEVA software shall be limited to 100% of the licence fees paid in the year in which the user's
claim is brought.
1.6 Clauses 1.1 to 1.5 shall apply to the fullest extent permissible at law.
1.7. In the event of any conflict between the above clauses and the analogous clauses in the software licence
under which the AVEVA software was purchased, the clauses in the software licence shall take precedence.
PML Copyright
Copyright and all other intellectual property rights in this manual and the associated software, and every part of it
(including source code, object code, any data contained in it, the manual and any other documentation supplied
with it) belongs to, or is validly licensed by, AVEVA Solutions Limited or its subsidiaries.
All rights are reserved to AVEVA Solutions Limited and its subsidiaries. The information contained in this document
is commercially sensitive, and shall not be copied, reproduced, stored in a retrieval system, or transmitted without
the prior written permission of AVEVA Solutions Limited. Where such permission is granted, it expressly requires
that this copyright notice, and the above disclaimer, is prominently displayed at the beginning of every copy that is
made.
The manual and associated documentation may not be adapted, reproduced, or copied, in any material or
electronic form, without the prior written permission of AVEVA Solutions Limited. Subject to the user's rights, as set
out in the customisation manuals to amend PML software files contained in the PDMSUI and PMLLIB folders and
any configuration files, the user may not reverse engineer, decompile, copy, or adapt the software. Neither the
whole, nor part of the software described in this publication may be incorporated into any third-party software,
product, machine, or system without the prior written permission of AVEVA Solutions Limited, save as permitted by
law. Any such unauthorised action is strictly prohibited, and may give rise to civil liabilities and criminal prosecution.
The AVEVA software described in this guide is to be installed and operated strictly in accordance with the terms
and conditions of the respective software licences, and in accordance with the relevant User Documentation.
Unauthorised or unlicensed use of the software is strictly prohibited.
Copyright 1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved. AVEVA shall not
be liable for any breach or infringement of a third party's intellectual property rights where such breach results from
a user's modification of the AVEVA software or associated documentation.
AVEVA Solutions Limited, High Cross, Madingley Road, Cambridge, CB3 0HB, United Kingdom.
PML Trademark
AVEVA and Tribon are registered trademarks of AVEVA Solutions Limited or its subsidiaries. Unauthorised use of
the AVEVA or Tribon trademarks is strictly forbidden.
AVEVA product/software names are trademarks or registered trademarks of AVEVA Solutions Limited or its
subsidiaries, registered in the UK, Europe and other countries (worldwide).
The copyright, trademark rights, or other intellectual property rights in any other product or software, its name or
logo belongs to its respective owner.
PML Publisher User Guide
Revision Sheet
Contents Page
PML Publisher
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1
Serious Warnings About Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1
i 12 Series
PML Publisher User Guide
ii 12 Series
PML Publisher User Guide
Introduction
1 Introduction
PML is the AVEVA Programmable Macro Language. You can find details of the language in
the Software Customisation Guide and the Software Customisation Reference Manual.
PML functions, objects forms and macros may be encrypted using the tools described in this
guide, and once encrypted may be used within the software, but may not easily be read.
Encrypted PML files may be used in any compatible AVEVA program without an additional
license (see Using Encrypted Files). The encryption utility described in Using the PML
Encryption Utility Program is separately distributed and licensed.
Please note that the encryption used is of limited strength, and is not secure against all
possible attacks - for details of the encryptions used, see Encryption Algorithms.
If you have existing encrypted files encrypted with the old encryption type 3 (as used in
"Early Adopter" releases of 11.5.SP2 and 11.6.SP4 in 2007), you must re-encrypt the
original source to the new encryption type 4 if you wish to use them with 12-series releases,
11.6 Series SP4.9 and above or 11.5 series SP2.11 and above.
1:1 12 Series
PML Publisher User Guide
Introduction
1:2 12 Series
PML Publisher User Guide
Using the PML Encryption Utility Program
2.2 Licensing
The pmlencrypt.exe utility program requires a PML Publisher license in your license file
(the feature name is VPD-PMLPUBLISHER). If this is not present then the program will not
run.
2.3 Help
If pmlencrypt.exe is run without arguments, or with an invalid set of arguments, then a
summary similar to this is output. The options are explained further in the following sections.
AVEVA PML Publisher Mk1.1 (Jun 00 2011)
Copyright 2006 to current year. AVEVA Solutions Limited
and its subsidiaries. All rights reserved.
Product is licensed to <your company>
FLEXLM Client: Win32 5.2.0 (FLEXNet 11.8.0.0). Server: 5.0
FLEXnet 11.8.0.0) on <server>
2:1 12 Series
PML Publisher User Guide
Using the PML Encryption Utility Program
-rc4 uses 40-bit RC4 encryption from the Microsoft Base Cryptographic
Provider (default)
-buffer N causes the file to be retained in memory until a module switch once
it has been read N times (the default is never)
2:2 12 Series
PML Publisher User Guide
Using the PML Encryption Utility Program
2:3 12 Series
PML Publisher User Guide
Using the PML Encryption Utility Program
Encrypted files use only ASCII characters, and therefore do not require a byte-order-mark.
2:4 12 Series
PML Publisher User Guide
Using the PML Encryption Utility Program
2:5 12 Series
PML Publisher User Guide
Using the PML Encryption Utility Program
will be kept in memory after it has been read five times during a session.
2.6 Buffering
Decrypting a PML file takes longer than reading a plain-text version, and in some
circumstances PML files may be re-read many times during a session. (A new command
PML STATISTICS displays information on the numbers of times each file has been read and
some extra information useful to AVEVA when testing the Published PML facilities).
In order to reduce the time taken to re-read the files, Published PML files may contain a
buffering directive in the header-line (the first line in the file). If a dash and a number are
included directly after the three-digit encryption algorithm ID, then the software will retain the
file in memory indefinitely once it has been read that many times.
You may wish to edit heavily used files to add buffering to the header by hand, or may use
the -buffer 5 option of pmlencrypt.exe to include a "buffer after five reads" tag in
each file encrypted.
A value of five is a good number to start with. Many files are read precisely once during
module start up - there is little benefit in buffering those files, and a value of five will avoid
that, but apply to all heavily used files.
If a file you are actively developing has a header including buffering, it will not be re-read as
often as you are used to. To force all buffered files to be cleared from memory if they are not
in current use, you can issue the PML REHASH or PML INDEX commands, or switch
modules.
2:6 12 Series
PML Publisher User Guide
Using the PML Encryption Utility Program
2.7 Examples
2:7 12 Series
PML Publisher User Guide
Using the PML Encryption Utility Program
2:8 12 Series
PML Publisher User Guide
Using Encrypted Files
Provided that you have a compatible version of the software then encrypted files can be
read transparently in all modules that include PML.
11.5.SP2 and 11.6.SP4 versions released before January 2008 support an "Early Adopter"
encryption type 3, which is no longer supported from the first full release of PML Publisher
1.0. AVEVA released updated versions 11.5.SP2.11 and 11.6.SP4.9 supporting the
replacement encryption type 4, which is also supported in AVEVA 12-series and later 11.5-
series and 11.6-series releases.
If you have existing encrypted files encrypted with encryption type 3, you must re-encrypt
the original source to encryption type 4 if you wish to use them with versions 12.0,
11.6.SP4.9, 11.5.SP2.11 and later releases.
If you attempt to display or record encrypted PML using the $R commands, you will find that
all lines are replaced by the text <hidden>. Error messages and trace-backs will include
function names, but not the text of each line.
The only circumstance in which hidden lines can become visible is under certain
circumstances during a macro which includes a module-switch. After a module switch, any
remaining lines in that macro may or may not be traceable. This may change in a future
release.
(46,103) PML: Encrypted You are trying to read an encrypted file that has
file is corrupt or of unknown become corrupted (e.g. the encrypted text has been
format edited)
(46,104) PML: Encrypted You are trying to read an encrypted file created with
file is in an obsolete and an algorithm that is no longer supported.
unsupported format
Unable to decrypt file in this You are trying to read an encrypted file in an
software version incompatible software version
(e.g. the algorithms were created in a later software
version)
or:
You are trying to read an RC4-encrypted file on a
PC that doesn't have the Microsoft Base
Cryptographic Provider installed (this is not
expected to occur)
3:1 12 Series
PML Publisher User Guide
Using Encrypted Files
3:2 12 Series
PML Publisher User Guide
Index
B L
Buffering . . . . . . . . . . . . . . . . . . . . . . . . . 2:6 Licensing . . . . . . . . . . . . . . . . . . . . . . . . 2:1
E P
Editing Published PML Files . . . . . . . . . . 2:6 Possible Workflow . . . . . . . . . . . . . . . . . 2:1
Encryption
Algorithms . . . . . . . . . . . . . . . . . . . . 2:4 U
Basic . . . . . . . . . . . . . . . . . . . . . . . . . 2:5
No Encryption . . . . . . . . . . . . . . . . . . 2:5 Unicode and Encodings . . . . . . . . . . . . . 2:3
Obsolete . . . . . . . . . . . . . . . . . . . . . . 2:4
RC4 Encryption . . . . . . . . . . . . . . . . 2:4
Serious Warnings . . . . . . . . . . . . . . . 1:1
Trivial . . . . . . . . . . . . . . . . . . . . . . . . 2:5
Utility Program . . . . . . . . . . . . . . . . . 2:1
Error Messages . . . . . . . . . . . . . . . . . . . 3:1
Examples . . . . . . . . . . . . . . . . . . . . . . . . 2:7
F
Files
Choosing . . . . . . . . . . . . . . . . . . . . . 2:2
Encrypted . . . . . . . . . . . . . . . . . . . . . 3:1
Folder Paths . . . . . . . . . . . . . . . . . . . 2:3
Folder Tree . . . . . . . . . . . . . . . . . . . . 2:3
in a Folder . . . . . . . . . . . . . . . . . . . . 2:3
Names . . . . . . . . . . . . . . . . . . . . . . . 2:2
Single . . . . . . . . . . . . . . . . . . . . . . . . 2:3
H
Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:1