• No se han encontrado resultados

A. sysibm.sysdatabase - one row for each database. sysibm.sysdbrm - one row for each dbrm.

sysibm.sysplan - one row for each plan.

sysibm.sysdbauth - shows which authids have privileges on which databases. sysibm.sysplanauth- shows which authids have privileges on which plans. sysibm.sysrels- one row for each referential constraint.

Printed

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?

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.

Ans:- READC

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 CL program? To define variables.

48.) How do you read a specific record in a keyed database file in a CL program? OVRDRF FILE(filename) POSITION(*KEYx a b c) and RCVF

49.) How do you access the local data area in a CL program? RTVDTAARA DTAARA (*LDA) RTNVAR (&var)

50.) What CL command is used to read a file? RCVF - Receive File

51.) What CL command is equivalent to write a display file in RPG? SNDF - Send File

52.) What CL command is equivalent to write/read a display file in RPG? SNDRCVF - Send/Recieve File

53.) What CL command is used to determine the logical files associated with a particular physical file?

DSPDBR - Display Database Relations

54.) Explain the use of DSPFFD.

To display a physical files record layout structure.

55.) Why would a programmer use the OVRDBF command?

To override default values set for the physical file; i.e., to utilize a specific member in a physical file.

56.) What CL command is used to debug a program on-line? STRISDB - Start Interactive Debugger

57.) What is the CPYF command used for? a.) To print all records in a physical file,

b.) To transfer records from one PF object to another PF object.

58.) What is the purpose of the *MAP and *NOCHK in the CPYF command? a.) To transfer data byte by byte.

b.) To transfer data field by field regardless of field names.

59.) What is the purpose of the CHGVAR command? To change the value associated with a CL variable.

60.) How does a programmer create a new variable within a CL program? By using the DCL command.

61.) What is a command label?

An area of transfer within a CL program from which to continue processing directed by a GOTO command.

62.) Explain parameter passing.

To pass variables from a CL or RPG program to another CL or RPG program.

63.) How can a programmer exit out of a CL program? By using a RETURN command.

64.) Why would the PGM line contain a PARM?

The CL program is using a value passed from another processing 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.

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.

CLP Question Bank