As400 DataBASE
Q What are the different definition levels in Data Description specifications ?
Q What are the different definition levels in Data Description specifications ?
A File level, Record level, Field level, Join level, Keyfield level, Select/Omit level.
Q What is difference between Source Physical File and Physical File ?
A A Source Physical File contains the source for the various objects created. This file has a specific structure. A Physical File contains data, and the record format can be different for different physical files.
Q What is the difference between Physical and Logical files ?
A Physical file contains data, where as Logical file serves as a access path to database.
Q What is an access path ?
A The order in which the database fields are organized for processing in the program.
Q What are all the different types of access paths ?
A9 Arrival sequence access path,
Keyed sequence access path.
Q How many record formats can you have in a Physical file and in a Logical file ?
A Physical file can contain only one record format, Logical file can contain more than one record format.
Q What is a field reference file ?
A A field reference file is a physical file which contains no data, contains field description. this is used as a reference file by other physical files.
Q What is the default value for the number of increments for the physical file ?
A Three.
Q When is the DFT keyword in PF used for?
A To specify the default value it a field.
Q What is Multi-format logical file ?
A Logical which uses fields from two or more physical files.
Q What is dynamic select ?
A Selection and omission of LF records performed during processing, instead of access path is maintained. This can be used when key access path does not exist.
Q What is the Select and Omit criteria in logical file ?
A This is used to specify rules for the Selection/Omission of records from a Physical File.
Q Can fields be concatenated at the logical file level ?
A Yes, by using CONCAT keyword.
Q When would the ALL keyword be used ?
A Use with Select or Omit, to select/omit records.
Q What is a Join Logical File, Can it be used for Update ?
A Logical file that combines more than one physical file.
Update is not possible through JLF.
Q How many files can be joined at a time, What is the max. no. of files ?
A At a time you can join two files. The max. no. of files is 32.
Only one primary file and the remaining are secondary files, The primary file and atleast one secondary file must be physical files.
Q Is it possible to join the same file to itself ?
A Yes.
Q What is FCFO, FIFO, LIFO in Database environment ?
A These are file level keywords which are used to access the records in the order
FCFO : First Changed First Out
FIFO : First In First Out
LIFO : Last In Fist Out
Q If a file layout is changed, how do you generate new PF and retain data?
A Copy the file and change the structure of Physical file, later copy old file with drop option.
Q What is the overhead on logical file ? How can it be improved ?
A Maintaining access path and storage space. We can improve the performance by using *DELAYED, *REBUILD keywords to enhance the speed.
Q How can the sign of a numeric be ignored when sequencing a logical file ?
A By specifying the record level keyword UNSIGNED.
Q If a field references a field that has an EDTCDE or an EDTWRD keyword specified, can the EDTCDE or EDTWRD from the referenced field ignored ?
A Yes, by using DLTEDT keyword.
Q What does the keyword UNIQUE mean ?
A Records with duplicate key values are not allowed.
Q State three different methods of maintaining access paths ?
A Immediate, Rebuild & Delay.
***********************
Q How to start a CL program ?
A PGM.
Q How many files can be declared in CL ?
A One.
Q Which precedes, the file declaration or variable declaration ?
A Variable declaration and then File declaration.
Q What are the different types of variables available in CL ?
A DEC, CHAR, LGL
Q In CL Program '&' precedes ____ .
A Variables.
Q How do you pass parameters in CL ?
A Using PARM keyword.
Q Can libraries be added to the library list through CL ?
A Yes, using ADDLIBL.
Q What is the difference between CAT, TCAT and BCAT ?
A CAT : Concatenate two variables or constants into one continuous string.
BCAT : Truncates all trailing blanks in the first character string ; one blank is inserted , then the two character strings are concatenated.
TCAT : Truncates all trailing blanks in the first character string, the two character strings are concatenated.
Q How do you end a CL program ?
A ENDPGM
Q What are the different types of messages in CL ?
A Immediate message, Break message, Program message, User message.
Q How can errors be trapped in a CL program?
A By using Monitor Message Command ( MONMSG )
Q What is the maximum length of a variable name in CL ?
A Maximum 11 characters (including '&')
Q What are the limitations of CL (compare to RPG) ?
A You cannot use CL program to :
. ADD or UPDATE records in database files
. Use Printer or ICF files
. Use Program described files
. Use the concept of subfile (to display more than one record), but a single output message subfile is a special type of subfile that is supported well in CL
. Use subroutines.
You cannot declare more than one object (file) in a CL programme.