Sei sulla pagina 1di 34

AS/400 FAQ

1. Explain the concept of ILE?


ILE is a new set of tools and associated system support designed to
e nh an ce p rog ram d e vel op me n t on th e AS /400 syste m. On l y p rog rams
p rod u ce d b y the n e w ILE f amil y of comp i le rs can exp l oi t the cap ab i l i ti e s
of this new model. That family includes ILE RPG/400*, ILE COBOL/400*,
ILE C/400*, and ILE CL.
I L E o ff e r s n u m e r o u s b e n e fi t s o v e r p r e v i o u s p r o g r a m m o d e l s . T h o s e
b e n e fi t s i n c l u d e b i n d i n g , m o d u l a r i t y , r e u s a b l e c o m p o n e n t s , c o m m o n r u n t i m e s e r v i c e s , c o e x i s t e n c e , a n d a s o u r c e d e b u g g e r. T h e y a l s o i n c l u d e
b e tte r con trol ove r re sou rce s, b e tte r con trol ove r l an g u ag e in te racti on s,
b e tte r cod e op ti mi z ati on , a b e tte r e n vi ron me n t f or C, an d a f ou n d ati on
f or the f u tu re .
2. How many types of specs are there in RPG4 & ILE RPG?

T h e R P G / 4 0 0 S p e c i fi c a t i o n s

T h e r e a r e s e v e n k i n d s o f R P G / 4 0 0 s p e c i fi c a t i o n s . W h e n y o u r
s o u r c e p r o g r a m i s c o m p i l e d , t h e s e s p e c i fi c a t i o n s m u s t b e i n t h e
following sequence:
H - C o n t r o l s p e c i fi c a t i o n s
F- F i l e d e s c r i p t i o n s p e c i fi c a t i o n s
E - E x t e n s i o n s p e c i fi c a t i o n s
L- L i n e c o u n t e r s p e c i fi c a t i o n s
I - I n p u t s p e c i fi c a t i o n s
C - C a l c u l a t i o n s p e c i fi c a t i o n s
O - O u t p u t s p e c i fi c a t i o n s .
R P G / 4 0 0 p r o g r a m s d o n o t h a v e t o u s e a l l s p e c i fi c a t i o n s . A t y p i c a l
p r o g r a m m a y u s e fi l e d e s c r i p t i o n , i n p u t , c a l c u l a t i o n , a n d o u t p u t
s p e c i fi c a t i o n s .
1.

H -T h e C o n t r o l S p e c i fi c a t i o n
T h e c o n t r o l s p e c i fi c a t i o n p r o v i d e s t h e R P G / 4 0 0 c o m p i l e r w i t h
i nf ormati on ab ou t you r p rog ram an d you r syste m. Th i s in cl u d e s:
Name of the p rog ra m
D ate f ormat f or the p rog ram
I f a n a l t e r n a t i v e c o l l a t i n g s e q u e n c e o r fi l e t r a n s l a t i o n i s u s e d .
N o t e : T h e c o n t r o l s p e c i fi c a t i o n i s o p t i o n a l .
2.

F- F i l e D e s c r i p t i o n S p e c i fi c a t i o n s
Fi l e d e s c r i p t i o n s p e c i fi c a t i o n s d e s c r i b e a l l t h e fi l e s t h a t y o u r
p r o g r a m u s e s . T h e i n f o r m a t i o n f o r e a c h fi l e i n c l u d e s :

Page 1

N a m e o f t h e fi l e
H o w t h e fi l e i s u s e d
S i z e o f r e c o r d s i n t h e fi l e

Prasanth A

AS/400 FAQ

3.

I n p u t o r o u t p u t d e v i c e u s e d f o r t h e fi l e i f t h e fi l e i s
c o n d i t i o n e d b y a n e x t e r n a l i n d i c a t o r.
E - E x t e n s i o n S p e c i fi c a t i o n s

E x t e n s i o n s p e c i fi c a t i o n s d e s c r i b e a l l r e c o r d a d d r e s s fi l e s ,
t a b l e fi l e s , a n d a r r a y fi l e s u s e d i n t h e p r o g r a m . T h e i n f o r m a t i o n
includes:

4.

N a m e o f t h e fi l e , t a b l e , o r a r r a y
Nu mb e r of e n trie s in a tab l e or array i np u t re cord
Number of entries in a table or array
L e n g t h o f t h e t a b l e o r a r r a y e n t r y.
L - L i n e C o u n t e r S p e c i fi c a t i o n s

L i n e c o u n t e r s p e c i fi c a t i o n s d e s c r i b e t h e p a g e o r f o r m o n w h i c h
output is printed. The information includes:

5.

Number of lines per page


L i n e o f t h e p a g e w h e r e o v e r fl o w o c c u r s .
I - I n p u t S p e c i fi c a t i o n s

I n p u t s p e c i fi c a t i o n s d e s c r i b e t h e r e c o r d s , fi e l d s , d a t a
stru ctu re s an d n ame d con - stan ts u se d b y the p rog ra m. Th e
i n f o r m a t i o n i n t h e i n p u t s p e c i fi c a t i o n s i n c l u d e s :

6.

N a m e o f t h e fi l e
S e qu e n ce of re cord typ e s
W he th e r re cord - i de n ti fyi n g in d i cators, con trol - le vel i n di cator s,
fi e l d - r e c o r d - r e l a t i o n i n d i c a t o r s , o r fi e l d i n d i c a t o r s a r e u s e d
W h e t h e r d a t a s t r u c t u r e s , l o o k a h e a d fi e l d s , r e c o r d
i d e n t i fi c a t i o n c o d e s , o r m a t c h fi e l d s a r e u s e d
Ty p e o f e a c h fi e l d ( a l p h a n u m e r i c o r n u m e r i c ; p a c k e d - d e c i m a l ,
zoned-decimal, or binary format)
L o c a t i o n o f e a c h fi e l d i n t h e r e c o r d
N a m e o f e a c h fi e l d i n t h e r e c o r d
Named constants.
C - C a l c u l a t i o n S p e c i fi c a t i o n s

C a l c u l a t i o n s p e c i fi c a t i o n s d e s c r i b e t h e c a l c u l a t i o n s t o b e
done on the data and the order of the calculations. Calculation
s p e c i fi c a t i o n s c a n a l s o b e u s e d t o c o n t r o l c e r t a i n i n p u t a n d
output operations. The information includes:

Page 2

Con trol - le vel an d con d i ti on i ng i n di cator s f or th e op e rati on


s p e c i fi e d

Prasanth A

AS/400 FAQ

7.

Fi e l d s o r c o n s t a n t s t o b e u s e d i n t h e o p e r a t i o n
Th e op e rati on to be p roce s se d
W he th e r re su l ti n g in d i cators are se t afte r the op e rati on i s
p roce s se d .
O - O u t p u t S p e c i fi c a t i o n s

O u t p u t s p e c i fi c a t i o n s d e s c r i b e t h e r e c o r d s a n d fi e l d s i n t h e
o u t p u t fi l e s a n d t h e c o n - d i t i o n s u n d e r w h i c h o u t p u t o p e r a t i o n s a r e
p roce s se d . The i nf ormati on i n clu d e s:
N a m e o f t h e fi l e
Ty p e o f r e c o r d t o b e w r i t t e n
S p a c i n g a n d s k i p p i n g i n s t r u c t i o n s f o r P R I N T E R fi l e s
O u tpu t in di cator s th at con d i ti on wh e n the re cord i s to b e
written
N a m e o f e a c h fi e l d i n t h e o u t p u t r e c o r d
L o c a t i o n o f e a c h fi e l d i n t h e o u t p u t r e c o r d
Edit codes and edit words
Constants to be written
Fo r m a t n a m e f o r a W O R K S T N fi l e .

T H E I L E R P G S p e c i fi c a t i o n s
Main source section:
1 . H - C o n t ro l s p e c i fi c a t i o n s p r o v i d e t h e c o m p i l e r w i t h i n f o r m a t i o n
ab ou t ge n e rati n g an d run n i ng p rog ra ms, su ch as th e p rog ram
name, date format, and use of alternate collating sequence or
fi l e t r a n s l a t i o n .
2 . F - Fi l e d e s c r i p t i o n s p e c i fi c a t i o n s d e s c r i b e a l l t h e fi l e s t h a t y o u r
p rog ram u se s.
3 . D - D e fi n i t i o n s p e c i fi c a t i o n s d e s c r i b e t h e d a t a u s e d b y t h e
p rog ram.
4 . I - I n p u t s p e c i fi c a t i o n s d e s c r i b e t h e i n p u t r e c o r d s a n d fi e l d s u s e d
by the
Prog r am.
5 . C - C a l c u l a t i o n s p e c i fi c a t i o n s d e s c r i b e t h e c a l c u l a t i o n s d o n e o n
the data and the order of the calculations. Calculation
s p e c i fi c a t i o n s a l s o c o n t r o l c e r t a i n i n p u t a n d o u t p u t o p e r a t i o n s .

6 . O - O u t p u t s p e c i fi c a t i o n s d e s c r i b e t h e o u t p u t re c o rd s a n d
fi e l d s u s e d b y t h e p ro g r a m .
Sub procedure section:

Page 3

Prasanth A

AS/400 FAQ
1 . P- P ro c e d u re s p e c i fi c a t i o n s m a r k t h e b e g i n n i n g a n d e n d o f t h e
su b p roce d u re , i n di cate th e sub p roce d u re n ame , an d wh e th e r i t
is exported.
2 . D - D e fi n i t i o n s p e c i fi c a t i o n s d e s c r i b e t h e l o c a l d a t a u s e d b y t h e
su b - p roce d u re .
3 . C - C a l c u l a t i o n s p e c i fi c a t i o n s d e s c r i b e t h e c a l c u l a t i o n s d o n e o n
both the global and local data and the order of the calculations.
3. What do you mean by Severity level?
S e ve ri ty le vel Con trol s th e cre ati on of th e p rog ram obj e ct. The
p rog ram ob je ct i s cre ate d i f al l e rrors en cou n te re d du ri n g comp i l ati on
have a severity level less than or equal to the generation severity
l e v e l s p e c i fi e d . T h e v a l u e m u s t b e b e t w e e n 0 a n d 2 0 i n c l u s i v e . Fo r
e rrors g re ate r th an se ve ri ty 20, the p rog ram ob je ct wil l n ot b e
generated.
4. What is RPG program cycle?

W h e n a s y s t e m p ro c e s s e s d a t a , i t m u s t d o t h e p ro c e s s i n g i n a
p a r t i c u l a r o rd e r. T h i s l o g i c a l o rd e r i s p ro v i d e d b y:

The ILE RPG compiler


T h e p ro g r a m c o d e

T h e l o g i c t h e c o m p i l e r s u p p l i e s i s c a l l e d t h e p ro g r a m c y c l e . W h e n
y o u l e t t h e c o m p i l e r p ro v i d e t h e l o g i c f o r y o u r p ro g r a m s , i t i s c a l l e d
c y c l e p ro g r a m m i n g . T h e p ro g r a m c y c l e i s a s e r i e s o f s t e p s t h a t y o u r
p ro g r a m re p e a t s u n t i l a n e n d - o f- fi l e c o n d i t i o n i s re a c h e d . D e p e n d i n g
o n t h e s p e c i fi c a t i o n s y o u c o d e , t h e p ro g r a m m a y o r m a y n o t u s e
each step in the cycle.
5 . W h a t i s a S u b fi l e ?
A s u b fi l e i s a g r o u p o f r e c o r d s w i t h t h e s a m e r e c o r d n a m e . T h e g r o u p i s
r e a d f r o m a n d w r i t t e n t o a d i s p l a y d e v i c e i n o n e o p e r a t i o n . A s u b fi l e
c o n s i s t s o f a s u b fi l e r e c o r d a n d a s u b fi l e c o n t r o l r e c o r d .
A s u b fi l e r e c o r d :

S el e ct s key w o rd s t o p ro ce s s th e d at a
D e fi n e s fi e l d s

A s u b fi l e c o n t r o l r e c o r d d e fi n e s :

Page 4

S i z e o f t h e s u b fi l e
User messages
C o n t ro l ke y s t h at t h e u s e r can u se w h e n lo o k i n g at t h e di s p l ay

Prasanth A

AS/400 FAQ

Fi xe d p o r t i o n s o f t h e d i s p l a y

6. What is the use of SFLRNA?


U s e t h i s r e c o r d - l e v e l k e y w o r d w i t h t h e S F L I N Z ke y w o r d o n t h e s u b fi l e
c o n t r o l r e c o r d f o r m a t s o t h a t y o u r p r o g r a m c a n i n i t i a l i z e a s u b fi l e w i t h
n o a c t i v e r e c o r d s . To d o t h i s , y o u r p r o g r a m s e n d s a n o u t p u t o p e r a t i o n t o
t h e s u b fi l e c o n t r o l r e c o r d f o r m a t w i t h t h e S F L I N Z ke y w o r d s e l e c t e d . T h e
s u b fi l e i t s e l f b e c o m e s a c t i v e . S u b fi l e r e c o r d s a r e n o t c o n s i d e r e d a c t i v e
unless one of the following occurs:

