The REVERSED phrase in COBOL is used in report writer to reverse the direction of line or column output. It is useful for specialized reporting requirements, such as printing from bottom to top or right to left.
123456789101112* Use LINE REVERSED in report writer 01 REPORT-GROUP TYPE DETAIL LINE REVERSED. * Use COLUMN REVERSED in report writer 01 REPORT-GROUP TYPE DETAIL COLUMN REVERSED. * Example report group 01 SALES-REPORT TYPE DETAIL LINE REVERSED. 03 SALES-AMOUNT PIC 9(7)V99. 03 SALES-REGION PIC X(10). * Note: REVERSED is not used for string manipulation; use FUNCTION REVERSE for that purpose.
Use REVERSED in report writer to control output direction. Not all compilers support this feature.
1. What is the primary use of the REVERSED phrase in COBOL?
2. Where is REVERSED most commonly used in COBOL?
3. Is REVERSED supported in all COBOL compilers?
4. Which of the following is a valid use of REVERSED?
5. What is the effect of using LINE REVERSED in a report?