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 Released
Workspace Natural for z/OS
Categories Natural (NAT)
Created by Guest
Created on Jul 15, 2021

NAT: COMPRESS LOGICAL variable

It is possible to MOVE a field of format L to a field of format A.
But it is not possible to COMPRESS a field of format L into a field of format A.
This should be made possible, following the rules of a MOVE:
TRUE as x'E7'
FALSE as x'40'

Example for MOVE:
DEFINE DATA LOCAL
01 #TRUE (L)
01 #FALSE (L)
01 A-TRUE (A1)
01 A-FALSE(A1)
END-DEFINE
*
#TRUE := TRUE
#FALSE := FALSE
MOVE #TRUE TO A-TRUE
MOVE #FALSE TO A-FALSE
WRITE
'#TRUE :' #TRUE #TRUE (EM=HH) 'A-TRUE :' A-TRUE A-TRUE(EM=HH) /
'#FALSE:' #FALSE #FALSE (EM=HH) 'A-FALSE:' A-FALSE A-FALSE(EM=HH)
END

Output:
#TRUE : X 01 A-TRUE : X E7
#FALSE: 00 A-FALSE: 40

Created on Brainstorm 12/05/2013 08:27
Brainstorm ID 523
  • +4