Yo u r p r o g r a m s e n d s a n o u t p u t o p e r a t i o n t o t h e s u b fi l e r e c o r d
f o r m a t , p l a c i n g d a t a i n o n e o f t h e s u b fi l e r e c o r d s . T h e s u b fi l e
re cord be come s acti ve bu t i s n ot con si d e re d ch an g e d un le ss th e
S F L N X TC H G ke y w o r d i s a l s o i n e ff e c t .

Af t e r y o u r p r o g r a m d i s p l a y s t h e s u b fi l e , t h e w o r k s t a t i o n u s e r
k e y s d a t a i n t o s u b fi l e r e c o r d s . T h e r e c o r d s k e y e d i n b e c o m e
active and changed.

7. What is the use of SFLNXTCHG? Where do you declare it?


U s e t h i s r e c o r d - l e v e l k e y w o r d o n t h e s u b fi l e r e c o r d f o r m a t t o f o r c e
t h e w o r k s t a t i o n u s e r t o c o r r e c t p r o g r a m - d e t e c t e d k e y i n g e r r o r s i n s u b fi l e
re cord s th at h ave b e en re ad b y th e p rog ram. It d oe s th i s b y cau si n g a
re cord to b e ch an g ed so th at a g e t- n ext- ch an g ed op e rati on mu st re ad
th e re cord as d e scri b e d in the f ol l owin g se cti on .
8 . W h a t a r e t h e m a n d a t o r y k e y w o r d s o f a S u b fi l e ?

SFL
SFLCTL
SFLDSP
SFLSIZ
S F L PA G

9 . E x p l a i n t h e d i ff e r e n t t y p e s o f a S u b fi l e ?

Page 5

SFL
SFLMSG
WDWSFL
PDNSFL

Prasanth A

AS/400 FAQ
1 0 . W h a t i s a l o g i c a l fi l e ? W h a t i s i t s u s a g e ?
A l o g i c a l fi l e d e t e r m i n e s h o w d a t a r e c o r d s a r e s e l e c t e d a n d
d e fi n e d w h e n r e a d b y a n a p p l i c a t i o n p r o g r a m . A l o g i c a l fi l e c a n b e a
s i m p l e , m u l t i p l e f o r m a t , o r j o i n l o g i c a l fi l e . A s i m p l e l o g i c a l fi l e
c o n t a i n s o n e r e c o r d f o r m a t a n d h a s o n e fi l e s p e c i fi e d o n t h e P F I L E
k e y w o r d . A m u l t i p l e f o r m a t l o g i c a l fi l e e i t h e r c o n t a i n s m o r e t h a n o n e
r e c o r d f o r m a t o r h a s m o r e t h a n o n e fi l e s p e c i fi e d o n t h e P F I L E
k e y w o r d . A j o i n l o g i c a l fi l e c o n t a i n s o n e r e c o r d f o r m a t a n d h a s u p t o
3 2 fi l e s s p e c i fi e d o n t h e J F I L E k e y w o r d .
1 1 . H o w l o g i c a l fi l e s a r e d i ff e r e n t f o r m p h y s i c a l fi l e s ?
P h y s i c a l fi l e s c o n t a i n t h e a c t u a l d a t a b u t l o g i c a l fi l e c o n t a i n s o n l y
the view of the data.
L o g i c a l fi l e s c a n h a v e m o r e t h e n o n e r e c o r d f o r m a t , b u t p h y s i c a l
fi l e s c a n h a v e o n l y o n e r e c o r d f o r m a t .
U s i n g L o g i c a l fi l e w e c a n j o i n o n e o r m o r e p h y s i c a l fi l e s .
U s i n g l o g i c a l fi l e w e c a n r e s t r i c t t h e v i e w fi e l d s .
U s i n g l o g i c a l fi l e w e c a n r e s t r i c t t h e v i e w o f r e c o r d s b y S E L E C T a n d
O M I T Ke y w o r d
12. Explain the feature of JLF?
J o i n l o g i c a l fi l e s c o m b i n e d i ff e r e n t fi e l d s f r o m m o r e t h a n o n e
p h y s i c a l fi l e i n t o a s i n g l e r e c o r d . Yo u m u s t s p e c i f y t h e J F I L E ke y w o r d
a t t h e r e c o r d l e v e l f o r j o i n l o g i c a l fi l e s . S p e c i f y t h e e n t r i e s i n t h e
f o l l o w i n g o r d e r t o d e fi n e a j o i n l o g i c a l fi l e :
1.
2.
3.
4.
5.
6.

Fi l e - l e v e l e n t r i e s ( o p t i o n a l )
Re c o r d - l e v e l e n t r i e s
Join-level entries
Fi e l d - l e v e l e n t r i e s
Ke y fi e l d - l e v e l e n t r i e s ( o p t i o n a l )
S e l e c t / o m i t - fi e l d l e v e l e n t r i e s ( o p t i o n a l )

B e c a u s e o n l y o n e r e c o r d f o r m a t i s a l l o w e d i n a j o i n l o g i c a l fi l e ,
specify these entries only once.
13. How do you handle Inter process communication in AS/400?
Pa r a m e t e r s
Data Queue
D ata Are a

14. What is a data queue? What is a message queue?


Dat a q ue ue s are a type of syste m ob j e ct th at you can cre ate , to wh i ch
one HLL

Page 6

Prasanth A

AS/400 FAQ
Pro ce d u re or p rog ram can se n d d ata, an d f rom wh i ch an oth e r H LL
p roce d u re or
Prog r am can re ce i ve d ata. Th e re ce i vi n g p rog ram can b e al re ad y wai ti n g
for the
d a t a , o r c a n r e c e i v e t h e d a t a l a t e r.
Th e ad van tag e s of u sin g d ata q ue u e s are :

U sin g d ata q ue u e s f re e s a j ob f rom pe rf ormi n g some work . If th e job


i s an i n te racti ve j ob , thi s can p rovi d e be tte r re sp on se ti me an d
d e cre ase th e siz e of th e in te racti ve p rog ram an d i ts p roce s s acce ss
g r o u p ( PA G ) . T h i s , i n t u r n , c a n h e l p o v e r a l l s y s t e m p e r f o r m a n c e . Fo r
example, if several work station users enter a transaction that
i n v o l v e s u p d a t i n g a n d a d d i n g t o s e v e r a l fi l e s , t h e s y s t e m c a n
p e rf orm be tte r i f the i n te racti ve j ob s su b mi t th e re q ue st f or th e
tran sa cti on to a si ng l e b atch p roce s si n g j ob .

D ata q ue u e s are the f aste st me an s of asyn ch ron ou s commu n i cati on


b e twee n two job s. Usi n g a d ata qu e u e to se n d an d re ce i ve d ata
r e q u i r e s l e s s o v e r h e a d t h a n u s i n g d a t a b a s e fi l e s , m e s s a g e q u e u e s ,
or d ata are as to se nd an d re ce i ve d ata.

Yo u c a n s e n d t o , r e c e i v e f r o m , a n d r e t r i e v e a d e s c r i p t i o n o f a d a t a
q u e u e i n a n y H L L p r o c e d u r e o r p r o g r a m b y c a l l i n g t h e Q S N D D TA Q ,
Q RC V D TA Q , Q M H R D Q M , Q C L R D TA Q , a n d Q M H Q R D Q D p r o g r a m s
wi th ou t exi ti n g the H LL p roce d u re or p rog ra m or cal li n g a CL
p roce d u re or p rog ram to se n d , re ce i ve , cl e ar, or re tri e ve the
description.

W he n re ce i vi n g d ata f rom a d ata qu e u e , you can se t a ti me ou t


such that the job waits until an entry arrives on the data queue.
T h i s d i ff e r s f r o m u s i n g t h e E O F D LY p a r a m e t e r o n t h e O V R D B F
command, which causes the job to be activated whenever the delay
time ends.

More th an on e j ob can re ce i ve d ata f rom th e same d ata q ue u e . Thi s


has an
ad van tag e in ce rtai n ap pl i cati on s whe re the n u mb e r of en tri e s to be
p roce s se d i s g re ate r th an on e j ob can h and l e wi th in th e d e si re d
p e r f o r m a n c e r e s t r a i n t s . Fo r e x a m p l e , i f s e v e r a l p r i n t e r s a r e
available to print orders, several interactive jobs could send
re q u e sts to a sin g l e d ata q u eu e . A se p arate j ob f or e ach p ri n te r
c o u l d r e c e i v e f r o m t h e d a t a q u e u e , e i t h e r i n fi r s t - i n - fi r s t - o u t ( F I F O ) ,
l a s t - i n - fi r s t - o u t ( L I F O ) , o r i n ke y e d - q u e u e o r d e r.

Data queues
being placed
queue which
q u a l i fi e d j o b

have the ability to attach a sender ID to each message


on the queue. The sender ID, an attribute of the data
is e stab l i sh e d wh e n the q u eu e i s cre ate d , con tai n s the
n a m e a n d c u r r e n t u s e r p r o fi l e .

1 5 . H o w a d a t a q u e u e i s d i ff e r e n t f o r m a m e s s a g e q u e u e ?

Page 7

Prasanth A

AS/400 FAQ
D ata q ue u e s are si mil ar to me ssag e qu e ue s, in th at p roce d u re s
an d p rog ram s can se n d d ata to the q u eu e th at i s re ce i ved l ate r b y
an oth e r p roce d u re or p rog ra m. H owe ve r, more th an on e p rog ram can
h ave a re ce i ve pe n di n g on a d ata q ue u e at th e same ti me , wh il e onl y one
p rog ram can h ave a re ce i ve pe n d in g on a me ssag e q ue u e at th e same
ti me . (O n l y on e p rog ram re ce i ve s an en try f rom a d ata q ue u e , eve n if
more th an on e p rog ram i s wai ti n g .) En tri e s on a d ata qu e ue are h an dl e d
i n e i t h e r fi r s t - i n - fi r s t - o u t , l a s t - i n - fi r s t - o u t , o r k e y e d - q u e u e o r d e r. W h e n
an e n try i s re ce i ve d , i t i s re move d f rom th e d ata qu e u e .
1 6 . W h a t i s t h e d i ff e r e n c e b e t w e e n D a t a Q u e u e a n d D a t a b a s e F i l e s
?
T h e f o l l o w i n g d e s c r i b e s t h e d i ff e r e n c e s b e t w e e n u s i n g d a t a
q u e u e s a n d d a t a b a s e fi l e s :

D ata q ue u e s h ave be e n i mp rove d to commu n i cate be twe en acti ve


p roce d u re s an d p rog rams, n ot to store l arg e volu me s of d ata or
l a r g e n u m b e r s o f e n t r i e s . Fo r t h e s e p u r p o s e s , u s e d a t a b a s e fi l e s a s
queues.
D a t a q u e u e s s h o u l d n o t b e u s e d f o r l o n g - t e r m s t o r a g e o f d a t a . Fo r
t h i s p u r p o s e , y o u s h o u l d u s e d a t a b a s e fi l e s .
W he n u si ng d ata q u eu e s, you sh ou l d i n cl u d e ab n ormal e n d rou ti n e s
i n you r p rog ram s to re cove r an y e n trie s n ot ye t comp l e tel y
p roce s se d be f ore the syste m i s en d e d .
It is good practice to periodically (such as once a day) delete and
r e - c r e a t e a d a t a q u e u e a t a s a f e p o i n t . Pe r f o r m a n c e c a n b e a ff e c t e d
i f t o o m a n y e n t r i e s e x i s t w i t h o u t b e i n g r e m o v e d . Re - c r e a t i n g t h e
d ata q ue u e pe ri od i cal l y wil l re tu rn th e d ata qu e ue to i ts op ti mal
size.

1 7 . W h a t a r e t h e d i ff e r e n t t y p e s o f m e s s a g e s ?

Informational
Inquiry
Completion
Diagnostic
Re q u e s t
Escape
Status
Notify

1 8 . W h a t i s a s o u r c e p h y s i c a l fi l e ?
A s o u r c e fi l e i s u s e d w h e n a c o m m a n d a l o n e c a n n o t s u p p l y
s u ffi c i e n t
i nf ormati on f or cre ati n g an obj e ct. It con tai n s i np u t (sou rce ) d ata
n e e d e d t o c r e a t e s o m e t y p e s o f o b j e c t s . Fo r e x a m p l e , t o c r e a t e a
c o n t r o l l a n g u a g e ( C L ) p r o g r a m , y o u m u s t u s e a s o u r c e fi l e c o n t a i n i n g

Page 8

Prasanth A

