As 4001

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 10

RPG:

1.) What is needed in an RPG program to receive parameters?


An *ENTRY parameter list.

2.) What is KLIST used for?


To define a composite key.

3.) What is CASxx used for?


To execute subroutines based upon the result of a logical
comparison.

4.) What is the advantage of using *LIKE DEFN?


It automatically updates attributes of the work field, when
attributes
of the base field change and the program is recompiled.

5.) What is the difference between just exiting a program with retrn or
by setting on indicator LR, first?
Open files are closed when exiting with LR equal to ON.
Open files remain open when using RETRN with LR equal to OFF, and
the
program is still resident (potentially active.)

6.) What RPG operation codes are associated with data areas?
IN, OUT, UNLCK and DEFN.

7.) How are the following RPG operation codes used?


a.) CAT
To concatenate fields and /or constants.
b.) SCAN
To search fields/arrays/data structures for the occurrence and
start position of a string.
c.) CLEAR
To initialize fields, record arrays, data structures to blanks
or zeros.

8.) What operation code should be used to check for the existence of a
specific record in a keyed file?
SETLL should be used. CHAIN should be used only if data from the
file
is needed.

9.) How are parameters accepted in an RPG program?


*ENTRY PLIST

10.) How are parameters passed in RPG?


CALL ‘----‘
PARM xxx

11.) How do you define a subfile in RPG?


IPFC(prompt) ---- RRN KSFILE rcdfmt-name.

12.) What is a compile-time table?


A table whose information is hard coded in the program source.

13.) What is a pre-execution table?


A table whose data comes from an external file.

14.) How is data accessed from a table?


A LOKUP operation.

15.) How can a subroutine be executed?


EXSR

16.) How can indenting be utilized to make it easier to read a


compiled RPG program?
By overriding the indent parameter in the CRTRPGPGM command with a
character.

17.) What is the use of the MOVEA operation?


To transfer data to an array or transfer an array to another
storage location.

18.) What is the difference between the MOVE and the MOVEL?
MOVE transfer is a right justified move, MOVEL is a left justified
move.

19.) How does the READP work?


It reads data from a physical file in reverse order.

20.) What is the operation SELEC used for?


For CASE structure handling.

21.) What is an externally described file?


Any DDS file that has its’ layout automatically defined as
part of the RPG program.

22.) What is a level checking error?


When a HLL object isn’t linked with the current DDS object.

23.) What does the phrase “subscript out of range” mean?


It means you are trying to access an area outside of the defined
table range.

24.) What is an Output queue (such as *OUTQ?)


An area, which stores all spooled files waiting
to be printed.

25.) What is an Job queue (such as *JOBQ?)


An area that stores all jobs waiting to be compiled.

26.) What does IPL stand for?


Initial Program Load, which is used for start-up.

27.) What is PWRDWNSYS?


The command to power down the AS/400.

28.) What is the purpose of the EDTOBJAUT command?


To permit or exclude user access to specific objects.
Subfiles:
29.) What DDS keywords are required when defining a control record
format?
SFLCTL, SFLDSPCTL, SFLPAG, SFLSIZ.

30.) What operation codes can be used to retrieve subfile record?


READC and CHAIN.

31.) Explain 2 ways of handling the roll-up/roll-down keys in an RPG


subfile program.
If SFLSIZ > SFLPAG, OS/400 will handle scrolling.
If SFLSIZ = SFLPAG, the programmer must handle scrolling by
checking roll-up or roll-down indicators and filling subfile
appropriately.

32.) Explain the following DDS keywords:


a.) SFLEND
Controls the display of “plus sign.”
b.) SFLNXTCHG
Controls “modified data tag” on subfile records.
c.) SFLRCDNBR
Controls what subfile page is displayed and where cursor goes.
d.) SFLDROP
Controls when a subfile fold area is displayed.

33.) How do you clear a subfile?


Set the indicator associated with the SFLCLR keyword to ON and
WRITE
the subfile control format.

34.) What are the 3 types of subfiles?


Single page, expandable and load-all.

35.) Which type of subfile has the better performance?


Single page.

36.) What is a subfile control record?


The record that controls the display of the record format and text
information.

37.) What is a subfile record number?


The internal value associated with the each subfile record.

38.) How are roll keys handled by the program and in the system?
a.) Using ROLLUP and ROLLDOWN keyword indicators, or
b.) Automatically, if SFLSIZ > SFLPAG.
39.) What is a subfile record format?
The record that contains the displayable data.

40.) What must follow the SFLCTL keyword in the subfile control record?
The name of the Subfile Record Format.

41.) What does the SFLNXTCHG keyword mean?


To activate the READC operation and allow all records to be
modified
as changed records.

42.) How do you utilize the subfile message control?


By using SFLMSG and MSGLOC keywords.

43.) How does a subfile handle displaying multiple lines of subfile


data?
Use the SFLDROP keyword at record level in the control record and
assign a command key to the keyword. Ex: SFLDROP(CF11).

44.) Define the following keywords: SFLPAG and SFLSIZ?


a.) Number of records displayed per page.
b.) Number of total records displayable in the subfile.

CL:
45.) If the field is defined in DDS, how is it referenced in a CL
program?
By declaring the field(DCL) and placing an ampersand in front of
the
variable name.

46.) What is the main use of MONMSG?


Error trapping.

47.) What is the purpose of the DCL statement in a Cì¥Á45@


