IBM Integration Bus, Version 9.0.0.5 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

ESQL coding practices

Individual sections of this Good operating practice have ESQL samples and recommendations were appropriate. The following recommendations do not fit neatly into a section.

The following recommendations are intended to ensures that flows are optimized for performances. Before the specific recommendations, there is a list of more general coding recommendations.

ESQL and flow coding practices

  1. Initialize variables within DECLARE statements to reduce the number of statements required. The following example uses multiple statements, which is not recommended:
    DECLARE iIndex INTEGER;      --Declare only
    SET iIndex = 0;        --Initialize
    Instead of using multiple statements, use a single statement as shown in the following example so that the memory required to process the statements is reduced:
    DECLARE iIndex INTEGER 0;   --Declare and initialize in one statement
  2. Use a single DECLARE statement when you define multiple variables of the same type. The following example uses multiple statements, which is not recommended:
    DECLARE cVar1 CHARACTER;
    DECLARE cVar2 CHARACTER;
    DECLARE cVar3 CHARACTER;
    Instead of using multiple statements, use a single statement as shown in the following example. This action reduces the number of statements to execute, and reduces the memory that is required to define the variables:
    DECLARE cVar1, cVar2, cVar3  CHARACTER;        --Declare multiple variables
  3. Declare a REFERENCE to avoid excess navigation of the Message Tree. For more information, see Using reference variables.
  4. Use CREATE with PARSE clause in preference to a read/write operation. For more information, see Environment and Local Environment considerations.
  5. Make code as concise as possible. Restricting the number of statements reduces the memory that the parsing requires.
  6. Combine ESQL into the minimum number of compute nodes possible. Fewer compute nodes usually means less tree copying. For more information, see Reduce the number of Computenodes.

bj60051_.htm | 
        
        Last updated:
        
        Last updated: 2016-08-12 11:20:23