AS/400 FAQ
s o u r c e s t a t e m e n t s , w h i c h a r e i n t h e f o r m o f c o m m a n d s . To c r e a t e a
l o g i c a l fi l e , y o u m u s t u s e a s o u r c e fi l e c o n t a i n i n g D D S .
A s o u r c e fi l e c o n t a i n s u n - c o m p i l e d p r o g r a m m i n g c o d e a n d i n p u t
d a t a n e e d e d t o c r e a t e s o m e t y p e s o f o b j e c t s . A s o u r c e fi l e c a n
con tai n sou rce state me n ts f or su ch ite ms as h i gh - le ve l l an g u ag e
p r o g r a m s a n d d a t a d e s c r i p t i o n s p e c i fi c a t i o n s . A s o u r c e fi l e c a n b e a
s o u r c e p h y s i c a l fi l e , d i s ke t t e fi l e , t a p e fi l e , o r i n l i n e d a t a fi l e .
19. What is a library?
A li b rary i s an ob je ct th at i s u se d to g rou p re l ate d ob j e cts, an d
t o fi n d o b j e c t s b y n a m e w h e n t h e y a r e u s e d . T h u s , a l i b r a r y i s a
d i r e c t o r y t o a g r o u p o f o b j e c t s . Yo u c a n u s e l i b r a r i e s t o g r o u p t h e
o b j e c t s i n t o a n y m e a n i n g f u l c o l l e c t i o n . Fo r e x a m p l e , y o u c a n g r o u p
o b j e ct s acco rd i n g t o s e cu r i t y re q ui re m e n t s , b acku p re q u i re m e n t s , o r
p roce s si n g re q u i re me n ts. Th e amou n t of avai l ab le storag e l i mi ts the
number of objects that a library can contain, and the number of
libraries on the system.
Th e ob je ct g rou p i n g pe rf orme d b y l ib rari e s i s a l og i cal
g rou p i n g . W he n a l ib rary i s cre ate d , you can sp e ci fy in to whi ch u se r
au xi li ary storag e p ool (AS P) th e li b rary sh ou l d be cre ate d . Al l obj e cts
c r e a t e d i n t o t h e l i b r a r y a r e c r e a t e d i n t o t h e s a m e A S P a s t h e l i b r a r y.
O bj e cts in a li b rary are n ot ne ce ssari l y p h ysi cal l y ad j ace n t to e ach
o t h e r. T h e s i z e o f a l i b r a r y , o r o f a n y o t h e r o b j e c t , i s n o t r e s t r i c t e d
by the amount of adjacent space available in storage. The system
fi n d s t h e n e c e s s a r y s t o r a g e f o r o b j e c t s a s t h e y a r e s t o r e d i n t h e
system.
Most typ e s of ob j e cts are pl ace d i n a l ib rary wh en th e y are
c r e a t e d . T h e A U T p a r a m e t e r o n C RT L I B d e fi n e s t h e p u b l i c a u t h o r i t y o f
t h e l i b r a r y. T h e C RTA U T p a r a m e t e r s p e c i fi e s t h e d e f a u l t a u t h o r i t y f o r
o b j e c t s t h a t a r e c r e a t e d i n t o t h e l i b r a r y. I f t h e c o m m a n d c r e a t i n g t h e
o b j e c t s p e c i fi e s * L I B C RTAU T f o r t h e A U T p a r a m e t e r , t h e o b j e c t s
p u b l i c a u t h o r i t y i s t h e c r e a t e a u t h o r i t y t h a t w a s s p e c i fi e d f o r t h e
l i b r a r y. Yo u c a n m o v e m o s t o b j e c t t y p e s f r o m o n e l i b r a r y t o a n o t h e r ,
b u t a si n g le ob j e ct can n ot b e in more th an on e li b rary at th e same
t i m e . W h e n y o u m o v e a n o b j e c t t o a d i ff e r e n t l i b r a r y , t h e o b j e c t i s
n o t m o v e d i n s t o r a g e . Yo u n o w l o c a t e t h e o b j e c t t h r o u g h t h e n e w
l i b r a r y. Yo u c a n a l s o r e n a m e a n d c o p y m o s t o b j e c t t y p e s f r o m o n e
l i b r a r y i n t o a n o t h e r.
A li b rary n ame can b e u se d to p rovi d e an oth e r l e ve l of
i d e n t i fi c a t i o n t o t h e n a m e o f a n o b j e c t . A s d e s c r i b e d e a r l i e r , a n
o b j e c t i s i d e n t i fi e d b y i t s n a m e a n d i t s t y p e . T h e n a m e o f t h e l i b r a r y
f u r t h e r q u a l i fi e s t h e o b j e c t n a m e . T h e c o m b i n a t i o n o f a n o b j e c t n a m e
a n d t h e l i b r a r y n a m e i s c a l l e d t h e q u a l i fi e d n a m e o f t h e o b j e c t . T h e
q u a l i fi e d n a m e t e l l s t h e s y s t e m t h e n a m e o f t h e o b j e c t a n d t h e
library it is in.
2 0 . E x p l a i n s o m e fi l e o p e r a t i o n s i n R P G ?
T h e fi l e o p e r a t i o n c o d e s a r e :
1. ACQ (Acq u i re ) :T h e A C Q o p e r a t i o n a c q u i r e s t h e p r o g r a m d e v i c e s p e c i fi e d i n
f a c t o r 1 f o r t h e W O R K S T N fi l e s p e c i fi e d i n f a c t o r 2 . I f t h e d e v i c e i s

Page 9

Prasanth A

AS/400 FAQ
a v a i l a b l e , A C Q a t t a c h e s i t t o t h e fi l e . I f i t i s n o t a v a i l a b l e o r i s a l r e a d y
a t t a c h e d t o t h e fi l e , a n e r r o r o c c u r s . I f a n i n d i c a t o r i s s p e c i fi e d i n
positions 56 and 57, the indicator is set on. If no indicator is
s p e c i fi e d , b u t t h e I N F S R s u b r o u t i n e i s s p e c i fi e d , t h e I N F S R r e c e i v e s
con trol whe n an e rror/exce p ti on occu rs. If n o i nd i cator or INFS R
s u b r o u t i n e i s s p e c i fi e d , t h e d e f a u l t e r r o r / e x c e p t i o n h a n d l e r r e c e i v e s
con trol whe n an e rror/exce p ti on occu rs.
2 . C H A I N ( R a n d o m Re t r i e v a l f r o m a Fi l e ) : Th e CH AIN op e rati on re tri e ve s a re cord f rom a f ul l p roce d u ral
fi l e ( F i n p o s i t i o n 1 6 o f t h e fi l e d e s c r i p t i o n s p e c i fi c a t i o n s ) , s e t s a
r e c o r d i d e n t i f y i n g i n d i c a t o r o n ( i f s p e c i fi e d o n t h e i n p u t
s p e c i fi c a t i o n s ) , a n d p l a c e s t h e d a t a f r o m t h e r e c o r d i n t o t h e i n p u t
fi e l d s .
Fa c t o r 1 , t h e s e a r c h a r g u m e n t , m u s t c o n t a i n t h e ke y o r
r e l a t i v e r e c o r d n u m b e r u s e d t o r e t r i e v e t h e r e c o r d . I f a c c e s s i s b y ke y ,
f a c t o r 1 c a n b e a fi e l d n a m e , a n a m e d c o n s t a n t , a fi g u r a t i v e c o n s t a n t ,
o r a l i t e r a l . I n a d d i t i o n , a K L I S T ( D e fi n e a C o m p o s i t e Ke y ) n a m e c a n
b e s p e c i fi e d i n f a c t o r 1 f o r a n e x t e r n a l l y d e s c r i b e d fi l e . I f a c c e s s i s b y
re l ati ve re cord nu mb e r, f actor 1 mu st con tai n an in te ge r li te ral or a
n u m e r i c fi e l d w i t h z e r o d e c i m a l p o s i t i o n s .
Fa c t o r 2 s p e c i fi e s t h e fi l e o r r e c o r d f o r m a t n a m e t h a t i s t o b e
r e a d . A r e c o r d f o r m a t n a m e i s v a l i d w i t h a n e x t e r n a l l y d e s c r i b e d fi l e .
I f f a c t o r 2 i s a fi l e n a m e a n d a c c e s s i s b y k e y , t h e C H A I N o p e r a t i o n
r e t r i e v e s t h e fi r s t r e c o r d t h a t m a t c h e s t h e s e a r c h a r g u m e n t .
3 . C LO S E ( C l o s e Fi l e s ) : T h e e x p l i c i t C LO S E o p e r a t i o n c l o s e s o n e o r m o r e fi l e s o r
d e v i c e s a n d d i s c o n n e c t s t h e m f r o m t h e p r o g r a m . T h e fi l e c a n n o t b e
u se d ag ai n in th e p rog ram u n le ss you sp e ci fy an expl i ci t O PE N f or th at
fi l e . A C LO S E o p e r a t i o n t o a n a l r e a d y c l o s e d fi l e d o e s n o t p r o d u c e a n
e r r o r. Fa c t o r 2 n a m e s t h e fi l e t o b e c l o s e d . Yo u c a n s p e c i f y t h e
k e y w o r d * A L L i n f a c t o r 2 t o c l o s e a l l t h e fi l e s a t o n c e . Yo u c a n n o t
s p e c i f y a n a r r a y o r t a b l e fi l e ( i d e n t i fi e d b y a T i n p o s i t i o n 1 6 o f t h e
fi l e d e s c r i p t i o n s p e c i fi c a t i o n s ) i n f a c t o r 2 .
4. COMIT (Commit) :The COMIT operation:

M a k e s a l l t h e c h a n g e s t o y o u r fi l e s t h a t h a v e b e e n
s p e c i fi e d i n o u t p u t o p e r a t i o n s s i n c e t h e p r e v i o u s C O M I T o r
R O L B K ( Ro l l B a c k ) o p e r a t i o n ( o r s i n c e t h e b e g i n n i n g o f
op e rati on s un d e r commi tme n t con trol i f the re h as b ee n n o
p re vi ou s CO MIT or RO LBK op e rati on ).

Re l e a s e s a l l t h e r e c o r d l o c k s f o r fi l e s y o u h a v e u n d e r
commi tme n t con trol .
T h e fi l e c h a n g e s a n d t h e r e c o r d - l o c k r e l e a s e s a p p l y t o a l l t h e
fi l e s y o u h a v e u n d e r c o m m i t m e n t c o n t r o l , w h e t h e r t h e c h a n g e s h a v e
b ee n re q u e ste d b y the p rog ra m i ssu in g th e CO MIT op e rati on , or b y
an oth e r p rog ram i n the same rou ti n g ste p . Th e p rog ram i ssu i ng th e

Page 10

Prasanth A

AS/400 FAQ
C O M I T o p e r a t i o n d o e s n o t n e e d t o h a v e a n y fi l e s u n d e r c o m m i t - m e n t
c o n t r o l . T h e C O M I T o p e r a t i o n d o e s n o t c h a n g e t h e fi l e p o s i t i o n .
5 . D E L E T E ( D e l e t e Re c o r d )
T h e D E L E T E o p e r a t i o n d e l e t e s a r e c o r d f r o m a d a t a b a s e fi l e .
T h e fi l e m u s t b e a n u p d a t e fi l e ( i d e n t i fi e d b y a U i n p o s i t i o n 1 5 . o f t h e
fi l e d e s c r i p t i o n s p e c i fi c a t i o n s ) T h e d e l e t e d r e c o r d c a n n e v e r b e
re tri e ve d .
If factor 1 contains no entry, the DELET operation deletes the
cu rre n t re cord (th e l ast re cord re tri e ve d ). The re cord mu st h ave b ee n
l o cke d b y a p re v i o u s in p u t o p e r at i o n ( f o r ex am p l e , CH A IN o r RE A D ) .
Fa c t o r 1 , t h e s e a r c h a r g u m e n t , c a n c o n t a i n a ke y o r r e l a t i v e r e c o r d
n u m b e r t h a t i d e n t i fi e s t h e r e c o r d t o b e d e l e t e d . I f a c c e s s i s b y k e y ,
f a c t o r 1 c a n b e a fi e l d n a m e , a n a m e d c o n s t a n t , o r a l i t e r a l . I n
a d d i t i o n , a K L I S T n a m e c a n b e s p e c i fi e d i n
f a c t o r 1 f o r a n e x t e r n a l l y d e s c r i b e d fi l e . I f d u p l i c a t e r e c o r d s
e x i s t f o r t h e k e y , o n l y t h e fi r s t o f t h e d u p l i c a t e r e c o r d s i s d e l e t e d
f r o m t h e fi l e . I f a c c e s s i s b y r e l a t i v e r e c o r d n u m b e r , f a c t o r 1 m u s t
c o n t a i n a n i n t e g e r l i t e r a l o r a n u m e r i c fi e l d w i t h z e r o d e c i m a l
positions.
Fa c t o r 2 m u s t c o n t a i n t h e n a m e o f t h e u p d a t e fi l e o r t h e n a m e
o f a r e c o r d f o r m a t i n t h e fi l e f r o m w h i c h a r e c o r d i s t o b e d e l e t e d . A
r e c o r d f o r m a t n a m e i s v a l i d o n l y w i t h a n e x t e r n a l l y d e s c r i b e d fi l e . I f
f a c t o r 1 i s n o t s p e c i fi e d , t h e r e c o r d f o r m a t n a m e m u s t b e t h e n a m e o f
t h e l a s t r e c o r d r e a d f r o m t h e fi l e ; o t h e r w i s e , a n e r r o r o c c u r s .
6 . E XC P T ( C a l c u l a t i o n Ti m e O u t p u t )
7 . E X F M T ( Wr i t e / T h e n Re a d Fo r m a t )
8 . F E O D ( Fo r c e E n d o f D a t a )
9 . F O RC E ( Fo r c e a C e r t a i n Fi l e t o B e Re a d N e x t C y c l e )
10. NEXT (Next)
1 1 . O P E N ( O p e n Fi l e f o r P r o c e s s i n g )
1 2 . P O S T ( Po s t )
1 3 . R E A D ( Re a d a Re c o r d )
1 4 . R E A D C ( Re a d N e x t C h a n g e d Re c o r d )
1 5 . R E A D E ( Re a d E q u a l Ke y )
1 6 . R E A D P ( Re a d P r i o r Re c o r d )
1 7 . R E D P E ( Re a d P r i o r E q u a l )
1 8 . R E L ( Re l e a s e )
1 9 . R O L B K ( Ro l l B a c k )
2 0 . S E T GT ( S e t G r e a t e r T h a n )
21. SETLL (Set Lower Limit)
2 2 . U N L C K ( U n l o c k a D a t a A r e a o r Re l e a s e a Re c o r d )
2 3 . U P D AT E ( M o d i f y E x i s t i n g Re c o r d )
2 4 . W R I T E ( C r e a t e N e w Re c o r d s )
2 1 . W h a t i s t h e d i ff e r e n c e b e t w e e n S E T L L a n d S E T G T ?
T h e S E T L L o p e r a t i o n p o s i t i o n s a fi l e a t t h e n e x t r e c o r d t h a t h a s a
ke y o r re l at i v e re co rd nu m b e r t h at i s g re at e r t h an o r e qu al t o t he s e arch
a r g u m e n t ( k e y o r r e l a t i v e r e c o r d n u m b e r ) s p e c i fi e d i n f a c t o r 1 . T h e fi l e

