Search code examples
cobol

usage of 88 level under FILLER field


Does it make sense to have 88 level under FILLER declaration, like in this code:

 10   FILLER   PIC X(02).
      88  SOME-NAME  VALUE 'XX'.

Can this field SOME-NAME be used in the program?


Solution

  • Yes, that makes totally sense. You may use this for:

    • only (or mostly) set / check by field condition-name - SET SOME-NAME TO TRUE and IF SOME-NAME; as Scott Nelson pointed out this is a good way to prevent use of "magic values"
    • have the value stored and somewhere referenced by the group field, most likely the 01 above your 10.