Results for "As400 Interview Questions"
As/400 Numbers

AS400 Numbers

1.  What is the maximum number of record formats in DSPF?
A.1024 (One thousand and twenty four)

2. What is the maximum number of fields under a record format of physical file?
  1. 8000 (eight thousand)
3.      What is the maximum number of parameters allowed in RPG?
A.255 (Two hundred and fifty five)

4.      What is the maximum number of parameters allowed in CLP?
A.43 (Forty three)

5. What is the maximum number of subroutines allowed in RPG?
A.254 (Two hundred and fifty four)

6. What is the maximum number of files allowed in RPG?
A.50 (Fifty including eight printer file)

7. What is maximum number of Arrays allowed in RPG?
A.250 (Two hundred and Fifty)

8. What is the maximum number of key fields allowed defining in a physical file?
A.120

9. How many libraries can be there in library list?
A. Total 40 (15 systems and 25 applications)

10. What is the type, length of a LDA?
A.*CHAR, 1024 bytes

11. What is the maximum number of records you can specify in a display file?
A.1024

12. What is the maximum number of subfiles that can be specified in a display file,
A.512

13. Maximum number of subfiles that can define in a RPG program for one display file is
A.24

14. Maximum number of subfiles that can be active for a single file is?
A.12

15. What is the maximum length of a variable name in CL?
 A. Maximum 11 characters (including '&')

16. How many files can be defined in F specs?
A.50

17. How many printer files can be defined in F specs?
A.8

18. What is the length of a variable in RPG?
A. 6 Characters.

19. What is the maximum number of elements in an array?
A.9999

20 How many parameters can be defined in a RPG program. ?
A.255

21. What is the maximum number of times Multiple Occurrences DS can occur in a program?
A.9999

22. How many files can be defined in F specs?
A. maximum of 50 files.

23. What is the maximum number of subfiles that can specified in a display file?
A.512

24. The maximum number of subfiles that can be active for a single file is
A.12

25. The maximum number of subfiles that can defined in a RPG program for one display file?A.24

26. How many files, printer files you can describe in a RPG
A.50 files and 8 printers

27. What is maximum size of data area?
A.9999.

28. What are the maximum parameters can be passed from one RPG program to another RPG program?
A.255

29. How many maximum parameters can be passed from on RPG program to another CL program?
A.40

30. How many maximum arrays can be used in a single RPG program?
A.200.

31. How many maximum loops can be used in a single RPG program?
A.100

32. How many maximum printer files can be used in a single RPG program?
A.8

33. What is the maximum length of an OCCUR?
A.9999.

34. What is maximum size of a subfile?
A.9999

35. Maximum report length is 132, if user is designing a report using RLU?
A.FALSE (378 Max).

36. How many Specs are there in RPG & Which are they?
A. There are 7 Specs in RPG they are H, F, E, L, I, C & O.

37. How many printer files maximum can be used in single RPG program?
A.8 because of the overflow indicators OA-OG & OV.

38. Maximum number of Records in Display File?
A.1024

39. How many types of objects are there on As/400?
A.80

40. How many triggers can be associated with a single PF?
A.6 (max)

41. What is the size of the filename in RPG?
A.8 Characters (Max.)

42. How many maximum spaces could be given in O Specs?
A.3

43. What is the length of the variable in the given example? DCL VAR (&Name)
TYPE (*Char)?
A. Default 32 & for Decimal 15,5

44. A CL program, EMPCL1 calls the RPG program EMP001 & the calls the RPG
Program
EMP002.RPg program EMP001 & EMP002 were both written to process the file, In order to test changes in EMP001 a test file called TESTEMP is library TESTLIB needs to be used EMP002 should process EMPMAST as it normally would. Add the following CL statement directly before the call to EMP002 DLTOVR FILE (EMPMAST)

45. Submitting a job using numeric parameters, the length of the parameter
Should be?
A.15,5

46. How many files can be opened in RPG IV program?
A. No Limit

47. How will you achieve POSITION TO in Load all subfile?
A. While loading subfile move RRN, KEYVALUE in to a two dimensional array. When a key value is entered into POSITION TO field, having a LOOKUP into a array we can get a corresponding RRN. Assigning RRN value to SFLRCDNBR and then displaying the sub-file.