Page 11

Prasanth A

AS/400 FAQ
m u s t b e a f u l l p r o c e d u r a l fi l e ( i d e n t i fi e d b y a n F i n p o s i t i o n 1 6 o f t h e fi l e
d e s c r i p t i o n s p e c i fi c a t i o n s ) .
T h e S E T GT o p e r a t i o n p o s i t i o n s a fi l e a t t h e n e x t r e c o r d w i t h a ke y
o r re l at i v e re co rd nu m b e r t h at i s g re at e r t h an t h e ke y o r re l at i v e re co rd
n u m b e r s p e c i fi e d i n f a c t o r 1 . T h e fi l e m u s t b e a f u l l p r o c e d u r a l fi l e
( i d e n t i fi e d b y a n F i n p o s i t i o n 1 6 o f t h e fi l e d e s c r i p t i o n s p e c i fi c a t i o n s ) .
2 2 . W h a t i s t h e d i ff e r e n c e b e t w e e n R E A D R E A D E R E A D C R E A D P a n d
READPE?
R EAD : - Th e RE AD op e rati on re ad s th e re cord , cu rre n tl y p oin te d to,
f r o m a f u l l p r o c e d u r a l fi l e
READC :- The READC operation can be used only with an externally
d e s c r i b e d W O R K S T N fi l e t o o b t a i n t h e n e x t c h a n g e d r e c o r d i n a s u b fi l e .
R EADE :- The RE AD E op e rati on re tri e ve s th e next seq u e n ti al re cord
f r o m a f u l l p r o c e d u r a l fi l e ( i d e n t i fi e d b y a n F i n p o s i t i o n 1 6 o f t h e fi l e
d e s c r i p t i o n s p e c i fi c a t i o n s ) i f t h e k e y o f t h e r e c o r d m a t c h e s t h e s e a r c h
arg u m e n t . If t h e key o f th e re co rd d oe s n o t m at ch t h e s e arch arg u m e n t ,
t h e i n d i c a t o r t h a t m u s t b e s p e c i fi e d i n p o s i t i o n s 5 8 a n d 5 9 i s s e t o n , a n d
th e re cord i s

n ot re tu rn e d to the p rog ra m.

R EADP :- The RE AD P ope rati on re ad s th e p ri or re cord f rom a f ul l


p r o c e d u r a l fi l e .
R EADP E :- The RE D PE op e rati on re tri e ve s th e next p ri or se qu e n ti al
r e c o r d f r o m a f u l l p r o c e d u r a l fi l e i f t h e k e y o f t h e r e c o r d m a t c h e s t h e
s e a r c h a r g u m e n t . I f t h e ke y o f t h e r e c o r d d o e s n o t m a t c h t h e s e a r c h
arg u me n t, th e in d i cator i n p osi ti on s 58- 59 is se t on an d the re cord i s n ot
re tu rn e d to the p rog ram.
23. What SETON LR will do?

Last Record Indicator (LR)

I n a p r o g r a m t h a t c o n t a i n s a p r i m a r y fi l e , t h e l a s t r e c o r d i n d i c a t o r

( L R ) i s s e t o n b y a f t e r t h e l a s t r e c o r d f r o m a p r i m a r y / s e c o n d a r y fi l e h a s
b e e n p r o c e s s e d , o r i t c a n b e s e t o n b y t h e p r o g r a m m e r. T h e L R i n d i c a t o r
can b e u se d to con d i ti on cal cu l ati on an d ou tp u t op e rati on s th at are to be
d on e at th e e nd of th e p rog ram. Wh e n th e LR in d i cator i s se t on , al l
oth e r con trol le ve l i nd i cators (L1 th rou g h L9) are al so se t on . If an y of
t h e i n d i c a t o r s L 1 t h r o u g h L 9 h a v e n o t b e e n d e fi n e d a s c o n t r o l l e v e l
i nd i cator s, as re cord id e n ti fyin g

Page 12

i nd i cator s, as re su l tin g in d i cators, or

Prasanth A

AS/400 FAQ
b y \INxx, th e in di cato rs are se t on wh e n LR i s se t on , bu t th e y can n ot be
u s e d i n o t h e r s p e c i fi c a t i o n s .
I n a p r o g r a m t h a t d o e s n o t c o n t a i n a p r i m a r y fi l e , y o u c a n s e t t h e
LR

indicator

on

as

one

method

to

end

the

p rog ram.

To

set

the

LR

i nd i cator on , you can spe ci fy the LR i nd i cator as a re cord i de n tifyi n g


indicator

or

re su l ti n g

i n d i c a t o r.

If

LR

is

set

on

during

detail

cal cu l ati on s, al l oth e r con trol l e ve l i nd i cators are se t on at th e b eg i n ni n g


of th e next cycl e . LR an d the re cord id en ti fyin g i nd i cators are b oth on
th rou g h ou t th e re mai n de r of the d e tai l cycl e , b u t the re cord id e n ti fyin g
i n d i c a t o r s a r e s e t o ff b e f o r e L R t o t a l t i m e .
2 4 . W h a t i s D a t a S t r u c t u r e a n d w h a t a r e t h e d i ff e r e n t t y p e s o f
data structures?
T h e R P G / 4 0 0 p r o g r a m a l l o w s y o u t o d e fi n e a n a r e a i n s t o r a g e a n d
t h e l a y o u t o f t h e fi e l d s , c a l l e d s u b fi e l d s , w i t h i n t h e a r e a . T h i s a r e a i n
storag e i s cal l e d a d ata stru c- tu re .
Yo u c a n u s e a d a t a s t r u c t u r e t o :
D e fi n e t h e s a m e i n t e r n a l a r e a m u l t i p l e t i m e s u s i n g d i ff e r e n t d a t a
formats
O p e r a t e o n a fi e l d a n d c h a n g e i t s c o n t e n t s
D i v i d e a fi e l d i n t o s u b fi e l d s w i t h o u t u s i n g t h e M O V E o r M O V E L
operation codes
D e fi n e a d a t a s t r u c t u r e a n d i t s s u b fi e l d s i n t h e s a m e w a y a r e c o r d
i s d e fi n e d
D e fi n e m u l t i p l e o c c u r r e n c e s o f a s e t o f d a t a
Grou p n on - con ti g u ou s d ata in to con ti g u ou s i n te rn al storag e
locations.

I n a d d i t i o n , t h e re a re t h re e s p e c i a l d a t a s t r u c t u re s , e a c h w i t h a
s p e c i fi c p u r p o s e :

A d a t a a r e a d a t a s t r u c t u r e ( i d e n t i fi e d b y a U i n p o s i t i o n 1 8 o f t h e
d ata stru ctu re state me n t)
A fi l e i n f o r m a t i o n d a t a s t r u c t u r e ( r e f e r r e d t o b y t h e ke y w o r d I N F D S
o n a fi l e d e s c r i p t i o n s p e c i fi c a t i o n s c o n t i n u a t i o n l i n e )
A p r o g r a m - s t a t u s d a t a s t r u c t u r e ( i d e n t i fi e d b y a n S i n p o s i t i o n 1 8 o f
th e d ata stru ctu re state me n t).

D a t a s t r u c t u re s c a n b e p ro g r a m - d e s c r i b e d o r e x t e rn a l l y
described.
A

p rog ram- de scri b e d

data

stru ctu re

is

i d e n t i fi e d

by

blank

in

p o s i t i o n 1 7 o f t h e d a t a s t r u c t u r e s t a t e m e n t . T h e s u b - fi e l d s p e c i fi c a t i o n s
f or a p rog ram- d e scri b e d d ata stru ctu re mu st imme d i atel y f oll ow th e d ata
stru ctu re state me n t.

Page 13

Prasanth A

AS/400 FAQ
An

externally

described

data

stru ctu re ,

i d e n t i fi e d

by

an

in

p o s i t i o n 1 7 o f t h e d a t a s t r u c t u r e s t a t e m e n t , h a s s u b - fi e l d d e s c r i p t i o n s
c o n t a i n e d i n a n e x t e r n a l l y d e s c r i b e d fi l e w i t h o n e r e c o r d f o r m a t . A t
comp i l e ti me , th e RPG/400 p rog ram u se s th e exte rn al n ame to l ocate an d
extract

the

external

description

of

the

data

stru ctu re

s u b - fi e l d s .

An

e x t e r n a l s u b - fi e l d n a m e c a n b e r e n a m e d i n t h e p r o g r a m , a n d a d d i t i o n a l
s u b - fi e l d s c a n b e a d d e d t o a n e x t e r n a l l y d e s c r i b e d d a t a s t r u c t u r e i n t h e
p rog ram.
2 5 . E x p l a i n D a t a A r e a ? W h a t a r e t h e d i ff e r e n t t y p e s o f D a t a A r e a
available in AS/400?
A d ata are a i s an ob je ct u sed to h old d ata f or acce ss b y an y job
ru n ni n g on th e syste m. A d ata are a can b e u se d wh e ne ve r you ne ed
to store i nf ormati on of l i mi te d si ze , i nd e p en d e n t of the exi ste n ce of
p r o c e d u r e s o r fi l e s . Ty p i c a l u s e s o f d a t a a r e a s a r e :

To p r o v i d e a n a r e a ( p e r h a p s w i t h i n e a c h j o b s Q T E M P
library) to pass information within a job.
To p r o v i d e a fi e l d t h a t i s e a s i l y a n d f r e q u e n t l y c h a n g e d t o
con trol re f e re n ce s wi th in a j ob , su ch as:
Supplying the next order number to be assigned
Supplying the next check number
S u p pl yi ng th e next save /re sto re me di a volu me to be
used
To p r o v i d e a c o n s t a n t fi e l d f o r u s e i n s e v e r a l j o b s , s u c h a s a
tax rate or distribution list.
To p r o v i d e l i m i t e d a c c e s s t o a l a r g e r p r o c e s s t h a t r e q u i r e s
t h e d a t a a r e a . A d a t a a r e a c a n b e l o c ke d t o a s i n g l e u s e r ,
th u s p re ve n ti ng oth e r u se rs f rom p roce ssi n g at the same
time.

Ty p e s o f D a t a A r e a
1.

