TRESA wrote:WS-FIRST-LINE S 01 A VALUE 'Y'
WS-FIRST-LINE W 01 A VALUE 'Y'
can anyone point out the difference between these 2 declarations?
Both define "working storage fields". When a "W" field is referenced in a report, its value is that which it had at the time of the PRINT statement to produce the report. The value of an "S" field is resolved at the time that the report is formatted for printing. Can cause confusions and differences.
I suggest using a different prefix for the two different types (I cunningly use "W-" and "S-"). I make a rule of thumb, never to amend a "W" field in a report procedure, never to use an "S" field in a report
without amending it in a report procedure.