48. What key word is used when screen is re-displayed?
A.RSTDSP is a parameter to be specified at compile time for display file.

49. What is JOBQ and PRINTQ?
A. Jobs go into the job queue in order to run in a subsystem. Print queue where the printer files (report) reside and wait for their turn to get printed.

50. Can a file be journaled without using it under commitment control?
A. Yes
51. Can a file be used under commitment control without being jorunaled?
A. No

Description
Number
Arrays and tables
Maximum of 200 per program.
|Array/table input record length         
for compile time
Maximum length is 80
Character field length               
Maximum length is 256
Control fields (position 59 and 60 of input specifications) length
Maximum length is 256.

Data structure length                
Maximum of 9999.
Data structure occurrences (number
Of.
Maximum of 9999 per data structure
Edit Word                                
Maximum length of 24 for literals or 115 for named constants.
Elements in an array/table
(positions 36 through 39 of
extension specifications)
Maximum of 9999 per array/table
File                                          

Maximum of 50 per program.
Levels of nesting in structured   
groups |
Maximum of 100.
Look-ahead                             
Can be specified only once for a file. Can be specified only for primary and secondary files
Named Constant                         

Maximum length of 256 for character named constant, 512 for hexadecimal named constant 30 digits with 9 decimal positions for numeric named constant.
Overflow indicator                
Only 1 unique overflow indicator can be specified per printer file.
Parameters                                   
Maximum of 255
Primary file (P in position 16 of           
| file description specifications)
Maximum of 1 per program.|
Printer file (PRINTER in positions  40 through 46 of file description Specifications)
Maximum of 8 per program.|

Printing lines per page              
Minimum of 2; maximum of 112
Program status data structure        
Only 1 allowed per program
Record address file (R in position
16 of file description
| specifications)
Only 1 allowed per program
Record length for program               
described file (positions 24
| Maximum length is 9999. (1)
Subroutines                                        
| Maximum of 254 per program.



                          

Unknown Saturday, 1 June 2013
AS400 Interview Questions- Part2

AS400 Interview Questions- Part2

1.  Why should 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.

2.Explain about RTNCSRLOC?
            It will give field name where the cursor is living in a sub-file or a display-file.

3. How would you print only last 10 pages of a report?
CHGSPLA command is used. In that the PAGE RANGE parameter will control the no. Pages to print.

4. What is a message file?

            It is used to store all the messages to be sent to programs. It has two parts.
1.      Message ID –7 Character
2.      Message Description

5. What is an Object?

Anything, which occupies memory, is known as Object. When you execute a program, object will be created. The object has a set of attributes, which includes name, type, size, creation data, and a short description of the object. WRKOBJPDM is used to display all object in a library. With in the library the object name and its type is Unique

6.  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.

7. CRTDUPOBJ – Explain.

            Create Duplicate Object. To copy an object we use this command.

8.  What is the purpose of the DSPLIBL command?
Displays a list of all libraries whose objects are available to the interactive job.

9. What is a Library? Explain its types.
Library is an object of type *LIB that is used to group related objects. Thus library is a directory to a group of object.
Library is an open-ended directory.
Library can never become ‘full’ as it has no finite size.
Library reside only in system library QSYS.
The order of library is
System library – 15 nos. e.g. QSYS
Product library – 1
User library – 25 nos. QTEMP, QGPL are user libraries.
Current library – 1

ADDLIBLE, RMVLIBLE, CHGCURLIB, DSPLIBL, EDTLIBL is used to add the content to current library, remove the content to current library, change current library, display all library and editing the library respectively.

10. What are user library?
            QTEMP, QGPL and MYLIB

11. What are library list and how many libraries can be in library list?
The library list is a list of library, which is to be searched for existence of a file. It contains four parts, System part, Product part, User part and Current library.
We can place as many as 40 libraries in a library list. In that 15 as system lib and 25 as user lib.
The related commands are EDTLIBL, ADDLIBLE, RMVLIBLE, and DSPLIBL

12. What is current library?
            The command to change a library into current library is CHGCURLIB

The library, which is always in the top of library list and it, is the first library searched when a job is executed.

13. What is the purpose of changing current library?
            If you compile a member then we need to change the current library.

14. What two CL commands are usually used to debug a program?
STRDBG and ADDBKP - Start Dedub abd Add Breakpoint.

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

16. How you execute CL command in RPG?
            By using QCMDEXC command we can execute CL command in RPG.

17. What does UPDPROD *NO and INVOKE PGM *YES mean?
UPDPROD *NO (default) wont update the files used in the program and *YES will do.

INVOKE PGM *YES (default) will execute the CALLING program simultaneously and *NO will execute only when the CALL statement is executed.

18.  What is QCMDEXC?
A program that can be called from an RPG program to execute most
CL commands.

19. Which OS/400 command does not execute in command line?
RTVDTAARA & RTVSYSVAL .For this you have to declare one to variable

20. How to send message to the screen by SNDPGMMSG?
By passing the Message file name, Message ID and Message Data, we can send a message to the screen.

21. What is the difference between CALL and Transfer Control?
CALL                         will transfer the control according with the CALL STACK
TFRCTL         [Transfer Control] will remove the CALL STACK and transfer the control to the calling program. The CALL is used to interface between two different types of programs, whereas TFRCTL is used to call CL programs only.

22. What are the different Queues available in OS/400?
They are
·         Job Queue
·         Message Queue
·         Output Queue
·         Data Queue
Job Queue:                 It contains the list of batch job waiting to be compiled.

Message Queue:         It contains various messages to be sent to programs, procedures or user.

Output Queue:           It contains all the spooled files waiting to print.

Data Queue:               It is a temporary storage. We can able to store and retrieve data. But either once the data retrieved or the waiting time closed the data will be lost.
Sending a message to a data queue by QSNDDTAQ, QRCVDTAQ and                           CLRDTAQ commands.

23. QSNDDTAQ, QRCVDTAQ Explain.
           QSNDDTAQ is a command, that is used to send a message to other / same program.
QRCVDTAQ is a command, that is used to receive a message from other / same program.

24. What are the mandatory parameters for declaring a Data Q?
These are DataQ Name, Library, Data, Length of the data and Wait. The Wait is appearing only on the QRCVDTAQ
  
25. Explain RUNSQLSTM statement.
It is command, which is used to store and execute set of sql statements. These statements may be insert or update or delete. Select statements can’t be used. These to be included with the source type as sql. Then using strsqlstm to execute the program.

RUNSQLSTM SRCFILE (XXLIB/PF01) SRCMBR (SQL01)
COMMIT (*NONE)

26. How to create RPG, RPGILE, CL, CLLE, PF, LF, DSPF and RLU?
CRTRPGPGM            : used to create RPG
CRTCLPGM              : used to create CL program
CRTBNDRPG            : used to create RPGILE program. (CRTBNDRPG = 
                                    CRTRPGMOD + CRTPGM)
CRTBNDCL               : used to create CLLE program
CRTPF                        : used to create a PF
CRTLF                        : used to create a LF
CRTDSPF                   : used to create a Display File

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.

29. What are the tools available in AS/400?
·         Program Development Manager (PDM)
·         Source Entry Utility (SEU)
·         Data File Utility (DFU)
·         Screen Design Aid (SDA)
·         Report Layout Utility (RLU)
The commands to use these are
STRPDM, WRKMBRPDM, WRKOBJPDM, WRKLIBPDM, STRSEU, STRDFU, STRSDA and STRRLU

30. Explain the STRSEU command.
To create a new program or put the last used program in edit Mode

31. What is QTEMP?
A unique temporary library associated with each job. The object in this library will be deleted when the workstation signoff.

32. What is PDM?
PDM (Program Development Manager) is a tool to simplify software development and maintenance and is used to work with library, objects and file members and also with user defined commands.

WRKLIBPDM
Work With Library PDM. To work with the objects inside the library, like copy delete the objects.
The default parameter is ‘lib         *prv’

WRKOBFPDM
Work With Object PDM. To work with the objects resides in a source physical file such as rename, copy, delete, edit etc.

WRMBRPDM
Work With Member PDM. To work with the file members of a source physical file such as rename, copy, delete, edit etc.
            Related commands are
           
WRKLIB : To work with the library object in the system library or if we specify the lib name in the parameter then we can work with the objects in that specified library.
The default parameter is ‘lib           *libl’

            WRKOBJ : To work with the specified object. The parameter to pass is ‘object name’.
The difference between WRKOBJPDM and WRKOBJ is the ‘obj attribute’ will not be in WRKOBJ
Obj name                     ----------
                                    Lib name                     *libl      
                                    Obj type                      *All]
COMMIT (*NONE)

33. Explain WRKOBJPDM and DSPOBJD
DSPOBJD if we know library name and object name and we want to know the source physical file where it is residing then dspobjd with option as services instead of basic will give the source physical file name.

WRKOBJPDM is used to list all in particular library. If we want to list all rpgle programs, then put type as rpgle. It is just like a DIR command on DOS.

34. What is job and explain its type?
            Every piece of work runs on the system is called job.
            The types are
Interactive job
The job runs on the system after one sign-on the workstation is called interactive job and it will end when sign-off.
Batch job       
It is the predefined sequence of work submitted to the Job Queue. It wont be interrupted by the user. Thro’ SBMJOB command we can submit the Batch job to Job-Queue.

35. How would you see the Batch job?
            Thro’ the command WRKSBMJOB.

36. What are the attributes for the job?
            Job Number, Job Name and User Name.

37. What is the Error severity?
            Error Severity determines the level of severity required to terminate the job.

38. What is the error indicator?
In C spec, we can declare 3-types of indicators. High, Low and Equal. Here Low indicator acts as error indicator.
                                                     HiLoEq
C              READ     REC1           252627
Here 25 is EOF reached, 26 is No record found and 27 is Record found

39. What are the authorities in AS/400?
                                i.            *ALL              -has all authorities
                              ii.            *CHANGE     -has object operation, read, add, delete and update
                            iii.            *USE              -has object operation and read
                            iv.            *EXCLUDE   -none
                              v.            *READ (Read)
                            vi.            *ADD (Add)
                          vii.            *UPD (Update)
                        viii.            *DLT (Delete)

40. How would you change the authority of an object?
            GRTOBJAUT command will change.

41. What are different database functions?
§  CTROBJ
§  DLTOBJ
§  CHGOBJ
§  RTVOBJ

§  CRTDUPOBJ

Unknown
DDS (Data Description Specifications.)

  
1. What does DDS stand for?
Data Description Specifications.

2. What are the types of files?
·         Data base files
·         Device file
·         DDM files (Distributed Data Management files)
·         Save files

Database files
            This is the actual database for AS/400.
            It includes PF, LF, and Field Reference Files

Device files
A device file contains the description of how to use the physical devices such as display stations, printer and tape devices. E.g. Display file, printer file.

DDM files
The DDM files are employed when we tries to access a file from a remote system to our current system. The current system is called source system and the remote system is called target system. Just like other database files the DDM files are to be opened before they are used in program. After they are created an access path is created, thro’ which the target system is accessed.
DDM files serve as a medium, connecting the program running on source system and the file on the target system.
They are used to
     ·         Copy a file from one system to another.
     ·         Manage file on a remote system.
     ·         Access data from a remote system.

Save files
They are used to hold the data in a format for back up and recovery purposes.

3. What is Source Physical File?
Source physical file is also a file, which has one or more files included in it. It is just like a directory and it contains many members. The members are like a various programs residing in the directory. CRTSRCPF is used to create source physical file.

4. What is a member?
            A member is a subset of data within a file.
            All program, files within a source file are called member for that file.

5. What is a Physical File?
It is an object its type is PF, that physically occupies memory space for the purpose of store and retrieve data. It is a single record format. CRTPF command is used to create a physical file. Maximum number of fields included in a PF is 8000. Maximum no of key fields included is 120.

6. What are the four level entries of PF?
There is File level entries, Record level entries, Field level entry, and Key level entry.

File level entry keywords are UNIQUE, LIFO, FIFO, FCFO [First Change First Out], REF.
In record level entry, we can give the Record format name.
In the field level entry, we can define the field names, types and size.
In the Key level entry, we can define the key field.

7. UNIQUE – explain.
            It is a file level keyword specified not to allow a duplicate key in a keyed file.

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

9.  When a PF is compiled and default values used how many members does it have?
One
10.  What does the DSPPFM command do?
Displays a list of records on the CRT from the physical file.

11.  Explain the use of DSPFFD.
To display a physical files record layout structure.

12. How would you change the attribute of file?
CHGPF command is used. By this we can change the length of field, wait time, field name, etc.

13. DSPDBR – Expalin.
Display Database Relation. It tells the no. of logical file that are built over a specified PF.

14.  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.

15.  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.

16. How to copy a ten specified records from one file to another file?
By using CPYF command we can copy record from one file to another file. If we want to copy from one position to another position, we have to give the starting position and ending position. If we want to copy based on condition, we have to give the criteria on the sql statement.

17. ADDPFCST – explain
ADDPFCST is a command that is used to define the Constraint on your physical file. The constraint has several types. These are REFCST, UNQCST and PRIKEY. By the by, this command is helps to define Update rules and Delete rules.

18. How you will establish Referential Integrity in AS/400?
Referential integrity is a relation between two files, the parent file and the dependent file. The relationship establishes that every record in the dependent file has to have a matching record in the parent file.

            By using ADDPFCST command, we can establish in AS/400.

Let we have two PF namely Master and Invoice the fields in Master are CustNo, CustName…. And Invoice PF has the fields are Custnum, Invno, Invdate…

            Now we are going to establish referential constraint to those files.

            File                            : Invoice
            Library                      : xxxxxx
            Constraint type           :*REFCST
            Constraint Key           :Custnum
            Constraint Name        :*GEN
            Parent file                  :Master
            Library                      :xxxxxx
            Parent Key                  :Custno
            Delete Rule                 :*cascade
            Update Rule                :*restrict

            Thus the referential constraint has been created

19. Explain DSPFD and DSPFFD.
Display file description is used to list the total number of records in the files remaining records to be added and other related information about the file.
            Display file field description is used to listing details about individual fields

20. What is Normalization?
Removing replication of data by applying integrity rules is known as Normalization. Suppose a table have empno, empname, age, address, dob, monthyear, salary fields and the table has the following data
101      raja      28        dsfsdfsdfsd     10-4-77            0102    54354
101      raja      28        dsfsdfsdfsd     10-4-77            0202    54354
101      raja      28        dsfsdfsdfsd     10-4-77            0302    54354
101      raja      28        dsfsdfsdfsd     10-4-77            0402    54354
101      raja      28        dsfsdfsdfsd     10-4-77            0502    54354
101      raja      28        dsfsdfsdfsd     10-4-77            0602    54354
101      raja      28        dsfsdfsdfsd     10-4-77            0702    54354

Here the name, age, address, DOB are fixed data. By feeding these data again and again the table size will be expand. So we can put these data another table by using integrity rules. So the table can be split by
PF01 => Empno, empname, age, address, DOB where empno is KEY
PF02 => Empno, Month year, salary

Now PF01 can has only one record and PF02 has 7 records.

21. How you list all LF of PF?
DSPDBR is used to display all the files, which are related to the physical file. It display all the logical files that are referring the physical file and also list the child table, if it has a relationship with that file.

22. What is a Logical File? And give its types?
It is used to access the data in a physical file.
It cannot exist with out a physical file. It can have multiple record formats. By using LF we can change the key field and attribute size. We can filter the data with criteria by using select and omit command. CRTLF command is used to create a LF. It accesses the data by the access path.
            There are two types of LF
            Join Logical files.
            Non Join Logical files.


23. What are the two types of logical files and its difference?
            There is Join Logical files and Non-Join Logical files.

Join Logical Files
Non Join Logical File
Impossible to insert, update and deleting records.
Able to insert, update and deleting records.
Up to 32 record format can be specified
Only one record format can be specified
Commitment control is possible
Commitment control can’t be used


24. What are the 6 level entries of LF?
They are
File level
Record level
Join level
Field level
Key level
Select/omit level entries.

25.  Does a logical file contain data?
No, it contains access path information only.

26. Explain Non-Join Logical file.
Logical files, which can be derived data from one or more than physical file. But not joining themselves is known as Non-join logical file. If it retrieves data from one physical file, then it is single record format and if it is retrieve data from multiple physical file it has multiple record formats.
There are five level entries in Non-Join Logical file.

File level entries
Record level entries
Field level entries
Key level entries
Select / Omit field level entries.

27. DYNSLT – explain.
Dynamic select. It is a file level keyword used to select records during execution time and the record will not be selected until the file is opened in program.

28. Explain Join Logical file.
A Join Logical file that combine, in one record format from two or more physical files. A PF can’t be changed through a JLF. We can’t insert, update and delete records. DFU can’t be used to display a JLF. Only one record format can be specify. Commitment control can’t be used.
Let PF01 has EmpNo, Empname fields and PF02 has EmpNo, Salary. If we join these files by EmpNo, the result will be EmpNo, EmpName, and Salary.



29. What are the mandatory keywords for join logical file?
            JFILE – Record level
            JOIN – Join level
            JFLD – Join level
            JREF – Join level

30. Explain Self-Join with an example.
            Join a file to itself is known as self-join

Let PF01 has the fields of EmpNo, EmpName, Salary, MGRID, Job.and has the following data

101      raja                  43545  10001  engr
102      mohan             34544  10002  manager
103      kannan             43546  10002  clerk   
10001  mani                54654  10002  MD
10002  ganesh             57656 

Suppose the LF has EmpNo, EmpName, and MGRName

101      raja      mani
102      mohan ganesh
103      kannan ganesh
10001  mani    ganesh
10002  ganesh xxxxxx

31. What is access path and what are the various ways to creating access path?
It is a imaginary path, thro’ which the data of a file is accessed for processing. It tells the order in which the record to be retrieved.

There are two types of access path.
Key Sequenced access path.
In case of key sequenced access path, the records accessed according with the key field.

Entry Sequenced access path
In case of Entry Sequenced access path, the records accessed which the order they entered.
Here the record will be accessed by either FIFO or LIFO or FCFO sequence, which is specified in the PF.

Select Omit criteria access path

32.  Name three types of access path maintenance?
There are three ways of building or maintaining the access path.
Immediate
For every operation made on a file, the access path, associated with it, is updated whether or not the path is opened

Rebuild
Access path is maintained when the file is open and various updates are recorded and the access path is rebuilt every time when the access path is closed.

Delay
Access path is maintained when file is opened and updates.

33. Why we need to maintain the access path?
Because more than one access path is associated with one data, changing data in one file might cause changes to be made in other files also.

34. Explain JDUPSEQ and JDFTVAL.
JDUPSEQ is used to specify the order in which records with duplicate join fields are presented when the JLF is read.

JDFTVAL is used the system provides default values for all fields, when a join to a secondary file does not produce any records. If this keyword is not specified a record in the primary file for which there is no corresponding record in secondary file is skipped.

35. Is it possible to insert a record in a JLF?
No. It is impossible to insert / update / delete record in a join logical file.

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

37. What are the major differences between PF and LF?

Physical file
Logical file
It contains the actual data so it occupies memory space.
Can not occupy memory space
Single record format
Multiple record formats
Can be exist even with out LF
Can not exist with out PF
If you delete PF the LF also can be deleted.
If you delete a LF, the PF can not be deleted
The object type is PF
The object type is LF
CRTPF command is used to create such object
CRTLF command is used to create such type object

38.  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

39. How many record formats in a LF ad a PF can have?
            PF – One only record format
 LF – 32 record formats
40. Can you copy data from a physical file to a logical file?
No.

41.  What keyword is used to reference the same field in another file?
            REF – Reference

42. What is a Field Reference File?
It is also a physical file, which doesn’t have any data. It has only field description and other physical files can refer these definitions by using ref or reffld keyword. Its type is *PF.

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


44.  What command can be used to clear a physical file?
            CLRPFM - Clear Physical File Member

45. What is the keyword VALUES used for?
To set records from a PF based on field values in storage.

46.  What is the keyword COMP used for?
To set records from a PF using a comparison between two field values.

47.  What is the keyword RANGE used for?
To set records from a PF based on a min/max value of a field.

48. How many record formats in a PF, LF, DSPF and SFL?
            PF        => 1
            LF       => minimum 1, maximum 32
            DSPF  => 1024
            SFL     => 512

49.  What is a display file?
A displayable screen file.

50. What are the keyword levels used in Display file?
            File level
            Record level
            Field level

51. What is Menu?
            Menu is a list of short cut commands. We can create Menu thro, STRSDA tool.

52. Define Menu and what is the command to create menu?
Menu is a set of shortcut-commands, which is used to choosing program or commands to execute. In the menu, the text and list of commands are stored in two different objects. The MNUDDS keeps the text and the MNUCMD keeps the list of commands. We are creating menu by using STRSDA command. The default menu name is MAIN. We can check the menu with help of GO command [Syntax GO <menu name>]

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

54.  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.

55.  What is a printer file?
A print layout for a report that can be used by any program.

56.  Why would a DSPF program use a DSPSIZ keyword?
To select the screen display size used.

57.  What is the INDARA keyword used for?
To store all program indicators into a useable array.

58.  What is the purpose of the OVERLAY keyword?
To allow multiple screen records to display at one time.

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

60. How you create a trigger?
Trigger is an event to be performed either before or after any change on your database. By using ADDPFTRG we can create a trigger. There are six triggers can be defined each physical file. These are Before-Insert, Before-Update, Before-Delete, After-Insert, After-Update and After-Delete. We can remove the trigger by using RMVPFTRG command.

Suppose that, if we are going to delete some records from primary file, assume that file has the referential constraint to a secondary file. In such case, we have to use the trigger [Delete-Before] for deleting the dependent record from secondary file.
The parameters to be given while creating the trigger are 1. The timing (before/after) 2.The trigger event (update etc) and 3. The PF name

61. What is a Journal?
Journal is an object of type *JRN which will records the activities of the physical file. The information recorded by the journal is stored in an object *JRNRCV called Journal Receiver.

62. Various steps of creating a Journal.

Steps to Start Journaling

            Create a Journal Receiver                               CRTJRNRCV
            (name, library)
            Create a Journal                                              CRTJRN
            (Journal name, library, journal receiver name, journal receiver library)
            Start Journaling of a physical file                   STRJRNPF
 (Journal name, library, physical file(s) name, physical file(s) library, journal receiver name, journal receiver library)
            Backup the physical file                                  SAVOBJ

Steps to end a Journaling

            End journaling a PF                                        ENDJRNPF
            Delete a Journal                                              DLTJRN
            Delete the last Journal Receiver                      DLTJRNRCV
            Save Journal Receivers                                   SAVOBJ

The commands are to be used in case of failure

            Display journal entries                                    DSPJRN
            Apply journal changes                                    APYJRNCHG
            Remove journal changes                                 RMVJRNCHG
            Restore a saved object                                                RSTOBJ

63. Explain Commitment Control.
It is the extension of journaling.
An Integrated transaction recovery function is known as commitment control. Let we are going to insert a record in some files. If system fails before the commit operation, all the database changes are rolled back to the previous commit operation. If the system issues the commit operation, the records are freeing.

Steps involving for a commitment control
§  First you have to create a journal for the physical file, which you want to apply commitment control.
§  You have to give commit keyword in F-Spec keyword.
§   
64. What is the difference in multiple formats LF and join LF?
In both the case we pick up fields from more than one PF, but the multiple format LF wont join the fields and have more than one record format and join LF actually joins the fields and can have only one record format.

65. How will you define the fields in display screen?
            +          To define
            3          Input - numeric
            6          Output - numeric
            9          Both - numeric
            I           Input – character
            O         Output - character
            B         Both – character

66. How will you move the fields in display screen?
            (-) sign in front end and rear end to mark the field.
            (=) to move the field after marked.
            (==) to copy fields after marked.
(<) shift to left.
(>) shift to right.
            (?) to get the field name and length.



67. How will you get the system values in display screen?
            *date   for date.
            *time   for time.         

68. What is the keyword must be used with PROTECT keyword?

            OVERLAY.

Unknown