In this blog post, we will see what are the major CL commands used in IBM iSeries/AS400. And what are the CL command questions asked during an interview. Let's see one by one below.
1) Limitations/Drawbacks in CL
Ans:
Ans:
- Add or Update records in database file
- Can't use printer or ICF file
- Can't use program described files
- Doesn't support subfile (to display more than one record) and subroutine
- Can't declare more than one object(file)
2) Which CL command is used to read a file ?
Ans: RCVF - Receive File
3) What is the use of CPYF command ?
Ans: CPYF - Copy File
Copies the data from one file to an another file
Ans: CPYF - Copy File
Copies the data from one file to an another file
4) How can we send message from CL program ?
Ans: SNDPGMMSG - Send Program Message
5) How can we pass parameter in CL ?
Ans: PARM keyword used to pass parameter.
6) What is subsystem ?
Ans: Subsystem is a specialized environment used for execution of a job.
7) Which command is used to see all the objects and it's sizes in a library ?
Ans: DSPLIB - Display Library
This command gives the details of all objects that present in a library with its size.
8) How can we trap/handle error in CL?
Ans: By using Monitor Message (MONMSG) command.
9) Can we add a record or update a record in physical file through CL ?
Ans: No. CL doesn't support add or updating physical file. Only perform read operation.
10) How many number of parameters can be. passed through CL ?
Ans: Maximum number of parameters passed is 40 in CL
11) Which command is used to access the query?
Ans: WRKQRY - Work with Queries
12) What is the maximum length of a variable name in a CL program?
Ans: 11 (including '&')
13) What is the commonly used command for debugging ?
Ans: STRDBG (used for batch jobs)
14) List the different types of messages in CL.
Ans:
Ans: SNDPGMMSG - Send Program Message
5) How can we pass parameter in CL ?
Ans: PARM keyword used to pass parameter.
6) What is subsystem ?
Ans: Subsystem is a specialized environment used for execution of a job.
7) Which command is used to see all the objects and it's sizes in a library ?
Ans: DSPLIB - Display Library
This command gives the details of all objects that present in a library with its size.
8) How can we trap/handle error in CL?
Ans: By using Monitor Message (MONMSG) command.
9) Can we add a record or update a record in physical file through CL ?
Ans: No. CL doesn't support add or updating physical file. Only perform read operation.
10) How many number of parameters can be. passed through CL ?
Ans: Maximum number of parameters passed is 40 in CL
11) Which command is used to access the query?
Ans: WRKQRY - Work with Queries
12) What is the maximum length of a variable name in a CL program?
Ans: 11 (including '&')
13) What is the commonly used command for debugging ?
Ans: STRDBG (used for batch jobs)
14) List the different types of messages in CL.
Ans:
- Immediate message
- Break message
- Program message
- User message
15) How can we add a field to a physical file already containing data ?
Ans: Using CPYF command with option as *NOCHK and *DROP
16) How will RUNQRY shows the output ?
Ans: RUNQRY always show the output in RRN (Relative Record Number) not in keyed sequence.
17) What is the use of CPYSPLF command?
Ans: Copies spooled file to a database file.
18) How can you create a replica of an original object using CL command ?
Ans: CRTDUPOBJ - Create Duplicate Object
19) List the data types available in CL.
Ans:
18) How can you create a replica of an original object using CL command ?
Ans: CRTDUPOBJ - Create Duplicate Object
19) List the data types available in CL.
Ans:
- CHAR
- DEC
- LGL
20) What is the use of CHGVAR command ?
Ans: To change the value that present inside a CL variable
No comments:
Post a comment