Smart logical ordering scheme
The smart logical layout scheme was introduced into the Developer for z/OS® product to overcome restrictions of the logical ordering scheme and to provide for the special requirements of programming languages.
The smart logical layout was introduced in the Developer for z/OS product to solve two main problems:
- Round-trip problem
- The implicit (logical) reordering algorithm has known restrictions that do not allow for correct handling of some strings that contain bidirectional text. As a result, users cannot easily generate certain presentations. These restrictions also create ambiguity during visual to logical conversion, which is performed when data is downloaded from a zSeries remote system to a Windows or Java™ client.
- Complex expressions handling
- Text that is written in formal languages (such as programming
languages) must obey rules that dictate the order of different tokens
according to the appropriate syntax. If some of the tokens contain
right-to-left (RTL) letters, the reordering that is performed for
presentation according to the regular algorithm might cause the tokens
to be displayed in an order different from the syntactical order.
As a result, structured bidirectional data can be broken by visual-to-logical
conversion, which is unaware of the data structure. Assume, for example,
that a COBOL file on an MVS system
contains the following line of code in which the tokens are Arabic
or Hebrew:
After visual-to-logical conversion, this row looks correct (the same as on the host) in any logical editor, but is stored in the opposite order:STRING "token1", "token2", "token3", "token4"STRING "token4", "token3", "token2", "token1"
Solving the round-trip problem
To solve the round-trip problem, the bidirectional conversion algorithm is supplied with a special option. When this option is specified (that is, when the smart logical client layout is defined by a Developer for z/OS user), bidirectional text with potential ambiguity is preceded automatically by LRM or RLM marks. These marks are also called intra-token marks.
Solving the problem of complex expressions handling
Resolution of complex expressions problems is also based on use of LRM marks. Unfortunately, it is not possible to resolve this problem with a generic solution because resolution depends on particular language syntax. Visual-to-logical conversion for source programs that are written in COBOL, C/C++, PL/I, HLASM, and XML was extended to support LRM marks insertion, when smart logical client layout is defined by the Developer for z/OS user. Marks that are introduced by the smart logical algorithm to solve language-dependent syntax problems are called inter-token marks.