Tags

, , , , , , ,

1. CONSIDER THE BELOW PART FROM A SOURCE CODE.

WORKING-STORAGE SECTION.

01 WS-ARRAY-VAR.
05 WS-ARRAY PIC X(1) OCCURS 5 TIMES.

01 WS-VAR PIC 9(1).

PROCEDURE DIVISION.

PERFORM VARYING WS-VAR FROM 1 BY 1 UNTIL WS-VAR > 5
MOVE ‘A’ TO WS-ARRAY(WS-VAR)
END-PERFORM

PERFORM VARYING WS-VAR FROM 1 BY 1 UNTIL WS-VAR > 9
DISPLAY WS-VAR ‘ ‘ WS-ARRAY(WS-VAR)
END-PERFORM

GOBACK.

WILL THE ABOVE SOURCE CODE WORK FINE. PLEASE JUSTITY YOUR ANSWER.
IF YOUR ANSWER IS NO, PLEASE LET US KNOW IF THERE IS A WAY FOR
THE CODE MENTIONED ABOVE TO WORK FINE WITHOUT ANY CHANGES TO
THE SOURCE CODE.

2. CONSIDER A COBOL CICS DB2 PROGRAM WHICH IS INVOKED BY A
TRAN “TACT”. THIS TRAN IS INVOKED FROM A SCREEN WHENEVER
USER UPDATES SOME INFO ON THE SCREEN, WHICH NEEDS TO BE
UPDATED INTO A DB2 TABLE. CONSIDER A SCENARIO, WHERE
2 USERS TRIES TO UPDATE THE SAME ROW IN A TABLE AT THE
SAME TIME. IN THIS SCENARIO, TO ENSURE BOTH UPDATES ARE
DONE CORRECTLY WITHOUT ANY DB2 ISSUES, WHAT PRECAUTION
WILL YOU TAKE WHILE CODING THE PROGRAM. PLEASE SELECT
THE BEST OPTION IF YOU HAVE MULTIPLE ANSWERS.

3. IS THERE A WAY TO COMMUNICATE WITH YOUR PEER WHO IS
ALSO LOGGED ON INTO MAINFRAME THROUGH MAINFRAME. IF YES,
PLEASE MENTION THE WAY.

Important SQL CODES and ABEND CODES
SORT JOIN – TO JOIN TWO FILES BASED ON A KEY
KNOW YOUR MAINFRAME
REXX – INITIAL SETUP
KNOW YOUR MAINFRAME
KNOW YOUR MAINFRAME – WEEK 1
KNOW YOUR MAINFRAME – WEEK 1 – SOLUTIONS
KNOW YOUR MAINFRAME – WEEK 2
KNOW YOUR MAINFRAME – WEEK 2 – SOLUTIONS
KNOW YOUR MAINFRAME – WEEK 3
KNOW YOUR MAINFRAME – WEEK 3 – SOLUTIONS
KNOW YOUR MAINFRAME – WEEK 4
KNOW YOUR MAINFRAME – WEEK 4 – SOLUTIONS
KNOW YOUR MAINFRAME – WEEK 5
KNOW YOUR MAINFRAME – WEEK 5 – SOLUTIONS
KNOW YOUR MAINFRAME – WEEK 6
KNOW YOUR MAINFRAME – WEEK 6 – SOLUTIONS
Advertisements