Tag: mainframe
Questions Related to mainframe
What is the maximum size of a 01 level item in COBOL II?
05 FIELDA PIC XXXX VALUE 'ABCb'. 05 FIELDB PIC XXXX VALUE SPACES. .... MOVE FUNCTION REVERSE(FIELDA) TO FIELDB. Which one of the following is the content of FIELDB following execution of the MOVE statement shown in the sample code above?
Sample Code Field in working storage: 05 S-EOF-CHECK PIC X(01). 88 S-NOT-END-OF-FILE VALUE 'N'. 88 S-END-OF-FILE VALUE 'Y'. MAINLINE. SET S-END-OF-FILE TO TRUE PERFORM A0100-PRINT-DETAIL-AND-FOOTERS UNTIL S-END-OF-FILE END-PERFORM. Using the sample working storage and mainline section of a program, which one of the following is the coding error that occurred in the sample above?
Sample code WORKING-STORAGE SECTION. 01 WORK-TABLE. 05 WK-ALPHA PIC A(2) VALUE 'AB'. 05 FILLER PIC X VALUE ''. 05 WK-ALPHANUM PIC X(4) VALUE 'CDEF'. 05 PIC X VALUE ''. 05 WK-NUM PIC 999. 05 PIC X VALUE '*'. PROCEDURE DIVISION. .... INITIALIZE WORK-TABLE. After execution of the statement in the sample code above, which one of the following values does WORK-TABLE contain? NOTE: b = BLANK or UNPRINTABLE HEXADECIMAL character