Local D ata Are a :A local d ata are a i s cre ate d f or e ach j ob in the syste m,
i n clu d i ng au tost art j ob s, job s starte d on th e syste m b y a re ad e r, an d
su b syste m mon i tor job s. The syste m cre ate s a l ocal d ata are a, wh i ch
i s i n i t i a l l y fi l l e d w i t h b l a n k s , w i t h a l e n g t h o f 1 0 2 4 a n d t y p e * C H A R.
When you submit a job using the SBMJOB command, the value of the
su b mi tti ng j ob s local d ata are a i s cop i e d in to the su b mi tte d j ob s
l o c a l d a t a a r e a . Yo u c a n r e f e r t o y o u r j o b s l o c a l d a t a a r e a b y
s p e c i f y i n g * L D A f o r t h e D TA A RA k e y w o r d o n t h e C H G D TA A RA ,
RT V D TA A RA , a n d D S P D TA A RA c o m m a n d s o r * L D A f o r t h e s u b s t r i n g
built-in function (%SST).
Th e f oll owi n g i s true of a l ocal d ata are a:
Th e l ocal d ata are a can n ot b e re f e rre d to f rom an y oth e r j ob .

Page 14

Prasanth A

AS/400 FAQ

2.

Yo u c a n n o t c r e a t e , d e l e t e , o r a l l o c a t e a l o c a l d a t a a r e a .
No li b rary i s associ ate d wi th the l ocal d ata are a.
Yo u c a n n o t c h a n g e t h e l o c a l d a t a a r e a i n a s e c o n d a r y t h r e a d .
Th e ILE CL comp i l e r g en e rate s cod e to en su re th at a p roce d u re
ru n ni n g in a se con d ary th re ad can n ot acce s s th e l ocal d ata are a
wh il e a p roce d u re run n in g i n th e i ni ti al th re ad i s ch an g i n g i t.
Grou p D ata Are a: -

Th e syste m cre ate s a g rou p d ata are a wh e n an in te racti ve job


b e c o m e s a g r o u p j o b ( u s i n g t h e C h a n g e G r o u p A t t r i b u t e s [ C H G G R PA ]
comman d ). O nl y on e g rou p d ata are a can exi st f or a g rou p . The
g rou p d ata are a i s de l e ted wh e n th e l ast j ob i n the g rou p i s en d e d
(with the ENDJOB, SIGNOFF, or ENDGRPJOB command, or with an
ab n ormal e nd ), or whe n th e job i s n o l on ge r p art of th e g rou p j ob
( u s i n g t h e C H G G R PA c o m m a n d w i t h G R P J O B * N O N E ) s p e c i fi e d ) . A
g r o u p d a t a a r e a , w h i c h i s i n i t i a l l y fi l l e d w i t h b l a n k s , h a s a l e n g t h o f
5 1 2 a n d t y p e * C H A R. Yo u c a n u s e a g r o u p d a t a a r e a f r o m w i t h i n a
g r o u p j o b b y s p e c i f y i n g * G D A f o r t h e D TA A RA p a r a m e t e r o n t h e
C H G D TA A RA , RT V D TA A RA , a n d D S P D TA A RA c o m m a n d s . A g r o u p d a t a
are a i s acce ssi b l e to al l of th e j ob s in th e g rou p .
Th e f oll owi n g are true f or a g rou p d ata are a:
Yo u c a n n o t u s e t h e g r o u p d a t a a r e a a s a s u b s t i t u t e f o r a
character variable on the sub string built-in function
( % S U B S T R I N G o r % S S T ) . ( Yo u c a n , h o w e v e r , m o v e a 5 1 2 - b y t e
character variable used by the sub string function into or out of
th e g rou p d ata are a.)
A g rou p d ata are a can n ot b e re f e rre d to b y j ob s ou tsi de th e
g rou p .
Yo u c a n n o t c r e a t e , d e l e t e , o r a l l o c a t e a g r o u p d a t a a r e a .
No li b rary i s associ ate d wi th a g rou p d ata are a.
3.

P r o g r a m I n i t i a l i z a t i o n Pa r a m e t e r ( P I P ) D a t a A r e a : -

A PIP d ata are a (PDA) i s cre ate d f or e ach p re start j ob whe n th e j ob


i s s t a r t e d . T h e o b j e c t s u b - t y p e o f t h e P D A i s d i ff e r e n t t h a n a
re g u l ar d ata are a. The PDA can on l y b e re fe rre d to by th e sp e ci al
value name *PDA. The size of the PDA is 2000 bytes but the number
o f p a r a m e t e r s c o n t a i n e d i n i t i s n o t r e s t r i c t e d . T h e RT V D TA A RA ,
C H G D TA A RA , a n d D S P D TA A RA C L c o m m a n d s a n d t h e RT V D TA A RA a n d
C H G D TA A RA m a c r o i n s t r u c t i o n s s u p p o r t t h e s p e c i a l v a l u e * P D A f o r
t h e d a t a a r e a n a m e p a r a m e t e r.
4.
Re m o t e D a t a A r e a : Yo u c a n a c c e s s r e m o t e d a t a a r e a s b y u s i n g D i s t r i b u t e d D a t a
M a n a g e m e n t ( D D M ) . Yo u d o n o t n e e d t o c h a n g e o r r e c o m p i l e a n
ap p l i cati on p rog ram th at re si d e s on on e AS /400 wh e n i t re tri e ve s
d a t a t h a t r e s i d e s o n a r e m o t e A S / 4 0 0 . To e n s u r e t h a t y o u a r e
acce s si n g th e corre c t d ata are a, you may n ee d to d o one of th e
following:

Page 15

Prasanth A

AS/400 FAQ

D el e te the stan d ard d ata are a an d cre a te a D DM d ata are a


th at h as th e same n ame as th e ori gi n al stan d ard d ata are a
Re n a m e t h e s t a n d a r d d a t a a r e a

2 6 . W h a t i s t h e d i ff e r e n c e b e t w e e n a b a t c h j o b a n d i n t e r a c t i v e
job?
A

batch

job

does

not

re q u i re

constant

interaction

with

the

c o m p u t e r. O n c e y o u h a v e s u b m i t t e d a b a t c h j o b , y o u a r e f r e e t o d o o t h e r
work

at

your

workstation

without

waiting

for

the

job

to

run.

Tw o

examp l e s of j ob s th at are common l y run i n b atch are p ri n ti n g re p orts an d


doing month-end data summaries.
W he n you are si gn e d on the syste m, you typ e on e re q u e st at a ti me
(such

as selecting an

option

or typing a command) and the system

re sp on d s to e ach re q ue st as it i s typ e d . Th i s se ssi on , some ti me s cal l e d


an interactive job, begins when you sign on a display station and ends
w h e n y o u s i g n o ff . D u r i n g t h e s e s s i o n , y o u r i n t e r a c t i o n w i t h t h e s y s t e m
is similar to a conversation. The AS/400 system links together all of the
t a s k s y o u d o f r o m t h e t i m e y o u s i g n o n u n t i l y o u s i g n o ff . T h i s m a k e s i t
e a s i e r f o r y o u t o m a n a g e y o u r w o r k e n v i r o n m e n t , fi n d y o u r o u t p u t , a n d
kee p t r ack o f w h at y o u h av e d o ne .
27. What is Override?
A n o v e r r i d e i s a C L c o m m a n d t h a t t e m p o r a r i l y c h a n g e s a fi l e n a m e ,
a d e v i c e n a m e , o r r e m o t e l o c a t i o n n a m e a s s o c i a t e d w i t h t h e fi l e , o r
s o m e o f t h e o t h e r a t t r i b u t e s o f a fi l e . Yo u c a n e n t e r o v e r r i d e c o m m a n d s
i n te racti ve l y f rom a d i spl ay stati on or su b mi t th e m as p art of a b atch
j o b . Yo u c a n i n c l u d e t h e m i n a c o n t r o l l a n g u a g e ( C L ) p r o g r a m , o r i s s u e
t h e m f r o m o t h e r p r o g r a m s b y c a l l i n g t h e p r o g r a m Q C M D E XC . Re g a r d l e s s
o f h o w t h e y a r e i s s u e d , o v e r r i d e s r e m a i n i n e ff e c t o n l y f o r t h e j o b ,
p rog ram, or di sp l ay stati on se ssi on i n wh i ch th e y are i ssue d .
Fu r t h e r m o r e , t h e y h a v e n o e ff e c t o n o t h e r j o b s t h a t m a y b e r u n n i n g a t
the same time.
2 8 . W h a t a r e t h e d i ff e r e n t O v e r r i d e C o m m a n d s ?
Yo u c a n p r o c e s s o v e r r i d e f u n c t i o n s f o r fi l e s b y u s i n g t h e f o l l o w i n g
CL commands:

Page 16

Prasanth A

AS/400 FAQ
D LT O V R
T h e D e l e t e O v e r r i d e c o m m a n d d e l e t e s o n e o r m o r e fi l e o v e r r i d e s ,
i n c l u d i n g o v e r r i d e s f o r m e s s a g e fi l e s t h a t w e r e p r e v i o u s l y s p e c i fi e d
in a call level.
DSPOVR
T h e D i s p l a y O v e r r i d e c o m m a n d d i s p l a y s fi l e o v e r r i d e s a t a n y a c t i v e
cal l l e ve l , acti vati on g rou p le vel , or j ob l e ve l f or a j ob .
OVRDBF
T h e O v e r r i d e w i t h D a t a b a s e Fi l e c o m m a n d i v e r r i d e s ( r e p l a c e s ) t h e
d a t a b a s e fi l e n a m e d i n t h e p r o g r a m , o v e r r i d e s c e r t a i n p a r a m e t e r s o f
a d a t a b a s e fi l e t h a t i s u s e d b y t h e p r o g r a m , o r o v e r r i d e s t h e fi l e a n d
c e r t a i n p a r a m e t e r s o f t h e fi l e t o b e p r o c e s s e d .
OVRDKTF
The Override with
d i s ke t t e fi l e n a m e d
d i s ke t t e fi l e t h a t i s
certain parameters

D i s ke t t e Fi l e c o m m a n d o v e r r i d e s ( r e p l a c e s ) t h e
in th e p rog ram, ove rri d e s ce rtai n p arame te rs of a
u s e d b y t h e p r o g r a m , o r o v e r r i d e s t h e fi l e a n d
o f t h e fi l e t o b e p r o c e s s e d .

OVRDSPF
T h e O v e r r i d e w i t h D i s p l a y Fi l e c o m m a n d o v e r r i d e s ( r e p l a c e s ) t h e
d i s p l a y fi l e n a m e d i n t h e p r o g r a m , o v e r r i d e s c e r t a i n p a r a m e t e r s o f a
d i s p l a y fi l e t h a t i s u s e d b y t h e p r o g r a m , o r o v e r r i d e s t h e fi l e a n d
c e r t a i n p a r a m e t e r s o f t h e fi l e t o b e p r o c e s s e d .
OVRICFF
T h e O v e r r i d e w i t h I n t e r s y s t e m C o m m u n i c a t i o n s Fu n c t i o n Fi l e
c o m m a n d o v e r r i d e s t h e fi l e t h a t i s n a m e d i n t h e p r o g r a m , a n d
o v e r r i d e s c e r t a i n p a r a m e t e r s o f t h e p r o c e s s e d fi l e .
OVRMSGF
T h e O v e r r i d e w i t h M e s s a g e Fi l e c o m m a n d o v e r r i d e s a m e s s a g e fi l e
th at i s u se d i n a p rog ram. The ru l e s f or ap p l yin g th e ove rri de s in th i s
c o m m a n d a r e d i ff e r e n t f r o m t h e o t h e r o v e r r i d e c o m m a n d s .
O V R P RT F
T h e O v e r r i d e w i t h P r i n t e r Fi l e c o m m a n d o v e r r i d e s ( r e p l a c e s ) t h e
p r i n t e r fi l e n a m e d i n t h e p r o g r a m , o v e r r i d e s c e r t a i n p a r a m e t e r s o f a
p r i n t e r fi l e t h a t i s u s e d b y t h e p r o g r a m , o r o v e r r i d e s t h e fi l e a n d
c e r t a i n p a r a m e t e r s o f t h e fi l e t o b e p r o c e s s e d .
O V R S AV F
T h e O v e r r i d e w i t h S a v e Fi l e c o m m a n d o v e r r i d e s ( r e p l a c e s ) t h e fi l e
n a m e d i n t h e p r o g r a m , o v e r r i d e s c e r t a i n a t t r i b u t e s o f a fi l e t h a t i s
u s e d b y t h e p r o g r a m , o r o v e r r i d e s t h e fi l e a n d c e r t a i n a t t r i b u t e s o f
t h e fi l e t o b e p r o c e s s e d .
O V RTA P F
T h e O v e r r i d e w i t h Ta p e Fi l e c o m m a n d o v e r r i d e s ( r e p l a c e s ) t h e fi l e
n a m e d i n t h e p r o g r a m , o v e r r i d e s c e r t a i n a t t r i b u t e s o f a fi l e t h a t i s

Page 17

Prasanth A

