The global patch of a table is a flat backup of this file: similar to a .dat file of a table backup in the SVG directory. Not all the links to this table are taken into account and especially the translatable texts contained in the ATEXTRA table.
Table code
39
TFO
Formula code
62
TRT
Source of a processing (the processing will be compiled on patch installation)
Processing name
12
TXT
Text file (in the TXT directory)
Text name
5
Table abbreviation
Partial contents of the table
Extraction condition (expressed in the form of a Where clause)
100
The TAB code is used to transfer the data in a table, by reloading it in the database with its structure and its data. On the other hand, the dictionary elements corresponding to this table are not created, which means that it may not be visible. Also, this code is useful when re-loading a table already created in the folders to be patched, where the structure has not changed. If this is not the case, it is necessary to place two lines in the patch definition : the first line concerns the table definition (ATB XXXXX), the second line concerns its content (TAB XXXXX). Even if they are not sorted in this entry order, the patch function will replace them in the order above. At the patch integration, the table will be created in the dictionary and in the database, if it does not already exist (if not, its structure will be updated if it has changed). Then the table will be reloaded with the data.
The possibility to transfer the partial contents of a table is obtained by giving the abbreviation in the Type column of the table, and by indicating in the Name column a logic condition that will be used for the extraction of the initial folder and for the integration in the target folder. It is important to note that the data extracted in this way can modify the existing data with the same keys, or to create new data. On the other hand, and for reasons of security, in no case will there be deletion of data during the integration of a patch. In this way, for example, if the following situation is considered, for the country table (abbreviation TCY) :
Initial folder | Target folder | ||
Country code | Country name | Country code | Country name |
AD | Andorra | AD | Andorra |
AE | United Arab Emirates | AF | Afghanistan |
AL | Albania | AL | Germany |
AR | Argentina | AU | Australia |
BE | Belgium | BE | Belgium |
… |
| … |
|
If in the patch the line with TCY is indicated and the condition CRY = "AL", the patch will only contain the line corresponding to Albania, and the integration of the patch in the target folder will rewrite AL, Germany and replace it with AL, Albania.
If indicated in the patch is a line with TCY and the condition pat(CRY,"A*"), the patch will contain 4 lines AD, AE, AF and AR. On integration, the record AE, United Arab Emirates and the record AR, Argentina will be created, the AL, Germany will be replaced by Albania and keep A, Afghanistan and AU, Australia, that existed already in the target folder and were not delivered in the patch.
If in the patch there is a line with TCY and the condition find(CRY,"AD","AE","AL"), the result will be the same, except for AR, Argentina, which would not have been transferred.
The only way to delete data consists in:
One specific case must be mentioned: The EXE code, which makes it possible to give a name to a processing to be run. This processing is run at the end of the patch integration (it may exist beforehand or be delivered in the patch itself, since the execution is only carried out at the end of the integration).
This processing must contain a sub-program PATCH, with a setup that is the folder code. This is the sub-program that will be run. In this way, for the situation above, the following program is obtained :
Subprog PATCH(NOMDOS)
Value Char NOMDOS
Local File =NOMDOS+".TABCOUNTRY" [TCU]
Trbegin [TCU]
Delete [TCU] Where pat(CRY,"A*")=1 & find(CRY,"AD","AE","AL")=0
Commit
End
In this way it can be see that it is necessary to declare the tables in this sub-program while considering the fact that they must be declared in a folder that is not necessarily the current folder ( It is the syntax, Local file = FOLDNAME + ".TABLENAME", that ensures it).
When patches are carried out on model elements of the user interface (model screens used to create transaction windows), the screens concerned need to be revalidated.
This revalidation can be performed by declaring the running of the appropriate processing in the maintenance. The standard processings to be started depending on the type of patched element can be found here below:
Patched element | Processing | Result |
Screen used as the basis for an inquiry which can be set up. | SUBGTC | Validation of all the inquiry screens |
Presentation styles | SUBASY | Generation of the styles |
System transaction | SUBAMI | Validation of the system transactions |
Statistical setups | SUBPS2 | Revalidation of all the statistics |
Basic screen of a transaction on the XXX object | SUBXXX | Revalidation of the transactions associated with the object |
It should be noted that this type of functionality can also be carried out within the framework of a specific development (simply add the PATCH sub-program as specified in the previous paragraph).
The structure of the data in the documentation slightly differs. In effect, the following default rules are applied on folder creation and revalidation:
Thus the principle is as follows when integrating a doc patch (ADO type):
The patch integration checks the application sequencing of the patch files, whenever they include a numerical sequencing in their name. It is recommended to name the patch files using a name defined under the form X_yyyy_zzz.dat, with the following meaning :
If this standard is applied, during the integration of a group of patch files in a directory, the following controls will be made :
When a patch file is created, the rule is for the elements contained in said patch file to form a consistent whole which leaves the folder consistent after it has been applied. In particular, if a new function is created by patch, be it defined by an action, a window, a screen, a table and two processings, it seems logical for all these elements to be part of the patch.
When some elements are used to constitute a patch file, the creation function sorts them in a specific order of types, so as to avoid integration errors. For instance, if a window is integrated before the screens making it up, the error Screen does not exist will occur on validation. As a consequence the data types are always integrated before the screens and tables, the screens before the windows, and so on and so forth.
The order used on generating the patch matches the rank specified in the grid below: It is also the proposal order that appears in the automatic patch.function.
Let us underline the fact that it is impossible to solve all the possible conflicts. For instance, a data type can refer to an action, that may refer to a window, that may refer to a screen, that may refer to this data type. To solve this situation of conflict (although rare), it may be necessary to break down the patch file into two files (for instance, the first file supplying all the elements with a data type that does not refer to the action, the second file supplying the data type that integrates the action).
When installing a patch containing dictionary elements, some fields, considered as dictionary elements that can be set up, are complied with irrespective of their protections by means of activity codes. This is the case of a default destination in a report.
A detailed technical annex lists these fields.
A patch of AAA type corresponds to a line coming from a setup model. It uses a specific format for the element code. This format is one of the two following:
MODELE~CODE_LEG~CODE_TRS~='FORMULE_SELECTION'
MODELE~CODE_LEG~CODE_TRS~CLE~SOUS_CLE~SOUS_SOUS_CLE...
In these lines:
By default, the following reports are associated to the function :
PRTSCR : Screen print
This can be changed by a different setup.
This function can be executed in batch mode, but no dedicated standard task is delivered to execute it.
In addition to the generic error messages, the following messages can appear during the entry :
The access path for the patch file does not exist.
The object type does not correspond either to one of the predefined objects or nor to the abbreviation in an existing table.
An attempt has been made to extract an object from a non-existent dictionary.
The extraction condition associated with the data extraction from a table contains incorrect syntax.