Skip to Main Content
Due to the recent acquisition by IBM, the Adabas & Natural Ideas Portal does not contain ideas from products ApplinX and EntireX any longer. Please refer to the IBM Ideas Portal for these products from now on (IBMid required). Existing content will be migrated during the next few weeks.
Status Future consideration
Workspace Natural for z/OS
Created by Philippe Van Coppenolle
Created on May 15, 2023

AND, OR, XOR for binary fields

It is currently not possible to do any "binary" operation on binary fields, like AND, OR, XOR or NOT. This makes declarations of particular bit-constants quasi useless, e.g.

...
3 #TB_VDT_FLAG (B01) /* various property flags
...
1 #TB_VDT_FLAG_VALUES
2 #TB_VDT_F1ARRAY (B01) CONSTANT<H'80'> /* ARRAY
2 #TB_VDT_F1ARRAYC (B01) CONSTANT<H'40'> /* ARRAY IS CONTIGUES
2 #TB_VDT_F1EVDT (B01) CONSTANT<H'20'> /* EXTENDED VDT SLOT
2 #TB_VDT_F1SVDT (B01) CONSTANT<H'10'> /* SPECIAL VDT SLOT
  1. If someone wants to test for an array (H'80'), he cannot used the constant, but needs to convert the field #TB_VDT_FLAG into an array of '0' or '1', and test for '1'.
    It would be much easier if you could write:
    IF #TB_VDT_FLAG AND #TB_VDT_F1ARRAY <> H'00'

  2. It is also not possible to store the result of such operation, e.g.
    #WORK_RESULT := #TB_VDT_FLAG OR #TB_VDT_F1EVDT

This is valid for all platforms.