AS/400 FAQ
u s e d b y t h e p r o g r a m , o r o v e r r i d e s t h e fi l e a n d c e r t a i n a t t r i b u t e s o f
t h e fi l e t o b e p r o c e s s e d .
2 9 . W h a t a r e t h e B e n e fi t s o f O v e r r i d i n g ?
O ve rri de s are p arti cu l arl y u sef u l f or mak i ng mi n or ch an ge s to th e
way a p rog ram fu n cti on s or f or sel e cti n g the d ata on wh i ch i t ope rate s
wi th ou t h avi ng to re comp i l e th e p rog ram. Th e i r p ri n ci p al val u e i s in
al l owi ng you to u se ge n e ral - pu rp ose p rog rams in a wi de r vari e ty of
ci rcu ms tan ce s. Examp l e s of i te ms wh e re you can u se ove rri d e s in cl u d e
the following:

C h a n g i n g t h e n a m e o f t h e fi l e t o p r o c e s s
S e l e c t i n g t h e d a t a b a s e fi l e m e m b e r t o p r o c e s s
Indicating whether to spool output
D i r e c t i n g o u t p u t t o a d i ff e r e n t t a p e u n i t
Changing printer characteristics such as lines per inch and
number of copies
S e l e c t i n g t h e r e m o t e l o c a t i o n t o u s e w i t h a n I C F fi l e
Changing the characteristics of a communications session

3 0 . S N D N E T F, S N D N E T M S G , S N D P G M M S G , S N D J R N E
T h e S e n d N e t w o r k F i l e ( S N D N E T F ) c o m m a n d s e n d s a s a v e fi l e o r a
m e m b e r o f a p h y s i c a l d a t a b a s e fi l e t o a n o t h e r u s e r o n t h e l o c a l s y s t e m
or on a re mote syste m th rou g h th e S NAD S ne twork .
The Send Network Message (SNDNETMSG) command sends a message
to an oth e r u se r on th e l ocal or a re mote syste m th rou g h th e S NAD S
network.
The Send Program Message (SNDPGMMSG) command sends a
message to a named message queue or to a call message queue.

A call

message queue can be the *EXT external message queue or a message


q u e u e a s s o c i a t e d w i t h a c a l l s t a c k e n t r y.

E ach ti me a p rog ram or

p roce d u re is cal l e d a n e w me ssag e q u eu e i s associ ate d wi th i ts cal l stack


e n t r y.

T h e m e s s a g e q u e u e i s i d e n t i fi e d b y t h e n a m e o f i t s a s s o c i a t e d

p rog ram or p roce d u re .


The Send Journal Entry (SNDJRNE) command is used to write a single
j o u r n a l e n t r y t o a s p e c i fi c j o u r n a l .

Page 18

The entry can contain any

Prasanth A

AS/400 FAQ
information.

The user may assign an entry type to the journal entry and

m a y a l s o a s s o c i a t e t h e j o u r n a l e n t r y w i t h a s p e c i fi e d j o u r n a l e d o b j e c t .
31. What is Service Program, Dynamic Program Calls, Static
Program Calls ?
A se rvi ce p rog ram i s a col le cti on of run n ab l e p roce d u re s an d
avai l ab l e d ata ite ms e asil y an d d i re ctl y acce ssi b l e b y oth e r ILE p rog ram s
or se rvi ce p rog rams. In man y re sp e cts, a se rvi ce p rog ra m i s si mil ar to a
s u b r o u t i n e l i b r a r y o r p r o c e d u r e l i b r a r y. S e r v i c e p r o g r a m s p r o v i d e
common services that other ILE objects may need; hence the name
se rvi ce p rog ra m.
3 2 . C a n p r i n t e r fi l e b e d e c l a r e d i n c l p r o g r a m ?
N o . T h e fi l e m u s t e i t h e r b e a d a t a b a s e fi l e w i t h o n l y o n e r e c o r d
f o r m a t o r b e a d i s p l a y fi l e .
33. What is activation group?
Al l ILE p rog rams an d se rvi ce p rog rams are acti vate d wi th i n a
su b stru ctu re of a j ob cal l ed an acti vati on g rou p . Thi s su b stru ctu re
con tai n s th e re sou rce s ne ce ssary to ru n th e p rog rams. The se re sou rce s
fall into the following general categories:

S tati c an d au tomati c p rog ra m vari ab l e s

Dynamic storage

Te m p o r a r y d a t a m a n a g e m e n t r e s o u r c e s

Ce rtai n typ e s of exce p ti on h and l e rs an d e n di n g p roce d u re s

34. How to declare a SQL cursor?


S tate me n ts re l ate d to u si n g a cu rsor i n cl ud e :
D E C L A R E C U R S O R s t a t e m e n t d e fi n e s t h e n a m e o f t h e c u r s o r a n d
s p e c i fi e s t h e r o w s t o b e r e t r i e v e d w i t h t h e e m b e d d e d S E L E C T
statement.
O PE N state me n t op e n s th e cu rsor f or u se wi th in th e p rog ram. Th e
cursor
mu st be op e ne d b e f ore an y rows can be re tri e ve d .
F E TC H s t a t e m e n t r e t r i e v e s r o w s f r o m t h e c u r s o r ' s r e s u l t t a b l e o r
p o s i t i o n s t h e c u r s o r o n a n o t h e r r o w.
C LO S E s t a t e m e n t c l o s e s t h e c u r s o r.

Page 19

Prasanth A

AS/400 FAQ
35. What is Commitment Control?
C o m m i t m e n t c o n t r o l i s a f u n c t i o n t h a t a l l o w s y o u t o d e fi n e a n d
p r o c e s s a g r o u p o f c h a n g e s t o t h e d a t a b a s e fi l e s o r t a b l e s a s a l o g i c a l
unit of work.
3 6 . C a n w e u s e M u l t i f o r m a t l o g i c a l fi l e i n a C L p r o g r a m ?
N o . T h e fi l e m u s t e i t h e r b e a d a t a b a s e fi l e w i t h o n l y o n e r e c o r d
f o r m a t o r b e a d i s p l a y fi l e .
3 7 . W h a t i s t h e S i m i l a r i t i e s a n d d i ff e r e n c e b e t w e e n I L E a n d O P M ?
OPM
Prog ram
Comp il ati on re su l ts i n a ru nn ab l e
p rog ram
Compile, run
Ru n u n i t s s i m u l a t e d f o r e a c h
language
D yn ami c p rog ram cal l
Single-language focus
L a n g u a g e - s p e c i fi c e r r o r h a n d l i n g
OPM debuggers

ILE
Prog ram, Se rvi ce p rog ram
Comp il ati on re su l ts i n a n on
runnable module object
Compile, bind, run
Acti vati on g rou p s
D yn ami c p rog ram cal l S tati c
p roce d u re cal l
M i xe d - l a n g u a g e f o c u s
Common e rror h and l in g Lan g u ag e s p e c i fi c e r r o r h a n d l i n g
S ou rce - l e ve l de b u g ge r

38. Explain the use of the following commands with example?


X F O O T, X L AT E .
1.
XFOOT : XFOOT adds the elements of an array together and places the sum
i n t o t h e fi e l d s p e c i fi e d a s t h e r e s u l t fi e l d . Fa c t o r 2 c o n t a i n s t h e
n a m e o f t h e a r r a y.
2.

X L AT E : Ch aracte rs in th e sou rce stri n g (f actor 2) are tran sl ate d

a c c o r d i n g t o t h e Fr o m a n d To s t r i n g s ( b o t h i n f a c t o r 1 ) a n d p u t i n t o
a r e c e i v e r fi e l d ( r e s u l t fi e l d ) . S o u r c e c h a r- a c t e r s w i t h a m a t c h i n
t h e Fr o m s t r i n g a r e t r a n s l a t e d t o c o r r e s p o n d i n g c h a r a c t e r s i n t h e To
s t r i n g . X L AT E s t a r t s t r a n s l a t i n g t h e s o u r c e a t t h e l o c a t i o n s p e c i fi e d
i n f actor 2 an d con ti n u e s ch aracte r b y ch aracte r, f rom le ft to ri g h t.
I f a c h a r a c t e r o f t h e s o u r c e s t r i n g e x i s t s i n t h e Fr o m s t r i n g , t h e
c o r r e s p o n d i n g c h a r a c t e r i n t h e To s t r i n g i s p l a c e d i n t h e r e s u l t
fi e l d . A n y c h a r a c t e r s i n t h e s o u r c e fi e l d b e f o r e t h e s t a r t i n g p o s i t i o n
a r e p l a c e d u n c h a n g e d i n t h e r e s u l t fi e l d .

Page 20

Prasanth A

AS/400 FAQ
Fa c t o r 1 m u s t c o n t a i n t h e Fr o m s t r i n g , f o l l o w e d b y a c o l o n ,
f o l l o w e d b y t h e To s t r i n g . T h e Fr o m a n d To s t r i n g s c a n c o n t a i n o n e
o f t h e f o l l o w i n g : a fi e l d n a m e , a r r a y e l e m e n t , n a m e d c o n s t a n t , d a t a
stru ctu re n ame , li te ral , or tab le n ame .
Fa c t o r 2 m u s t c o n t a i n e i t h e r t h e s o u r c e s t r i n g o r t h e s o u r c e
string followed by a colon and the start location. The source string
p o r t i o n o f f a c t o r 2 m u s t b e c h a r- a c t e r ,

and can contain one of the

f o l l o w i n g : a fi e l d n a m e , a r r a y e l e m e n t , n a m e d c o n s t a n t , d a t a
s t r u c t u r e n a m e , d a t a s t r u c t u r e s u b fi e l d , l i t e r a l , o r t a b l e n a m e . T h e
start location portion of factor 2 must be numeric with no decimal
p o s i t i o n s a n d c a n b e a n a m e d c o n s t a n t , a r r a y e l e m e n t , fi e l d n a m e ,
l i t e r a l , o r t a b l e n a m e . I f n o s t a r t l o c a t i o n i s s p e c i fi e d , a v a l u e o f 1
i s u s e d . T h e r e s u l t fi e l d c a n b e a c h a r a c t e r fi e l d , c h a r a c t e r a r r a y
e le me n t, d ata stru ctu re or a ch ara cte r tab l e . The l en g th of th e
r e s u l t fi e l d s h o u l d b e a s l a r g e a s t h e s o u r c e s t r i n g s p e c i fi e d i n
f a c t o r 2 . I f t h e r e s u l t fi e l d i s l a r g e r t h a n t h e s o u r c e s t r i n g , t h e
r e s u l t w i l l b e l e f t a d j u s t e d . I f t h e r e s u l t fi e l d i s s h o r t e r t h a n t h e
s o u r c e s t r i n g , t h e r e s u l t fi e l d w i l l c o n t a i n t h e l e f t m o s t p a r t o f t h e
tran sl ate d sou rce .
3 9 . Ty p e s o f a r r ay s ? E x p l a i n t h e m .
Th e re are th re e typ e s of arrays:
Yo u r p r o g r a m l o a d s t h e r u n - t i m e a r r a y w h i l e i t i s r u n n i n g .
Th e comp i l e- ti me array i s l oad e d whe n you r p rog ra m i s cre ate d . It
b e come s a p e rman e n t p art of you r p rog ram.
T h e p r e r u n - t i m e a r r a y i s l o a d e d f r o m a n a r r a y fi l e w h e n y o u r
p rog ram be g i n s ru nn i n g , be f ore an y in p u t, cal cu l ati on , or ou tp u t
op e rati on s are p roce sse d .
40. How do u send and receive data to data Queue?
C A L L Q S N D D TA Q PA R M ( D TA Q 1 Q G P L & F L D L E N & F I E L D )
C A L L Q RC V D TA Q PA R M ( D TA Q 1 Q G P L & F L D L E N & F I E L D & WA I T )
41. How do u send data to data area using CL and RPG?
IN CL :-

C H G D TA A RA D TA A RA ( ( M Y L I B / D A 1 ) ( 5 4 ) ) VA LU E ( ' v a l u e ' )

IN RPG :* N A M VA R

Page 21

DEFN

D ATA A R E A - N A M E

LO C A L VA R I A B L E N A M E

Prasanth A

AS/400 FAQ
IN

LO C A L VA R I A B L E N A M E
LO C A L VA R I A B L E N A M E

OUT
IN ILE RPG :* D TA RA
NAME

DEFINE
IN
OUT

D ATA A R E A - N A M E

LO C A L VA R I A B L E

LO C A L VA R I A B L E N A M E
LO C A L VA R I A B L E N A M E

42. Specs that can be used in procedures?


P- Pro ce d u re
D- Declaration
C- Calculation
4 3 . E x p l a i n d i ff e r e n t m a x i m u m v a l u e s o f D B 2 o b j e c t s
T h e f o l l o w i n g d a t a b a s e fi l e m a x i m u m s s h o u l d b e k e p t i n m i n d w h e n
d e s i g n i n g fi l e s o n t h e i S e r i e s s y s t e m :

Description
M a x i m u m Va l u e

