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.

251.

What Are The Three Types Of Keywords Associated With Printer File ?

Answer»

FILE LEVEL, RECORD level & FIELD level.

File level, Record level & Field level.

252.

What Is The Sequence When Using Cursor?

Answer»

Define CURSOR ,DECLARE Cursor ,OPEN Cursor ,FETCH record ,Processing ,Close Cursor

Define Cursor ,Declare Cursor ,Open Cursor ,Fetch record ,Processing ,Close Cursor

253.

Difference Between View And Index ?

Answer»

View will not any data.. It only shows a data from table while Index has a Indexing Data for a sequence on which Index is created. View is similar to LOGICAL file without having Key and Index is similar to Logical File having Key (as keyed logical file has access PATH data) Table is similar to PF.

View will not any data.. It only shows a data from table while Index has a Indexing Data for a sequence on which Index is created. View is similar to Logical file without having Key and Index is similar to Logical File having Key (as keyed logical file has access path data) Table is similar to PF.

254.

Writing An Sql Statement From Selecting Records From Two Files Using Single Statement And Nested Select Statement.

Answer»

USING SINGLE STATEMENT.
SELECT * FROM FILE1, FILE2
WHERE FILE1.FLD1 = FILE2.FLD1

Using Single statement.
SELECT * FROM FILE1, FILE2
WHERE FILE1.FLD1 = FILE2.FLD1

255.

Different Type Of Cursor?

Answer»

Two types of Cursor
SIMPLE / Serial Cursor
A serial cursor is ONE DEFINED without SCROLL key word
For serial cursor each row is fetched only once per OPEN When it is opened it is positioned before the first row in the table.
To use serial cursor we have to re-issue OPEN

Scrollable Cursor which is defined with SCROLL key word.
Cursor defined with SCROLL key word
Rows of cursor can be fetched many times
When it is opened it is positioned before the first row in the table.
When the FETCH is issued , the cursor is positioned to the row of the table that is specified by the POSITION option. (FIRST, LAST, PREV, NEXT, RELATIVE)

Two types of Cursor
Simple / Serial Cursor
A serial cursor is one defined without SCROLL key word
For serial cursor each row is fetched only once per OPEN When it is opened it is positioned before the first row in the table.
To use serial cursor we have to re-issue OPEN

Scrollable Cursor which is defined with SCROLL key word.
Cursor defined with SCROLL key word
Rows of cursor can be fetched many times
When it is opened it is positioned before the first row in the table.
When the FETCH is issued , the cursor is positioned to the row of the table that is specified by the POSITION option. (FIRST, LAST, PREV, NEXT, RELATIVE)

256.

How To Validate Input Values In Display File ?

Answer»

With the HELP of Validity check KEY words VALUE, RANGE, COMP

With the help of Validity check key words VALUE, RANGE, COMP

257.

Command Attention Key And Command Function Key ?

Answer»

With the help of COMMAND attention KEY we can pass only the indicator status to PROGRAM not the data from screen. While command FUNCTION key passes indicator status as well as a data from screen to program.

With the help of Command attention key we can pass only the indicator status to program not the data from screen. While command function key passes indicator status as well as a data from screen to program.

258.

What Key Word Is Used When Screen Is Re-display?

Answer»

RSTDSP is a PARAMETER to be SPECIFIED at compile TIME for DISPLAY file.

RSTDSP is a parameter to be specified at compile time for display file.

259.

What Is Overlay?

Answer»

It ALLOWS a record format to be DISPLAYED on screen RETAINING the PREVIOUS displayed record formats.

It allows a record format to be displayed on screen retaining the previous displayed record formats.

260.

How To Get The Cursor Position?

Answer»

With the help of RTNCSRLOC KEYWORD, here we need to define a FIELD to get ROW and column. Length of variable should be 5,0 fixed We can SPECIFY *FILED for filed *REC for RECORD on which a key is pressed.

With the help of RTNCSRLOC keyword, here we need to define a field to get row and column. Length of variable should be 5,0 fixed We can specify *FILED for filed *REC for Record on which a key is pressed.

261.

How To Define To Define A Hidden Filed In Dspf ?

Answer»

Define a filed in a DSPF of USE HIDDEN.(H)

Define a filed in a DSPF of use HIDDEN.(H)

262.

What Are The Important Factors In Error Message Subfile ?

Answer»

We must DEFINE ERROR message RECORD format (SFLMSG). And a Program Queue. (PGMQ) and Record format is associated to a line number.

We must define error message record format (SFLMSG). And a Program Queue. (PGMQ) and Record format is associated to a line number.

263.

Explain The Keywords Edtcde & Edtwrd?

Answer»

EDTCDE & EDTWRD are key words USED for formatting purpose. EDTCDE cannot be applied to Character filed. And EDTCDE has some CODES pre-DEFINED for example,

EDTCDE(Z) – for suppressing the leading zero Y – for DATE field.
EDTWRD can be used to define user defined formatting for a fields.

EDTCDE & EDTWRD are key words used for formatting purpose. EDTCDE cannot be applied to Character filed. And EDTCDE has some Codes pre-defined for example,

EDTCDE(Z) – for suppressing the leading zero Y – for date field.
EDTWRD can be used to define user defined formatting for a fields.

264.

How To Avoid Using Indicators In Ile ?

Answer»

By using the standard BUILT In Expressions like %FOUND,%EOF, NOT %EOF, %BOF, NOT %BOF…etc.
Display / PRINTER FILE

By using the standard Built In Expressions like %FOUND,%EOF, NOT %EOF, %BOF, NOT %BOF…etc.
Display / Printer File

