So while writing the output record Is it required to move '1' to the sw-hdr-type-ldc field. Or I can write it directly as i have given the value in the 88 clause.
What is the value if we declare the variable with 88 level as above.
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
An 88 level is a conditional check. You don't give a value in an 88 level, you specify the value(s) for which the condition is true. For example,
Code:
88 TEST-SWITCH VALUE 10 THRU 19.
is valid and TEST-SWITCH will be TRUE any time the variable value is in the range 10 through 19; less than 10 or greater than 19 and TEST-SWITCH is FALSE.
05 sw-hdr-type-ldc pic x value '1'.
88 hdr-type-ldc value '<some other value>'.
if declared as such, the 05 field will have the value '1' by default and when you set hdr-type-ldc to true, the value in it will be moved to the 05 field.