CL400 Interview Questions & Answers

  • Question 1. 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.

  • Question 2. What Cl Command Is Used To Read A File?

    Answer :

    RCVF – Receive File.

  • IBM – RPG Interview Questions

  • Question 3. 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.

  • Question 4. 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.
  • IBM – RPG Tutorial

  • Question 5. What Cl Command Is Equivalent To Write A Display File In Rpg?

    Answer :

    SNDF – Send File.

  • IBM – AS/400 Interview Questions

  • Question 6. What Cl Command Is Equivalent To Write/read A Display File In Rpg?

    Answer :

    SNDRCVF – Send/Receive File.

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

    Answer :

    DSPDBR – Display Database Relations.

  • IBM – AS/400 Tutorial SQL Database Interview Questions

  • Question 8. 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.

  • Question 9. What Are The Data Types Available In Cl?

    Answer :

    • CHAR
    • DEC
    • LGL
  • COBOL Interview Questions

  • Question 10. What Is The Main Use Of Monmsg?

    Answer :

    Error trapping.

  • SQL Database Tutorial

  • Question 11. 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.
  • AS400 Interview Questions

  • Question 12. How Can A Programmer Send A Message From A Cl Program?

    Answer :

    Using the SNDPGMMSG command – Send Program Message.

  • IBM – RPG Interview Questions

  • Question 13. What Is The Purpose Of The Chgvar Command?

    Answer :

    To change the value associated with a CL variable.

  • COBOL Tutorial

  • Question 14. How Do You Access The Local Data Area In A Cl Program?

    Answer :

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

  • Question 15. 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.

  • DB 400 Interview Questions

  • Question 16. What Is A Command Label?

    Answer :

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

  • Question 17. Explain Parameter Passing?

    Answer :

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

  • Rpgle Interview Questions

  • Question 18. How Can A Programmer Exit Out Of A Cl Program?

    Answer :

    By using a RETURN command.

  • IBM – AS/400 Interview Questions

  • Question 19. Why Would The Pgm Line Contain A Parm?

    Answer :

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

  • Question 20. 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].

  • Question 21. 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
  • Question 22. How Can You Check The Date In Cl?

    Answer :

    By the command CVTDAT.

  • Question 23. 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.
  • Question 24. How To Find The Field Description Of An Object?

    Answer :

    DSPFFD, DSPOBJD.

  • SQL Database Interview Questions