265.

If We Tried To Move Year Part Of *iso Date Into A Field Of Length 3, What Will Happen ?

Answer»

Program CRASHES, as in case of *ISO format it REQUIRED FIELDS of 4,2,2.

Program crashes, as in case of *ISO format it required fields of 4,2,2.

266.

What Is *iso Date Format?

Answer»

YYYY-MM-DD for other formats REFER to IBM manual or ERIS DOCUMENT.

YYYY-MM-DD for other formats refer to IBM manual or ERIS document.

267.

What Is Service Program?

Answer»

A Service PROGRAM is a collection of RUNNABLE procedures and available data items EASILY accessible by other ILE programs. In many respects it is similar to a subroutine library and procedure library.

A service program differs from a program in two ways:

It does not contain a program entry procedure. This means that you cannot call a service program using the CALL OPERATION.

A service program is bound into a program or other service programs using binding by REFERENCE.

A Service Program is a collection of runnable procedures and available data items easily accessible by other ILE programs. In many respects it is similar to a subroutine library and procedure library.

A service program differs from a program in two ways:

It does not contain a program entry procedure. This means that you cannot call a service program using the CALL operation.

A service program is bound into a program or other service programs using binding by reference.

268.

What Is The Disadvantage Of Using Global Variable?

Answer»

We can not TRACE out at which POINT the VALUE of VARIABLE is CHANGED.

We can not trace out at which point the value of variable is changed.

269.

How To Define Global Parameter In Ile ?

Answer»

Declare a variable with key WORD EXPORT and while USING this variable in anther program declare with IMPORT KEYWORD.

Declare a variable with key word EXPORT and while using this variable in anther program declare with IMPORT keyword.

270.

What Is Procedure Prototype And Procedure Interface.

Answer»

Procedure Prototype
In this section we specify the name of the procedure along with PR.
D PROC1 PR
Procedure INTERFACE
It is section where we define all the parameter which are RECEIVING or returning some VALUES.
D PROC1 PI 5 0
D PARMA 5 0
D PARMB 5 0

Procedure Prototype
In this section we specify the name of the procedure along with PR.
D PROC1 PR
Procedure Interface
It is section where we define all the parameter which are receiving or returning some values.
D PROC1 PI 5 0
D PARMA 5 0
D PARMB 5 0

271.

What Is Procedure ?

Answer»

A procedure is the set of self contained HIGH LEVEL LANGUAGE STATEMENTS that can perform a particular task and then returns to a caller.

A procedure is the set of self contained high level language statements that can perform a particular task and then returns to a caller.

272.

How To Write *pssr ?

Answer»

It just SIMILAR to any other SUBROUTINE.
*PSSR BEGSR
………………
………………
…………….
ENDSR

It just similar to any other subroutine.
*PSSR BEGSR
………………
………………
…………….
ENDSR

273.

Which Cl Command Can Be Used At Program Execution To Redirect The File Named In An Rpg Program?

Answer»

OVRDBF

OVRDBF

274.

Which Cl Command Is Used To Trap Error Messages During Program Execution?

Answer»

MONMSG

MONMSG

275.

What Do We Can Do With The Embedded Sql Statements?

Answer»

We can Insert/Update/Delete RECORDS, FETCH records, fetch VALUES from records into VARIABLES.

We can Insert/Update/Delete records, fetch records, fetch values from records into variables.

276.

Why Is The Declare Cursor Statement Is Used For?

Answer»

To define & NAME the cursor & SPECIFY rows to be FETCHED.

To define & name the cursor & specify rows to be fetched.

277.

How Many Triggers Can Be Associated With A File?

Answer»

6(MAXIMUM)

6(Maximum)

278.

When Are The Referential Constraints Executed?

Answer»

INSERT, UPDATE & DELETE.

Insert, Update & Delete.

279.

When Are The Unique Constraints Executed?

Answer»

During INSERT.

During Insert.

280.

What Does Dfu Program You To Do On A Record?

Answer»

INSERT, UPDATE Delete & File ENQUIRY.

Insert, Update Delete & File Enquiry.

281.

Which Of The Cl Command Can Be Used To Determine Which Logical Files Are Dependent On A Specific File?

Answer»

DSPDBR

DSPDBR

282.

A Program Variable Coded In An Embedded Sql Statement Is Referred To As?

Answer»

HOST VARIABLE

Host Variable

283.

How Many Printer Files Can Be Defined In F Specs ?

Answer»

8

8

284.

How Many Files Can Be Defined In F Specs?

Answer»

50

50

285.

In Which Specification The Report Layout Can Be Defined?

Answer»

O SPECIFICATION.

O Specification.

286.

What Are The Limitations Of Cl (compare To Rpg) ?

Answer»

You can not use CL program to ADD or UPDATE records in database files.
Use Printer or ICF files.
Use Program described files.
Use the concept of subfile (to display more than one RECORD), but a single output MESSAGE subfile is a special TYPE of subfile that is SUPPORTED well in CL.
Use subroutines.
You cannot declare more than one object (file) in a CL programme.

You can not use CL program to ADD or UPDATE records in database files.
Use Printer or ICF files.
Use Program described files.
Use the concept of subfile (to display more than one record), but a single output message subfile is a special type of subfile that is supported well in CL.
Use subroutines.
You cannot declare more than one object (file) in a CL programme.

287.

What Is Multi-format Logical File?

Answer»

Logical which uses FIELDS from TWO or more PHYSICAL FILES.

Logical which uses fields from two or more physical files.

288.

How Do You Pass Parameters In Cl?

Answer»

USING PARM KEYWORD.

Using PARM keyword.