A Fujitsu Technology Solutions DRIVE-COMP (BS2000) Version 3.1A10 readme Informations for programming in object mode Supplements to the manual A Index ----- 1 General ......................................... page 1 2 Declaration of variables ........................ page 2 2.1 Alphanumeric data types ......................... page 2 2.2 Numeric data types .............................. page 2 2.3 REDEFINES ....................................... page 3 2.4 PERMANENT and TEMPORARY ......................... page 3 3 Supplement to the manual ........................ page 4 1 General In section 2 hints are given for the declaration of variables. These hints cause a reduction of the generated object code as well as the required memory for internally used variables. They improve the performance by reduction of the number of calls to the run time system. They facilitate an eventual migration to the operating system SINIX . They can also be used with acceptable effort in existing DRIVE programs. In section 3 manual updates are summarized which refer to the German edition of the manual. Due to technical reasons, they couldn't be brought in into the manual. See also the description of incompatibilities and restrictions in the release notice SYSFGM.DRIVE-COMP-DOC.031.E . - 1 - A 2 Declaration of variables 2.1 Alphanumeric data types For the data types CHARACTER and CHARACTER VARYING the declared lengths should correspond to the actual requirements. 2.2 Numeric data types In interpreter operation the declaration of the data type for a variable has only consequence to the internal way of storage but not to calculations. Arithmetic calculations internally use the data type EXTENDED DECIMAL (see below). In object operation, however, the arithmetic expressions are processed corresponding to the referenced data types. Due to the data types REAL and DOUBLE PRECISION, it is possible to differentiate commercial and scientific calculations. The following summary shows the recommended operations of the specified data types: - SMALLINT, INTEGER: index calculations, arguments of CYCLE FOR with integer step size, POSITION and length information in CHARACTER expressions, exponent of the power operation, arguments of the MODULO function - DECIMAL used in commercial calculations where in all intermediate data either all pre- and following point positions shall be maintained or the number of the following point positions will be restricted to a fixed value. In declarations, precision and scale should correspond to the actual requirements in order to avoid an increasing of those with respect to the intermediate data and to minimize the inaccuracy of the division as to an insufficient scale for the quotient. If, nevertheless, an inaccuracy occurs for the result of a division, the expression should be assigned to an intermediate variable with a sufficient scale. The intermediate data have a maximum precision of 30. Therefore, calc overflow may occur (see EXTENDED DECIMAL). - REAL, DOUBLE PRECISION scientific calculations. For mathematical functions or the power operation ** the intermediate result gets the data type DOUBLE PRECISION, therefore DOUBLE PRECISION should be chosen in these cases from the very beginning. In order to avoid a conversion to DOUBLE PRECISION, for a square operation there should be applied the function SQR instead of the operation ** 2 . The result of the relational expression &A = &B is undefined as to the principal inaccuracy of both the arguments. Therefore the condition IF &A = &B should be replaced by IF ABS(&A - &B) < C , where C is a given limit. - 2 - A - EXTENDED DECIMAL This data type is a "private data type", i. e. it is not an element of the operating system BS2000. All calculations using such a data type can't be performed with inline code, but with own routines; therefore, these calls are extremely inperformant. This data type should only be used when DECIMAL overflow occurs. The intermediate result of ROUND and TRUNC gets the data type EXTENDED DECIMAL . - NUMERIC From this version the sign which is internally stored, will be normalized, therefore also the last byte represents a printable digit provided that the value is not negative. This requires additional coding; therefore the data type NUMERIC should only be used if the representation of the value as a sequence of printable digits is essential. By the way there are mentioned the functions CHARACTER and NUMERIC in both these cases with the specification of a mask, which convert an arbitrary numeric variable into its representation for printing and vice versa. As in calculations first of all a conversion to DECIMAL takes place, the base variable can be defined directly with DECIMAL (in case of missing scale even with INTEGER). - Combination of DECIMAL and REAL resp. DOUBLE PRECISION A combination of these two data types in a calculation expression should be avoided. Otherwise, the specific characteristics which leads to the selection of one of these data types, will be lost. Due to this reason it is recommended to use in calculation expressions typeright variables with corresponding INIT values instead of numeric literals. - Advice for an eventual migration to SINIX: In SINIX, the types NUMERIC, DECIMAL and EXTENDED DECIMAL are identical. 2.3 REDEFINES As of the version V2.1 a redefinition of CHARACTER with NUMERIC and vice versa is possible without further programming efforts since for a non-negative value of NUMERIC also the last byte represents a printable digit. 2.4 PERMANENT and TEMPORARY In object operation under UTM the permanent and temporary variables are stored in different data areas. At dialog step change they are saved and restored separately. In DRIVE programs which shall not be called by CALL, a distinction between permanent and temporary variables is not necessary. All variables inclusive the parameters may be declared as permanent because the system variables as permanent variables are always present. As a consequence the data area for the temporary variables need not be saved and reconstructed at every dialog step. - 3 - A 3 Supplement to the manual (German edition) - Inhalt : * There is missing 1.3 Readme-Datei * There is missing 4.5 Beispiel TIAM-Anwendung - Seite 5 Tabelle 1-1 : * The names of the declaration files for DSSM/SCCM have changed and now read for Newstyle: SYSSSC.DRIVE-COMP-LZS.031 for Oldstyle: SYSSSD.DRIVE-COMP-LZS.031 - Seite 19 : * The list of the options relevant for the compiler is incomplete, there are missing e.g. LETTERS, DBSYSTEM, SCHEMA - Seite 27 : * In the texts for DRI0305, DRI0306, DRI0307 the hint on the DVS return code is wrong, as there does not appear any DVS return code. For DRI0305 the text should read: Bedeutung Der generierte Objektcode wird zunaechst in die Hilfsdatei S.DRIVE-COMP.codemodule.hh.mm.ss mit Linknamen IDCHPLAM geschrieben, die intern angelegt und am Ende wieder geloescht wird. Beim Anlegen oder Oeffnen dieser Hilfsdatei ist ein Fehler aufgetreten. Massnahmen Hilfsdatei loeschen, dann Compilierung erneut starten - Seite 33, 37, 54 : * The following INCLUDE statement is to be supplied, if the EDT is not shared loaded: // INC-MOD LIB=&EDTLIB,ELEM=IEDTGLE,TYPE=R - Seite 34 Bild 4-3 : * LMSLIB is obligatory , * SYSLIB.FHS.082 (instead of .080) - Seite 35, 36 : * There is missing the command for BLSLIB on LMSLIB , * SYSLIB.FHS.082 (instead of .080), * after applilib only ',-' (instead of ',,-') - Seite 36 |I| : * This sentence must read: Soll der Report-Generator eingesetzt werden, muss zusaetzlich der Link-Name RSOML zugewiesen werden. - Seite 39 : * There is missing the command for BLSLIB on LMSLIB , * SYSLIB.FHS.082 (instead of .080), * the position of the brackets is wrong within the command /START-PROGRAM (s. page 36 for correct position), * there is missing SHARE-SCOPE=NONE,- (see page 36) - Seite 57 : * SYSLIB.FHS.082 (instead of .080), * the position of the brackets is wrong within the command /START-PROGRAM (s. page 36 for correct position), * there is missing SHARE-SCOPE=NONE,- (see page 36) - 4 -