44ð¿4444444444444\744
5bjbjÏ2Ï2555555555555555555 5)Z55X55-
X55\/555555555555555555555555555555ÿÿ¤555555555ÿÿ¤555555555ÿÿ¤
55555555555555555ˆ55555. 555555. 55. 555555. 555555. 555555. 555555.
55µ55555555555B 555555Æ/555555Æ/555555Æ/555555Æ/55
666Ò/66|666B
666666h@66ö666Z0666666Z0666666Z0666666Z0666666Z0666666Z0666666Z0666666Z0
666666466666-4666666-4666666-466;666Y466È66!:66È66é?66$666^A66R66°C66666
@66§6666666666666666666.
666666Z06666666666666666666666Z0666666Z0666666Z0666666Z0666666
@66666666666666. 666666.
666666Z066666666666666Z0666666"@66666366666636666663666666Z066r 66.
666666Z0666666.
666666Z06666664666666666666663666666666666666666666666666666666666666666
666666666666Z06666664666666366Ø666366666666666666ð3666666. 666666.
66666666666666666666666666666666666666666666666666666666666666ð3666666Z0
666666N066
777à.ïÀ†Ä 77777777Æ/777777Ì1776 77ð377777777777777477
8888@880888h@888888ð3888888@D8888883888888@D888888ð388888888888888B
888888B 888888. 888888. 888888. 888888.
8888888888888888888888@D88888888888888. 888888ð388
888Z0888888Z08888883888888Z0888888Z0888888888888888888888888888888888888
88Z0888888Z0888888Z0888888
@888888
@888888B 888888B 88„.88Æ/88888888888888388888B 888888B 888888Æ/8888888
888888888888888888888888888888888888888888888888888888888888888888888888
888888888888888888888888888888888888888888888888888888888888888888888888
888888888888888888888888888888888888888888888888888888888888888888888888
888888888888888888888888888888888888888888888888888888888888888888888888
888888888888888888888888888888888888888888888888888888888888888888888888
888888888888888888888888888888888888888888888888888888888888888888888888
888888888888888888888888888888888888888888888888888888888888888888888888
888888888888888888888888888888888888888888888888888888888888888888888888
888888888888888888888888888888888888888888888888888888888888888888888888
888888888888888888888888888888888888888888888888888888888888888888888888
888888888888888888888888888888888888888888888888888888888888888888888888
8888888888ogram is using a value passed from another processing
program.

65.) How can a programmer send a message from a CL program?


Using the SNDPGMMSG command - Send Program Message.

66.) What does the DSPPFM command do?


Displays a list of records on the CRT from the physical file.

67.) What is the purpose of the DSPLIBL command?


Displays a list of all libraries whose objects are available to
the
interactive job.

68.) Explain the STRSEU command.


To create a new program or put the last used program in edit mode

DDS:
69.) In the DDS keyword WINDOW(___), what belongs inside of the
parentheses?
Either the coordinates of the window or the name of the record
format.

70.) What is the difference between CA and CF command keys?


CA means that screen validity checking is bypassed and no screen
data is passed to the program. CF means that screen validity
checking is performed and screen data is passed to the program.

71.) What is the DDS keyword UNIQUE used for?


To prohibit duplicate keys in a keyed database file.

72.) Does a logical file contain data?


No, it contains access path information only.
73.) Name three types of access path maintenance.
Immediate delayed and rebuild.

74.) What are two methods of creating a record that consists of fields
from two or more files?
Join, LF and OPNQRYF.

75.) What keyword is used to reference the same field in another file?
REF - Reference

76.) What keyword is used to join several physical files into one
logical
file?
JFILE - Join File

77.) What does DDS stand for?


Data Description Specifications.

78.) What command can be used to clear a physical file?


CLRPFM - Clear Physical File Member

79.) What is the difference between a physical file and a logical file?
Physical files contain the data, a logical file us an access path
to the physical data.

80.) Can you copy data from a physical file to a logical file?
No.

81.) What is a display file?


A displayable screen file.

82.) What is a printer file?


A print layout for a report that can be used by any program.

83.) Can a physical file contain more than one member, and how is it
accessed?
Yes, by using OVRDBF(___) MBR(___)

84.) What does the Open Query file do?


Creates an open data path to physical file data.

85.) When a PF is compiled and default values used how many members does
it have?
1

86.) What is the keyword VALUES used for?


To set records from a PF based on field values in storage.

87.) What is the keyword COMP used for?


To set records from a PF using a comparison between two field
values.

88.) What is the keyword RANGE used for?


To set records from a PF based on a min/max value of a field.
89.) Why would a DSPF program use a DSPSIZ keyword?
To select the screen display size used.

90.) What is the INDARA keyword used for?


To store all program indicators into a useable array.

91.) What is the purpose of the OVERLAY keyword?


To allow multiple screen records to display at one time.

92.) How can a programmer control how data on a screen will display?
By using the DSPATR keyword.

Miscellaneous:
93.) What is QTEMP?
A unique temporary library associated with each job. It is deleted
at the end of a job.

94.) What is the purpose of level checking?


To ensure that the version of a file used by a program has not
changed since the program was compiled.

95.) What two CL commands are usually used to debug a program?


STRDBG and ADDBKP - Start Dedub abd Add Breakpoint.

96.) What is QCMDEXC?


A program that can be called from an RPG program to execute most
CL commands.

97.) What is the purpose of the CHKOBJ command?


To test for the existence of and object and to check for
object authorization for the user.

You might also like