.st0{fill:#FFFFFF;}

Interview Question and Answer – *CLP AS400 Control Language 

 August 4, 2017

By  NickLitten

Twenty years ago these are the kind of things you had to know to work on the old AS400 systems. I found these on an old dusty corner of my homeserver. Enjoy the trip down memory lane or to use old RPG lingo AS400NERD CABEQ ‘1’  START

CONTROL LANGUAGE (CL/400)

How to start a CL program ?
PGM.

How many files can be declared in CL ?
One.

Which precedes, the file declaration or variable declaration ?
Variable declaration and then File declaration.

What are the different types of variables available in CL ?
DEC, CHAR, LGL

In CL Program ‘&’ precedes ____ .
Variables.

How do you pass parameters in CL ?
Using PARM keyword.

Can libraries be added to the library list through CL ?
Yes, using ADDLIBL.

What is the difference between CAT, TCAT and BCAT ?
CAT : Concatenate two variables or constants into one continuous string.
BCAT : Truncates all trailing blanks in the first character string ; one blank is inserted , then the two character strings are concatenated.
TCAT : Truncates all trailing blanks in the first character string, thetwo character strings are concatenated.

How do you end a CL program ?
ENDPGM

What are the different types of messages in CL ?
Immediate message, Break message, Program message, User message.

How can errors be trapped in a CL program?
By using Monitor Message Command ( MONMSG )

What is the maximum length of a variable name in CL ?
Maximum 11 characters (including ‘&’)

What are the limitations of CL (compare to RPG) ?
You cannot 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 program.

NickLitten


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

Swap Homes and Travel the World – Join Home Exchange
Surf the Web Securely with OPEN DNS
IBM i Software Change Management – CMS vs ALM – What’s in a Name?
Want to learn CL Programming?
{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Get In Touch

I’m always looking for awesome input, feedback and critique!

>

Snug CBD

 20% Discount

I have partnered with SNUG CBD givING you Organic CBD
20% discount code "NL20"