Total
Time: 1 hr
Tot.
Marks: 50
Tick one or more correct choice/s (1 Mark each)
1.
Which of the following is not a valid CL datatype?
(a) *dec
(b) *char
(c) *log
(d) *lgl
2. Max no.
of files that can be declared in a CL program
(a) 0
(b) 1
(c) 50
(d) 9999
3. How many
files can be updated through CL
(a) 0
(b) 1
(c) 20
(d) 50
4. Predict
which programs will be executed in the following code when &Opt = ‘1’:
IF COND(&Opt *EQ ‘1’)
THEN
( Call Pgm4)
ELSE
CMD(Call
Pgm3)
CALL
Pgm(Pgm2)
CALL Pgm(Pgm1)
5. Which of
the following files can be used in the TOFILE parameter of CPYF?
a)
Logical file
b)
Join Logical file
c)
Tape file
d)
None of the above
6. Which of
the following commands cannot be used on the command line?
a)
RTVDTAARA
b)
CRTDTAARA
c)
CHGDTAARA
d)
All the above
7. What is
the command used to find all logical files based on one physical file?
a)
DSPDBR
b)
DSPOBJD
c)
DSPPFM
d)
a and b
8. Which is
the command used to find the access path of a file?
a)
DSPFFD
b)
DSPFD
c)
DSPOBJD
d)
All the above
9. Which of
the following combination of files can be declared in CLP?
a)
Printer file, Database file
b)
Display subfile, Message subfile
c)
Message subfile, Database file
d)
Database file, Display subfile
10. What is
the function of DSPPGMREF?
a)
Displays list of all files referred in the program
b)
Displays the list of all objects used in the program
c)
Displays all copy books used in the program
d)
Displays list of all call programs used in the program
Use
Short Answers:
(2 Marks each)
1.
What is the difference between program level and
command level MONMSG?
2.
What is the difference between TFRCTL command and CALL
command?
3.
How can the data be shared across different jobs?
4.
Differentiate between data base files and data areas
5.
How do you compile RPG program having compile time
override?
6. What is
wrong in the following program:
PGM
MONMSG
CPF0000
DCLF
FILE (INPUT)
ENDPGM
7. How do you know the keys used in a
physical file without using SEU?
8. How to extract a word “hello” from the
string “hello world”?
9. Which has the highest priority if you
give both program level MONMSG and command level MONMSG?
10. How to use multiple files in CLP?
Mention
True/False: (1
Mark each)
1. Two
objects with same name and type cannot exist in different libraries
2. The
built-in menu called MAJOR organizes all the AS/400 commands
3. SNDF
writes a record to a display or a data base file.
4. The
value of a CL variable can be changed using CHGVAR
5. The
current library cannot be a duplicate of any library in the library list
6. The
RETURN command in a program removes that program from the program stack
7. A data
area is an object used to hold data for access by any job running on the
system.
8. Library
list is an object
9. LDA can
be used to pass information to a subprogram without the use of a parameter list
10. SNDPGMMSG command allows us to send
messages to a work station user or the system operator.
Answer
the following questions: (2 marks each)
1. Not all
CL commands can be used in a CL program (TRUE/FALSE)
2.
Declare commands must precede all other commands except
the PGM command. (TRUE/FALSE)
3. ENDPGM
command is a mandatory command in a CL program. (TRUE/FALSE)
4. ____________________________ Monitors
for escape, status, and notify messages sent to a program's message queue
5. __________________
identifies a command in a CL program and is used for branching purposes
No comments:
Post a Comment