Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

How will you check if a file is empty in JCL?

Answer»

In case the file is EMPTY and is used as input in IDCAMS, then the job COMPLETES with RETURN code 4. By verifying this return code, we can identify that the file is empty.

2.

How will you achieve auto restart when the job abends?

Answer»

We can make use of the RD parameter in JOB/EXEC statement by specifying for what ABEND codes RESTART NEEDS to be performed in the SCHEDxx MEMBER of parmlib LIBRARY of the IBM system.

3.

How will you inform other users about job completion?

Answer»

We can MAKE use of NOTIFY STATEMENT which notifies the USER about job completion along with the return code.

NOTIFY = userid to whom status NEEDS to be notified

It has to be noted that the job log of the spool would contain INFORMATION under the job submitter’s id.

4.

How will you copy data from one dataset to another dataset by using the SORT card?

Answer»

We can mention SYSIN and SYSOUT dataset NAMES in the SORT STEP. Additionally, we need to mention SORT FIELDS = COPY in the sort card to copy data from one dataset to ANOTHER.

5.

Is it possible to redefine X(100) field with X(200)? If yes, how?

Answer»

Yes, it is possible by making USE of REDEFINES. We need to keep in MIND that redefining just ensures fields START from the same location.

01 WS-TOP PIC X(100)01 WS-TOP-DOUBLE REDEFINES WS-TOP PIC X(200)
6.

How will you define the sort file in JCL which runs the COBOL program?

Answer»

We can USE SORTWK01, SORTWK02, and so on in the STEP. There needs to be a minimum of 3 DATASETS, but in general, the NUMBER of sort datasets is proportionate to the volume of a DATASET that needs to be sorted.

7.

In case you have 1000 rows in the DB2 table, how will you update the column value of the first 100 records?

Answer»

In case our DB2 table has an identity COLUMN, then we can use the indexnum as follows:

UPDATE Table SET COLUMN_NAME=XXX where indexnum < 101