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 To Find The Field Description Of An Object?

Answer»

DSPFFD, DSPOBJD.

DSPFFD, DSPOBJD.

2.

What Are The Advantages Of Cl?

Answer»
  • Because commands are compiled and stored in a form, they can be run immediately and it is faster than entering the commands in command LINE.
  • Some CL commands cannot be EXECUTED in command line, so we NEED CL program for them. EG. RTVSYSVAL, RTVDTAARA
  • Cl program can be tested and debugged LIKE other HLL program.

3.

How Can You Check The Date In Cl?

Answer»

By the COMMAND CVTDAT.

By the command CVTDAT.

4.

What Are The Different Date Types?

Answer»
  • *ISO – YYYY-MM-DD
  • *USA – MM/DD/YYYY
  • *EUR – DD.MM.YYYY
  • *JUL – YY/DDD
  • *JOB
  • *SYSVAL
  • *MDY
  • *DMY
  • *YMD
  • *JUL
  • *ISO is the default date TYPE.
  • Format of system value is MM/DD/YY

5.

How To Retrieve A Date In Cl?

Answer»

By USING RTVSYSVAL command we ca retrieve a date in CL. The various date FORMATS are *JOB, *SYSVAL, *MDY, *DMY, *YMD, *JUL etc. [if you want system TIME, you have to specify *time in the format].

By using RTVSYSVAL command we ca retrieve a date in CL. The various date formats are *JOB, *SYSVAL, *MDY, *DMY, *YMD, *JUL etc. [if you want system time, you have to specify *time in the format].

6.

Why Would The Pgm Line Contain A Parm?

Answer»

The CL program is USING a value passed from another PROCESSING program.

The CL program is using a value passed from another processing program.

7.

How Can A Programmer Exit Out Of A Cl Program?

Answer»

By USING a RETURN COMMAND.

By using a RETURN command.

8.

Explain Parameter Passing?

Answer»

To PASS variables from a CL or RPG program to ANOTHER CL or RPG program.

To pass variables from a CL or RPG program to another CL or RPG program.

9.

What Is A Command Label?

Answer»

An area of transfer WITHIN a CL program from which to CONTINUE PROCESSING directed by a GOTO COMMAND.

An area of transfer within a CL program from which to continue processing directed by a GOTO command.

10.

What Are The Various Steps Involve Accessing Data Area In Cl?

Answer»

FIRST we get the data from the data AREA by using the COMMAND RTVDTAARA. If you WANT edit the data of the data area USE CHGDTAARA command else if you want view the data of the data area use DSPDTAARA command.

First we get the data from the data area by using the command RTVDTAARA. If you want edit the data of the data area use CHGDTAARA command else if you want view the data of the data area use DSPDTAARA command.

11.

How Do You Access The Local Data Area In A Cl Program?

Answer»

RTVDTAARA DTAARA (*LDA) RTNVAR (&VAR).

RTVDTAARA DTAARA (*LDA) RTNVAR (&var).

12.

What Is The Purpose Of The Chgvar Command?

Answer»

To CHANGE the VALUE ASSOCIATED with a CL VARIABLE.

To change the value associated with a CL variable.

13.

How Can A Programmer Send A Message From A Cl Program?

Answer»

USING the SNDPGMMSG COMMAND - SEND PROGRAM MESSAGE.

Using the SNDPGMMSG command - Send Program Message.

14.

What Monmsg In Cl?

Answer»
  • This command monitors the messages send to the program message QUEUE for the conditions specified in the command. There are TWO levels of MONMSG COMMANDS.
  • Program level is specified IMMEDIATELY following the last declares command in your CL program. You can use as many as 100 program level MONMSG commands.
  • Command level immediately follows a CL command. You can use as many as 100 command level MONMSG commands for a single command.
  • If you MONITOR a message by giving message ID as CPF0000 then any error will come to MONMSG routine.

15.

What Is The Main Use Of Monmsg?

Answer»

ERROR TRAPPING.

Error trapping.

16.

What Are The Data Types Available In Cl?

Answer»

17.

If The Field Is Defined In Dds, How Is It Referenced In A Cl Program?

Answer»

By DECLARING the FIELD (DCL) and placing an AMPERSAND in FRONT of the variable name.

By declaring the field (DCL) and placing an ampersand in front of the variable name.

18.

What Cl Command Is Used To Determine The Logical Files Associated With A Particular Physical File?

Answer»

DSPDBR - DISPLAY DATABASE RELATIONS.

DSPDBR - Display Database Relations.

19.

What Cl Command Is Equivalent To Write/read A Display File In Rpg?

Answer»

SNDRCVF - Send/Receive FILE.

SNDRCVF - Send/Receive File.

20.

What Cl Command Is Equivalent To Write A Display File In Rpg?

Answer»

SNDF - SEND FILE.

SNDF - Send File.

21.

How Can You Set Lower Limit To A File In Cl?

Answer»

By TWO ways we can SET:

  • POSDBF with PARAMETER “File Position” set to “*START”.
  • OVERDBF which allows to position the file by Key Value, by RRN value, or set to *START.

By two ways we can set:

22.

How Can You Read A File In Cl?

Answer»

Thro’ RCVF command we can read a file. To read all the records we should use MONMSG command with MSGID (CPF0864). So if the END of file reached then the MESSAGE CPF0864 is sent to the program so the variable will not be CHANGED by the RCVF command.

Thro’ RCVF command we can read a file. To read all the records we should use MONMSG command with MSGID (CPF0864). So if the end of file reached then the message CPF0864 is sent to the program so the variable will not be changed by the RCVF command.

23.

What Cl Command Is Used To Read A File?

Answer»

RCVF - RECEIVE FILE.

RCVF - Receive File.

24.

How Do You Read A Specific Record In A Keyed Database File In A Cl Program?

Answer»

OVRDBF FILE (FILENAME) POSITION (*KEYX a B c) and RCVF.

OVRDBF FILE (filename) POSITION (*KEYx a b c) and RCVF.