.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:

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
__CONFIG_colors_palette__{"active_palette":0,"config":{"colors":{"cff50":{"name":"Main Accent","parent":-1},"a344d":{"name":"Accent Transparent","parent":"cff50"}},"gradients":[]},"palettes":[{"name":"Default","value":{"colors":{"cff50":{"val":"var(--tcb-skin-color-0)"},"a344d":{"val":"rgba(46, 138, 229, 0.85)","hsl_parent_dependency":{"h":210,"l":0.54,"s":0.78}}},"gradients":[]},"original":{"colors":{"cff50":{"val":"rgb(0, 178, 255)","hsl":{"h":198,"s":1,"l":0.5}},"a344d":{"val":"rgba(0, 178, 255, 0.85)","hsl_parent_dependency":{"h":198,"s":1,"l":0.5}}},"gradients":[]}}]}__CONFIG_colors_palette__

Get In Touch

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

>