Introduction to CL programming - IBM i ( AS400 ) for Beginners

preview_player
Показать описание
This video explains the basic concept of Control Language (CL) programming in IBM i. This video also covers below topics

1. Declaring variable
2. Conditional statement
3. Looping statements
4. Reading Files using open ID
5. MONMSG in CL programming
6. Link to PDF having complete list of CL commands

Рекомендации по теме
Комментарии
Автор

Great tutorial. Keep up the good work.

Here are some basics. Hope it helps someone

Parts of a CL procedure
While each source statement entered as part of a CL procedure is actually a CL command, the source can
be divided into the basic parts that are used in many typical CL procedures.

PGM command
PGM PARM(&A)
Optional PGM command beginning the procedure and identifying any parameters received.

Declare commands
(DCL, DCLF, COPYRIGHT, DCLPRCOPT)
Mandatory declaration of procedure variables when variables are used, and optional definition of
the size of the subroutine stack. The declare commands must precede all other commands except
the PGM command.

CL processing commands
CHGVAR, SNDPGMMSG, OVRDBF, DLTF, ...
CL commands used as source statements to manipulate constants or variables (this is a partial
list).

Logic control commands
IF, THEN, ELSE, DO, ENDDO, DOWHILE, DOUNTIL, DOFOR, LEAVE, ITERATE, GOTO, SELECT,
ENDSELECT, WHEN, OTHERWISE, CALLSUBR, SUBR, RTNSUBR, ENDSUBR
Commands used to control processing within the CL procedure.

Built-in functions
%SUBSTRING (%SST), %SWITCH, %BINARY (%BIN), %ADDRESS (%ADDR), %OFFSET (%OFS)
Built-in functions and operators used in arithmetic, relational or logical expressions.

Program control commands
CALL, RETURN
CL commands used to pass control to other programs.

Procedure control commands
CALLPRC, RETURN
CL commands used to pass control to other procedures.

ENDPGM command
ENDPGM
Optional End Program command.

SureshRamaiyan
Автор

Thank you ! Finally I found the best tutorial to begin with this langage

skidoosbc
Автор

As someone who is learning RPG programming this was very helpful. Thank you!

jasonatrn
Автор

hii yusuf bro.. i have a small issue in this video at 11:34 you created a dowhile loop and when you called it you got the output in a onetime through but if i do the same i am not able to get output like you for me it was like hello yusuf only once and if i press enter it was coming hello yusuf for second time like that ->enter ->3rd time(Hello yusuf) and so on.. what should i do if i want to get the output in a single call of that program

saisriharshaampabathuni
Автор

thank u, all the prog got executed, understandable and easy to remember

fareesashaikh
Автор

excellent yusuf thanks for the greate information keep move on...pleeee update daily

PRAVEENKUMAR-dppn
Автор

Why should we use CL since we have rpgl

tjdevikatjdevika
Автор

Hi it would be nice if you mention what funtion key you use to move from place to place, Thank you

juliobarrios
Автор

Thank you very much for your dedication.

It's an excellent video with a lot of useful instruction.

orlandodeabreu
Автор

Can you share link of 2nd video of this? Btw grt work, it helped me a lot. Thank you

shreyakumari
Автор

HI,

why did u declare command below

DCL VAR(&CHAR) TYPE(*CHAR) LEN(3)

when declaring numbers that which is bigger number ?

RAVIKUMARS-oz
Автор

Hello, could you make a tutorial on PID programming in a programmable logic controller? thanks.

FabianoAlves-srin
Автор

Have you used the more modern approach to coding: IBM Rational Developer?

bobstigler
Автор

hello Yusuf.. please tell how to read bottom to top or how to access last record directly, as You mentioned in your video.

femeenanagpal
Автор

I am reading PF file and have only 2columns
Empcode
Empname
When I want read empcode
Getting error while compiling prrogram. It's say empcode should be char.
Can you help plz

sachinvithubone
Автор

Thank you so much for this wonderful video. This helped me a lot 👏👏

thallapallypavani
Автор

I always get to learn so much from ypur videos. I have a question, in student file(21:41 sec) i have to retrieve &STUdDPT for &STUDNO = 7 (Where STUDNO is key field) and use that &studdpt later in program, can i retrieve it using command RCVF followed by command If &STUDNO = 7 then CHGVAR &DEPT (&STUDDPT) and use &DEPT in program later or I have to use OPNQRYF only.

gitz
Автор

Great video!!! thank you for taking the time to prep it!!!! very helpful!

RitaMaretti
Автор

How to remove the trailing blank spaces of a file filed variable while moving it to another variable?
Tried %Trim, it doesn't work

valprasad
Автор

thank you...it was very helpful...
Please share video of concepts on service programs...

aggrawalnikhil