Nu mb e r of b yte s i n a re cord
32,766
bytes
N u m b e r o f fi e l d s i n a r e c o r d f o r m a t
8 , 0 0 0 fi e l d s
N u m b e r o f k e y fi e l d s i n a fi l e
1 2 0 fi e l d s
S i z e o f k e y f o r p h y s i c a l a n d l o g i c a l fi l e s
2000
characters
S i z e o f k e y f o r O R D E R BY ( S Q L ) a n d K E Y F L D ( O P N Q RY F ) 1 0 , 0 0 0 b y t e s
N u m b e r o f r e c o r d s c o n t a i n e d i n a fi l e m e m b e r
4,294,967,294 re cord s
N u m b e r o f b y t e s i n a fi l e m e m b e r
266,757,734,400 bytes
Number of bytes in an access path
1,099,511,627,776bytes
N u m b e r o f k e y e d l o g i c a l fi l e s b u i l t o v e r a p h y s i c a l fi l e
member
3 , 6 8 6 fi l e s
N u m b e r o f p h y s i c a l fi l e m e m b e r s i n a l o g i c a l fi l e m e m b e r 3 2 m e m b e r s
Number of members that can be joined
32 members
S i z e o f a c h a r a c t e r o r D B C S fi e l d
32,766 bytes
4
S i z e o f a z o n e d d e c i m a l o r p a c k e d d e c i m a l fi e l d
31 digits
M a x i m u m n u m b e r o f c o n s t r a i n t s p e r p h y s i c a l fi l e s
300
constraints
M a x i m u m n u m b e r o f t r i g g e r s p e r p h y s i c a l fi l e s
6 triggers
Maxi mu m n u mb e r of re cu rsi ve in se rt an d u p d ate tri g ge r
Calls
200
44. How to Debug a Batch Job ?
U sin g you r in te racti ve scre e n to de b u g a b atch j ob sub mi tte d
to the job queue allows you to put the batch job into debug mode and to

Page 22

Prasanth A

AS/400 FAQ
se t b re ak p oi n ts wi th ou t h avi n g to ch an ge th e p rog ram to ru n
i n t e r a c t i v e l y.
1. Submit the job with the HOLD (*YES) parameter: SBMJOB HOLD (*YES)
or H old th e j ob qu e ue th at be f ore su b mi ttin g th e j ob b y u si n g the
HLDJOBQ command.
2. Determine the job name, user, and number of the submitted job by
using the WRKSBMJOB command.
3 . Ty p e t h e S t a r t S e r v i c e J o b c o m m a n d o n y o u r s c r e e n : S T R S RV J O B J O B
(job name/user/number)
4 . Ty p e t h e S t a r t D e b u g c o m m a n d o n y o u r s c r e e n : S T R D B G
5 . Re l e a s e t h e j o b i n t h e j o b q . Ty p e W R K S B M J O B a n d t h e n p u t a 6 b e s i d e
th e j ob to b e re le ase d an d p re ss en te r, or, if th e j ob q u eu e was pu t on
h ol d , re l e ase th e job q u eu e wi th th e RLS JO BQ comman d .
6. A di sp l ay ap p e ars whe n th e j ob i s re ad y to start, sayi n g th at you can
n ow b e gi n d eb u g gi n g th e job . Pre ss F10 to sh ow th e Comman d E ntry
d i s p l a y.
7 . N o w y o u c a n s t a r t d e b u g g i n g b y e n t e r i n g a n A d d B r e a k Po i n t
command: ADDBKP
4 5 . E x p l a i n t h e u s e o f Tr i g g e r s
Tr i g g e r s i n t h e d a t a b a s e a l l o w y o u t o d o t h e f o l l o w i n g :

E nf orce bu si n e ss ru le s

Va l i d a t e i n p u t d a t a

G e n e r a t e a u n i q u e v a l u e f o r a n e w l y i n s e r t e d r o w o n a d i ff e r e n t fi l e
(su rrog a te fu n cti on )

Wr i t e t o o t h e r fi l e s f o r a u d i t t r a i l p u r p o s e s

Q u e r y f r o m o t h e r fi l e s f o r c r o s s - r e f e r e n c i n g p u r p o s e s

Access system functions (for example, print an exception message


when a rule is violated)

Re p l i c a t e d a t a t o d i ff e r e n t fi l e s t o a c h i e v e d a t a c o n s i s t e n c y
4 6 . W h a t a r e d i ff e r e n t t y p e s o f fi l e s ?

Database Files(DBF), Device Files(Display and Printer Files), ICF [Inter


Communication Function], DDMF [Distributed Data Management Files], Save
File(SAVF)
47. What is object type of Menu, dataarea, Journal, Journal Reciver
Q U E RY [ S P ] a n d C o m m a n d ?
* M E N U * D TA A RA
*JRN
* J R N RC V
* Q RY D F N
*CMD

Page 23

Prasanth A

AS/400 FAQ
4 8 . W h a t a r e d i ff e r e n t t y p e s o f L o g i c a l fi l e s ? M a n d a t o r y K e y w o r d
in Join LF?
A.
B.
C.

S i m p l e l o g i c a l fi l e
M u l t i f o r m a t L o g i c a l Fi l e
J o i n L o g i c a l Fi l e

M an d at o r y ke y w o rd s in JL F are
JFILE
JOIN
JFLD
4 9. Is P GM and ENDP GM mandatory keyw ords in CL pgm ?
No.
50. What type of Data Areas can you access from PRG pgm?
All
5 1 . H o w m a n y p r i n t e r fi l e s c a n y o u d e c l a r e i n a C L p g m ?
0
52. How many types of libraries are there? What are their
d i ff e r e n c e s ?
Te s t L i b r a r y a n d P r o d u c t L i b r a r y
5 3 . N a m e 2 C L c o m m a n d s p e r m i t t i n g t o c o p y a fi l e f r o m a l i b r a r y
to other one?
C O P Y F , C P Y F R M Q RY F
5 4 . H o w d o u fi n d f a u l t s / b u g s / e r r o r s i n t h e l o g i c ?
Debugging
5 5 . W h a t i s t h e d i ff e r e n c e b e t w e e n C F a n d C A ?
CF wi ll re tu rn all th e val ue s f rom scre e n to p rog ram
CA won t re tu rn an y val u e to th e p rog ram
56. How many Program Entry Points (PEP) can be there for a
program
1
5 7 . O P N Q RY F ? ? W h y d o u g o f o r t h i s ?
The Open Query File (OPNQRYF) command is a CL command that allows you to
perform many data processing functions on database files. Essentially, the OPNQRYF
command acts as a filter between the processing program and the database records. The
database file can be a physical or logical file. Unlike the Create Physical File (CRTPF) or
Create Logical File (CRTLF) commands, the OPNQRYF command creates only a temporary file
for processing the data; it does not create a permanent file.
The OPNQRYF command has functions similar to those in DDS, and the CRTPF and
CRTLF commands. DDS requires source statements and a separate step to create the file.
OPNQRYF allows a dynamic definition without using DDS. The OPNQRYF command does not

Page 24

Prasanth A

AS/400 FAQ
support all of the DDS functions, but it supports significant functions that go beyond the
capabilities of DDS. In addition, Query for iSeries can be used to perform some of the
function the OPNQRYF command performs. However, the OPNQRYF command is more useful
as a programmers tool.
The OPNQRYF command parameters also have many functions similar to the SQL
SELECT statements. For example, the FILE parameter is similar to the SQL FROM statement,
the QRYSLT parameter is similar to the SQL WHERE statement, the GRPFLD parameter is
similar to the SQL GROUP BY statement, and the GRPSLT parameter is similar to the SQL
HAVING statement. For more information about SQL,
The following is a list of the major functions supplied by OPNQRYF.

Dynamic record selection

Dynamic keyed sequence access path

Dynamic keyed sequence access path over a join

Dynamic join

Handling missing records in secondary join files

Unique-key processing

Mapped field definitions

Group processing

Final total-only processing

Improving performance

Open Query Identifier (ID)

Sort sequence processing

58. TRAPING CURSOR from DSPF??


59. What is message queue and job queue?
6 0 . W h e r e d o y o u u s e * P SS R ?
6 1 . H o w d o y o u d e c l a r e a r r ay s i n R P G p r o g r a m ?
62. Why does the Level Check Error creep up?
63. If you are calling pgm PGMB from PGMA and the command
SNDPGMMSG is encountered in PGMB where will the msg go?
[*MSGQ]
6 4 . C a n w e s a v e t h e r e s u l t o f S Q L Q u e r y s t a t e m e n t a s a fi l e [ D a t a
File]?
65. Performance consideration of Openqry when compared with
L o g i c a l fi l e .
6 6 . W h i l e C H A I N l o c k s t h e r e c o r d s , w h a t r t h e o t h e r fi l e o p e r a t i o n s
that do not lock records or release the lock.

Page 25

Prasanth A

AS/400 FAQ
U P D AT E , D E L E T E , A D D , R E A D
6 7 . H o w d o y o u c h e c k w h e t h e r t h e fi l e h a s d u p l i c a t e r e c o r d s ?
68. Explain what is Subsystem in relation to jobs
69. What are various test functions?
(A)
TEST (Test Date/Time/Timestamp)
(B)

TESTB (Test Bit)

(C)

TESTN (Test Numeric)

T E S T Z ( Te s t Z o n e )
7 0 . E x p l a i n D i ff e r e n t t y p e s o f i n d i c a t o r s
71. What's *NETF?
7 2 . H o w t o p r i n t a s p o o l fi l e w h i l e w e w a n t k e e p i n g i t i n a n
*OUTQ?
G i v e S AV E p r o p e r t y t o * Y E S
73. How do we lock record?
74. What is philosophy in relation to the utilization of indicators?
7 5 . W h a t i s t h e d i ff e r e n c e b e t w e e n a m o d u l e a n d a p r o g r a m ?
7 6 . W h a t d o u m e a n b y B i n d D i r e c t o r y, P r o c e d u r e , H i d d e n F i l e s ,
Module
7 7 . D i ff e r e n c e b e t w e e n m o v e a n d e v a l o p c o d e s ?
78. Both pf and lf should reside in same library?
No
7 9 . H o w d o u k n o w h o w m a n y p r i n t e r fi l e s a r e a t t a c h e d t o y o u r
system ?
80. How do u know that your process has gone to loop?
8 1 . D i ff e r e n c e b e t w e e n o p n q r y f a n d l o g i c a l fi l e .
8 2 . W h a t i s t h e d i ff e r e n c e b e t w e e n I L E C L a n d C L / 4 0 0 ?
8 3 . W h a t i s t h e d i ff e r e n c e b e t w e e n t h e S t a n d a l o n e fi e l d a n d
normal variable in RPG pgm?
8 4 . W h a t d o y o u m e a n b y P r i m a r y fi l e , S e c o n d a r y fi l e , P r o g r a m
d e s c r i b e d fi l e , E x t e r n a l l y d e s c r i b e d fi l e .
8 5 . D i ff e r e n c e b e t w e e n C A L L , C A L L B , C A L L P.
86. What are indicators? Why do we use Indicators?
8 7 . W h a t a r e t h e d i ff e r e n t t y p e s o f i n d i c a t o r s ?
88. What is a subsystem? What are they?
89. What are Pools? What are they?
90. What is an auto start job?
91. What is a pre start job?
92. How many types of MONMSG are there??
93. How many MONMSG commands can you declare in CL Pgm??
94. What are folders? Why do you use folders?
9 5 . W h a t a r e B u i l t i n Fu n c t i o n s i n R P G ? ?
96. Explain the use of %SUBST with example?
97. How do you lock a data area??
9 8 . J o u r n a l i n g ? Ta b l e s ?
9 9 . D i ff e r e n c e b e t w e e n a r r ay s a n d t a b l e s .

Page 26

Prasanth A

AS/400 FAQ
100. How do you debug your Pgms? Can u change a pgm in
Production library
While debugging? How?
1 0 1 . H o w d o y o u d e fi n e H e l p f o r y o u r d i s p l ay fi l e ? ?
102. What are the types of authorities?? What are they?
103. What authority should you posses to delete a library?
104. What command do you use to give and remove an object
special [extra]
Authority?
105. Can you tell me about access path maintenance? Page 128
1 0 6 . W h a t a r e e l i m i n a t i o n s o f R LU ? P a g e 2 1 9
1 0 7 . D i ff e r e n c e b e t w e e n S u b p r o g r a m & S u b r o u t i n e ?
1 0 8 . W h a t i s a n o u t fi l e ?
1 0 9 . H o w t o d e l e t e a r e c o r d f r o m a P h y s i c a l fi l e w i t h o u t
Read or Chain ?
S p e cify th e ke y v alu e s i n t he f act o r 1 o f DE L E TE o p co d e

using

110. How to retrieve a data from a Data Queue without deleting


from the Data Queue?
G i v e * N O t o Re m o v e M e s s a g e Pa r a m e t e r i n Q R C V D TA Q A P I

Receive Data Queue (QRCVDTAQ) API


Required Parameter Group:
1
2
3
4
5

Data queue name


Library name
Length of data
Data
Wait time

Input
Input
Output
Output
Input

Char(10)
Char(10)
Packed(5,0)
Char(*)
Packed(5,0)

Optional Parameter Group 1:


