0% found this document useful (0 votes)
26 views

Setting Up Your CL Programming Environment and How To Start Coding CL Programs On The AS/400

This document provides instructions for setting up a CL programming environment on an AS/400 system and coding CL programs. It describes how to create a library for assignments, view objects in libraries, create needed source physical files and members, enter CL source code using SEU, compile members into executable objects, check compilation results, and run programs. It also provides tips on using SEU functions and help.

Uploaded by

Sol Aquino S
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Setting Up Your CL Programming Environment and How To Start Coding CL Programs On The AS/400

This document provides instructions for setting up a CL programming environment on an AS/400 system and coding CL programs. It describes how to create a library for assignments, view objects in libraries, create needed source physical files and members, enter CL source code using SEU, compile members into executable objects, check compilation results, and run programs. It also provides tips on using SEU functions and help.

Uploaded by

Sol Aquino S
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

249308293.

doc
- 1 -
Setting up your CL programming environment and
How to start coding CL programs on the AS/400
A CL program is made up of a group of CL commands that instructs the
system where to get input, how to process it, and where to pace the
resut.
CL programs are compied into e!ecuta"e o"#ects that can "e run "y
simpy caing the e!ecuta"e o"#ect name.
Create the assignment i"rary if re$uired in your assignment. %a&e sure
it is named as specified in the assignment.
From now on the current i"rary or the assignment i"rary wi in this
document "e referred to as the 'L() *for re$uired i"rary+.
Use the dispay i"rary ist command and ,erify that the 'L() is in the
ist and aso the current i"rary. (f it is missing add it to your i"rary ist
and if not the current i"rary ma&e it so.
-se .'/0)123% to ,iew o"#ects in the 'L().
4erify that the physica fie 5CL6'C is present. (f missing create it with
the C'76'C28 command. 7his fie is re$uired to contain your CL2
programs source mem"ers. 5CL6'C is the standard naming con,ention
in the 96:400 word for CL2 source mem"ers. ;ou can in,ent:assign
your own name "ut for this course we wi go with 5CL6'C.
0ption 12 "eside the 5CL6'C fie on the .'/0)123% screen can "e
used to dri down to the indi,idua mem"ers *programs+ in this fie.
9nother way to gain access to your program source is to use the
command 67'23% and dri down to the mem"ers "y using the menu
options pro,ided or "y using the command 67'6<-..
.hen using the editor 6<- to enter source CL programs as mem"ers of
source physica fie 5CL6'C use 84 for the prompts and enter your
i"rary name , the fie name *5CL6'C+ and the source member is the
name of your source program that is "eing created. -se the naming
249308293.doc
- 2 -
con,ention for the program name as specified in the assignment.
;ou must specify the source type CL2 *7he source type for a CL
program+. 7hen press =<>7<'?. <nter CL program source statements on
the 6<- <dit screen dispay. CL program source statements are
indi,idua CL commands that ma&e up a CL program.
<ntering 67'6<- and the =enter? &ey wi return you session to the
same status as your pre,ious 6<- session.
.hen using the dri down method with the 67'23% command you
must use the 8@ function &ey to create a new mem"er in the 5CL6'C
fie.
.hen you ha,e finished entering the CL source statements, press =83?
to e!it. 4erify that the parameter ,aue for change/create member is
A;<6A 2ress =<>7<'?.
9fter creating a source mem"er, you must create an e!ecuta"e o"#ect for
your CL program. -se option 14 "eside the mem"er in the B.or& with
mem"ers using 23%C ist to compie and create the e!ecuta"e o"#ect.
0ther options a,aia"e are
-se option 2 to edit the source.
-se option D to dispay the source
0ther functions a,aia"e to the user are A-6<' 027(0>6A entered in
front of the source mem"er. 7hese can "e used as shortcuts to some CL
commands. 7he foowing are a,aia"e
0ption E 3% to dispay messages. 362%6F
<9 edit o"#ect authority.
<370)19-7 C3 start 38- utiity.
67'38- <3 grant o"#ect
authority. F'70)19-7 1L dispay
#o" og. 36210)L0F .6 wor&
su"mitted #o". .'/6)%10) 62
dispay spoo fies. 36262L8
C ca and e!ecute your program. C9LL
249308293.doc
- 3 -
3ifferent functions are a,aia"e from within the 6<- utiity. 6ome are
8(>3 and '<2L9C<, )rowse, 8(>3 etc. , see the function &eys isted.
6<- hep is a,aia"e through the use of the 81 &ey. 7he cursor position
contros the type of hep.
Command ine hep is a,aia"e "y pacing the cursor on the command
ine and pressing 81.
6ource edit ine hep can "e o"tained "y pacing the cursor on the
se$uence num"er of the source ine and pressing 81
-se the command 362%6F to chec& if your compiation was successfu.
- Compie errorsG
(ssuing the command .'/%)'23% -se option 2 to <3(7 your
source mem"er again
- Compie successfuyG
;ou can run your program using the command C9LL .
HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
Loo& up the 6<-, 23% manuas and "oo&s at www.as400.i"m.com -se
the Library, cic& on Aonine i"raryA where you can choose a anguage. 7he
ne!t step is to oo& for 44'4 "oo&s and manuas. 6earch or ,iew a 44'4
"oo&s and find 2rogram 3e,eopment %anager 7oos such as 6<-, 23%,
38-II
-se the 23% utiity to assist you with most of the programming acti,ities.
-se 362L()L to ,erify that the 'L() i"rary is your i"rary ist. (f it
is missing add it with the 933L()L< command. %a&e the 'L()
i"rary the current i"rary with the CJFC-'L() command. 7he
'L() i"rary name shoud "e as specified in the assignment or your
026400 96:400 -ser (3.
-se 6<- *8@ Create+ to create a mem"er of type CL. (t is ,ery
important that your mem"er "e of type CL *i.e. C0>7'0L
L9>F-9F<+ so the 96:400 can hep you with 7;2< sensiti,e
editing, compiing or running of your programs.

You might also like