6 Key order
7 Length of key data
8 Key data
9 Length of sender information
10 Sender information

Input
Input
I/O
Input
Output

Char(2)
Packed(3,0)
Char(*)
Packed(3,0)
Char(*)

Optional Parameter Group 2:


11 Remove message
12 Size of data receiver
13 Error code

Input
Input
I/O

Char(10)
Packed(5,0)
Char(*)

1 1 1 . E x p l a i n a b o u t d i ff e r e n t E x t e n d e r s i n R P G I V

Page 27

Prasanth A

AS/400 FAQ
(A) Always perform a dump, even if DEBUG(*NO) is specified
(D) Pass operational descriptors on bound call
(D) Date field
(E) Error handling
(H) Half adjust (round the numeric result)
(M) Default precision rules
(N) Do not lock record
(N) Set pointer to *NULL after successful DEALLOC
(N) Do not force data to non-volatile storage
(P) Pad the result with blanks or zeros
(R) .Result Decimal Position. precision rules
(T) Time field
(Z) Timestamp field
112. Explain various Date operation in RPG IV
Operation
Traditional Syntax
Free-Form Syntax
Add Duration
ADDDUR (Add Duration)
+ operator
Extract
EXTRCT (Extract
%SUBDT (Extract a Portion of a
Subtract Duration

Convert date/time

Date/Time/Timestamp)
SUBDUR (Subtract

Date, Time, or Timestamp)


- operator or %DIFF (Difference

Duration)

Between Two Date, Time, or

MOVE (Move) or MOVEL

Timestamp Values)
%CHAR (Convert to Character

/timestamp to

(Move Left)

character
Convert date /time

MOVE (Move) or MOVEL

%DEC (Convert to Packed

/timestamp to numeric
Convert

(Move Left)
MOVE (Move) or MOVEL

Decimal Format)
%DATE (Convert to Date)

character/numeric to

(Move Left)

date
Convert

MOVE (Move) or MOVEL

character/numeric to

(Move Left)

time
Convert character

MOVE (Move) or MOVEL

%TIMESTAMP (Convert to

/numeric /date to

(Move Left)

Timestamp)

timestamp
Move date/time to

MOVE (Move) or MOVEL

date + time

timestamp

(Move Left)

Page 28

Data)

%TIME (Convert to Time)

Prasanth A

AS/400 FAQ
Test
Number
Number
Number
Number
Number
Number
Number

of
of
of
of
of
of
of

Years
Months
Days
Hours
Minutes
Seconds

TEST (Test Date/Time/Timestamp)


%YEARS (Number of Years)
%MONTHS (Number of Months)
%DAYS (Number of Days)
%HOURS (Number of Hours)
%MINUTES (Number of Minutes)
%SECONDS (Number of Seconds)
%MSECONDS (Number of Microseconds)

Microseconds
113. Explain various Compare operation in RPG IV
Operation
Traditional Syntax
Free-Form Syntax
And
ANDxx (And)
AND operator
Compare
COMP (Compare)
=, <, >, <=, >=, or <>
Compare and Branch
Conditional

CABxx (Compare and Branch)


CASxx (Conditionally Invoke

operator
(not allowed)
IF (If) and EXSR (Invoke

Subroutine
Do Until

Subroutine)
DOU (Do Until) or DOUxx (Do

Subroutine)
DOU (Do Until)

Do While

Until)
DOW (Do While) or DOWxx

If
Or
When

(Do While)
IF (If) or IFxx (If)
ORxx (Or)
WHEN (When True Then Select)

IF (If)
OR operator
WHEN (When True Then

or WHENxx (When True Then

Select)

DOW (Do While)

Select)
114. Explain various Branching operation in RPG IV
Operation
Compare and Branch
Go To
Iterate
Leave
Leave a subroutine
Tag

Traditional Syntax
CABxx (Compare and Branch)
GOTO (Go To)
ITER (Iterate)
LEAVE (Leave a Do/For Group)
LEAVESR (Leave a Subroutine)
TAG (Tag)

115. Explain various


Operation
Look Up Elements

Number of

Page 29

Free-Form Syntax
(Not allowed)
(Not allowed)

(not allowed)

a r r ay o p e r a t i o n i n R P G I V

Traditional Syntax
LOOKUP (Look Up a Table or

Free-Form Syntax
%LOOKUPxx (Look Up an Array

Array Element)

Element) or %TLOOKUPxx (Look Up

a Table Element)
%ELEM (Get Number of Elements)

Prasanth A

AS/400 FAQ
Elements
Move an Array
Sort an Array
Subset an Array
Sum the Elements

MOVEA (Move Array)


(Not allowed)
SORTA (Sort an Array)
%SUBARR (Set/Get Portion of an Array)
XFOOT (Summing the
%XFOOT (Sum Array Expression

of an Array

Elements of an Array)

Elements)

116. Explain the various string operations in RPG IV


Operation

Traditional Syntax

Free-Form Syntax

Concatenate
Check
Check Reverse
Create
Replace
Scan
Substring
Translate
Trim Blanks

CAT (Concatenate Two Strings) 0 + operator


CHECK (Check Characters)
%CHECK (Check Characters)
CHECKR (Check Reverse)
%CHECKR (Check Reverse)
%STR (Get or Store Null-Terminated String)
%REPLACE (Replace Character String)
SCAN (Scan String)
%SCAN (Scan for Characters)
SUBST (Substring)
%SUBST (Get Substring)
XLATE (Translate)
%XLATE (Translate)
%TRIM (Trim Characters at Edges), %TRIML (Trim Leading
Characters), or %TRIMR (Trim Trailing Characters)

117. What are the built in functions in RPG IV?


1. %ABS (Absolute Value of Expression)
2. %ADDR (Get Address of Variable)
3. %ALLOC (Allocate Storage)
4. %BITAND (Bitwise AND Operation)
5. %BITNOT (Invert Bits)
6. %BITOR (Bitwise OR Operation)
7. %BITXOR (Bitwise Exclusive-OR Operation)
8. %CHAR (Convert to Character Data)
9. %CHECK (Check Characters)
10.%CHECKR (Check Reverse)
11.%DATE (Convert to Date)
12.%DAYS (Number of Days)
13.%DEC (Convert to Packed Decimal Format)
14.%DECH (Convert to Packed Decimal Format with Half Adjust)
15.%DECPOS (Get Number of Decimal Positions)
16.%DIFF (Difference Between Two Date, Time, or Timestamp Values)
17.%DIV (Return Integer Portion of Quotient)

Page 30

Prasanth A

AS/400 FAQ
18.%EDITC (Edit Value Using an Editcode)
19.%EDITFLT (Convert to Float External Representation)
20.%EDITW (Edit Value Using an Editword)
21.%ELEM (Get Number of Elements)
22.%EOF (Return End or Beginning of File Condition)
23.%EQUAL (Return Exact Match Condition)
24.%ERROR (Return Error Condition)
25.%FIELDS (Fields to update)
26.%FLOAT (Convert to Floating Format)
27.%FOUND (Return Found Condition)
28.%GRAPH (Convert to Graphic Value)
29.%HOURS (Number of Hours)
30.%INT (Convert to Integer Format)
31.%KDS (Search Arguments in Data Structure)
32.%LEN (Get or Set Length)
33.%LOOKUPxx (Look Up an Array Element)
34.%MINUTES (Number of Minutes)
35.%MONTHS (Number of Months)
36.%MSECONDS (Number of Microseconds)
37.%NULLIND (Query or Set Null Indicator)
38.%OCCUR (Set/Get Occurrence of a Data Structure)
39.%OPEN (Return File Open Condition)
40.%PADDR (Get Procedure Address)
41.%PARMS (Return Number of Parameters)
42.%REALLOC (Reallocate Storage)
43.%REM (Return Integer Remainder)
44.%REPLACE (Replace Character String)
45.%SCAN (Scan for Characters)
46.%SECONDS (Number of Seconds)
47.%SHTDN (Shut Down)
48.%SIZE (Get Size in Bytes)
49.%SQRT (Square Root of Expression)
50.%STATUS (Return File or Program Status)
51.%STR (Get or Store Null-Terminated String)
52.%SUBARR (Set/Get Portion of an Array)

Page 31

Prasanth A

AS/400 FAQ
53.%SUBDT (Extract a Portion of a Date, Time, or Timestamp)
54.%SUBST (Get Substring)
55.%THIS (Return Class Instance for Native Method)
56.%TIME (Convert to Time)
57.%TIMESTAMP (Convert to Timestamp)
58.%TLOOKUPxx (Look Up a Table Element)
59.%TRIM (Trim Characters at Edges)
60.%TRIML (Trim Leading Characters)
61.%TRIMR (Trim Trailing Characters)
62.%UCS2 (Convert to UCS-2 Value)
63.%UNS (Convert to Unsigned Format)
64.%XFOOT (Sum Array Expression Elements)
65.%XLATE (Translate)
66.%YEARS (Number of Years)
1 1 8 . E x p l a i n t h e d i ff e r e n t R P G I V R e s t r i c t i o n s .

Function
Array/table input record length
for compile
field length
Graphic or UCS-2 field length
Control fields (position 63 and
64 of input specifications)
length
Named data structure length
Unnamed data structure length
Data structure occurrences
(number of)
Edit Word
Elements in an array/table (DIM
keyword on the definition
specifications)
Levels of nesting in structured
groups
Levels of nesting in expressions
Look-ahead
Named Constant or Literal

Overflow indicator
Page 32

Restriction
Maximum length is 100 Character
Maximum length is 65535 bytes
Maximum length is 32766 bytes
Maximum length is 256
Maximum of 65535
Maximum of 9999999
Maximum of 32767 per data structure
Maximum length of 115
Maximum of 32767 per array/table
Maximum of 100
Maximum of 100
Can be specified only once for a file. Can be
specified only for primary and secondary files.
Maximum length of 1024 bytes for a character,
hexadecimal, graphic, or UCS-2 literal and 63
digits with 63 decimal positions for a numeric
literal.
Only 1 unique overflow indicator can be specified

Prasanth A

AS/400 FAQ
Parameters to programs
Parameters to procedures
Primary file (P in position 18 of
file description specifications)
Printer file (PRINTER in positions
36 through 42 of file description
specifications)
Printing lines per page
Program status data structure
Record address file (R in
position 18 of file description
specifications)
Record length for a file
Storage allocation
Symbolic names

per printer file.


Maximum of 255
Maximum of 399
Maximum of 1 per program
Maximum of 8 per program
Minimum of 2; maximum of 255
Only 1 allowed per program.
Only 1 allowed per program.
Maximum length is 99999 1
Maximum length is 16776704
Maximum length is 4096

Notes:

1. Any device record size restraints override this value.


2. The practical maximum is normally much less.
** D ata are as, Me ssag e s, D ata qu e ue s, S wi tch e s.
Ty p e s o f A u t h o r i t y. * A L L * U S E * C H A N G E * E XC LU D E
Operational Authority, Management Authority, Existence Authority, Data
Management Authority
Ty p e s o f Fi l e s D a t a b a s e Fi l e s , D e v i c e Fi l e s , I C F [ I n t e r C o m m u n i c a t i o n
Fu n c t i o n ] ,
D D M [ D i s t r i b u t e d D a t a M a n a g e m e n t Fi l e s ] , S a v e Fi l e Pa g e 1 2 1
T h e S e n d N e t w o r k Fi l e ( S N D N E T F ) c o m m a n d s e n d s a s a v e fi l e o r a
m e m b e r o f a p h y s i c a l d a t a b a s e fi l e t o a n o t h e r u s e r o n t h e l o c a l s y s t e m
or on a re mote syste m th rou g h th e S NAD S ne twork .
The Send Network Message (SNDNETMSG) command sends a message to
an oth e r u se r on the l ocal or a re mote syste m th rou g h the S NAD S
network.
Th e Se n d Prog ra m Me ssag e (S ND PGMMS G) comman d sen d s a me ssag e to
a named message queue or to a call message queue. A call message
queue can be the *EXT external message queue or a message queue
a s s o c i a t e d w i t h a c a l l s t a c k e n t r y. E a c h t i m e a p r o g r a m o r p r o c e d u r e i s
c a l l e d a n e w m e s s a g e q u e u e i s a s s o c i a t e d w i t h i t s c a l l s t a c k e n t r y. T h e
m e s s a g e q u e u e i s i d e n t i fi e d b y t h e n a m e o f i t s a s s o c i a t e d p r o g r a m o r
p roce d u re .

Page 33

Prasanth A

AS/400 FAQ
The Send Journal Entry (SNDJRNE) command is used to write a single
j o u r n a l e n t r y t o a s p e c i fi c j o u r n a l . T h e e n t r y c a n c o n t a i n a n y
information. The user may assign an entry type to the journal entry and
m a y a l s o a s s o c i a t e t h e j o u r n a l e n t r y w i t h a s p e c i fi e d j o u r n a l e d o b j e c t .

Page 34

Prasanth A

Potrebbero piacerti anche