Pages

100 Latest Progress 4GL Interview Questions with Answers

1. What are the advantages in progress 4GL?
Less development effort
Solve more complex application
Support multiple language
Reusability
Less knowledge required for platform and deployments
Support application server and web based application
It is used for both front-end and back-end

2. What is the latest version in progress and in which are currently working?
The latest version of the PROGRESS 4GL is 10.1 Open Edge
The currently working version is progress 9.1D

3. What are the two ways of programming in progress?
CUI (Procedure Editor)
GUI (ADM-2)

4. What is the syntax for message statement?
Syntax:
Message “<message text>” view-as alert-box <message type> buttons <button type>
Message type:
                                Information
                                Question
                                Error
                                Warning
Buttons:
                                Ok
                                Yes-No
                                Yes-No-Cancel                
                Example:
                                Message “welcome to progress” view-as alert-box information buttons ok.

5. What is the syntax for RUN statement?
Syntax:
RUN <internal/external> procedure name
Example:
                RUN calculator.p

6. What are the data types in progress?

  •        Character
  •        Integer
  •        Decimal
  •        Logical
  •        Date
  •        Handle
  •        Widget-Handle
  •        Com-handle
  •        Rowid/Recid

7. What is the syntax for variable declaration?
Define variable <variable-name> as <data-type>format<format-value> initial <initial-value> no-undo
Example:
                Define variable lv_a as integer format 999 initial 1 no-undo.

8. Why we are using NO-UNDO?
Whenever we change the value of a variable, it will store the previous value into the before image file. To avoid this reason, we are using no-undo while declaring the variable.

9. How many date formats available in progress?
Two types of date format available
MDY
DMY

10. What are the types of looping statement?
Repeat
Do
For-each
Do-while

Progress 4GL Interview Questions with Answers

11. What is the syntax for REPEAT loop?
Repeat :
                Statements…..
End.

12. What is the syntax for FOR-EACH loop and use of FOR-EACH loop?
Syntax:
For each <table name>:
                                Statements…..
End.
Use:
For each loop is used to fetch records one by one from one or more tables with or without where clause from the database.

13. What is the use of ENTRY?
It is used to extract a string from the list. This function takes two parameters one is the position of the string and another one is the list.
Syntax:
                Entry (<Position of a String><variable-List>).

14. What is the use of NUM-ENTRIES?
NUM-ENTRIES is used to return the no of entries available in the list .
Syntax:
              Num-entries(<variable-list>).

15. What are the types of BLOCKS?
Repeat, do, for-each block
Procedure block
Trigger block
Editing block

16. What is TRIGGER Block?
It’s a block which contains one or more statements. whenever an event occurs the corresponding trigger block will be fired.

17. What is EDITING Block?
Editing block is used to get the input from the user
•         Prompt-for
•         Set
•         Update

18. What is the difference between PROMPT-FOR & SET?
Prompt-for:
                This is used to get input for both variable and database.
Set:
This is used to get input only for variable.



19. What are the types of PROCEDURES?
Internal procedure
External procedure
Persistent procedure
Super procedure

20. What is PERSISTENT procedure?
It’s the procedure which keeps the value of the external procedure using handle variable. This variable will be valid until we close the progress session

21. How will you Run External procedure persistently?
Run <external procedure name> persistent set <Handle Variable Name>

22. What is the use of PARAMETER?
The parameter is used to passing the argument to function and procedure

23. What are the types of PARAMETERS?
Input
Output
Input-output

24. How will you define a PARAMETER?
Syntax:
Define <parameter-type> parameter <parameter Name> as <data-type>       no-undo.
Example:
                Define input parameter ip_a as integer no-undo.

25. What are the types of programming models?
Procedure driven model (CUI)
Event driven model (GUI)

26. What is FUNCTION?
Function is a sub-program like procedure but it can return only one single value.

27. What is the syntax for FUNCTION?
Syntax:
Function <function-name> return <data-type> (Parameter type) <parameter-Value> as <data-type> [forward]
                Statements……
End function
Example:
Function calculate return integer (input lv_a as integer, input lv_a as integer)
                                lv_a + lv_b.
End function

28. What is a FRAME?
Frame is a rectangular display area with in the window. It is used to display field level widgets.

29. What are the types of frames?
Down
One Down

30. How will you track the error in the statement?
Using error-status function we can track the error in the statement

31. What are the methods in ERROR-STATUS?
Error
Num-Messages
Get-Number
Get-Message

32. Which is default & unknown Frame?
Default frame is
                Repeat
                For each
                Do with frame
                Procedure blocks
Unknown frame is
                do

33. How many files are created for new Database?
Five files will be created. They are
.db => default database file
.b1 => before image file
.d1 => after image file
.lg => log file
.st => size and location of the database

34. How many primary keys will be in a single table?
Only one primary key in a single table

35. What are the types of INDEXES?
Primary key index
Unique index
Word index

36. How will you fetch Single record & multiple records?
For-first and find-first are used to fetch a single record
For each statement is used to fetch the multiple records

37.    What is the difference between FIND & FIND-FIRST?
Find:
In find statements if there are any non-primary key records which has duplication will provide ambiguous error
Find-first:
In find-first statements the ambiguous error will be overcome because which is return the first record from the buffer

38. What is the difference between FIND-FIRST and FOR-FIRST?
For-first:
                Using field option for specify the field name for modification
                Using multiple index
                Using word index field
Find-first:
                In find first not support the above three statements
                In find first we use no-error and available option

39. What is the use of NO-ERROR?
No-error statement which is used to suppress the progress errors

40. What is the use of XREF?
XREF is used to find out the index being used in a file

41. What is the syntax for XREF?
Compile <external-procedure>save XREF <XREF-filename>

42. What is record SCOPING?
To identify the scope of the record

43. What are the types of scoping and their uses?
Weak scope .
        eg :-    for each loop
Strong scope
         eg :- Do for loop

44. What is the use of LOCKS?
It is used to control the data access in the multi-user environment

45. What are the types of LOCKS?
Share-lock
Exclusive-lock
No-lock

46. What is the syntax to release the LOCK Explicitly?
Release <table-name> no-error

47. What is DEADLOCK?
Deadlock is situation at which the transaction will not be able to continue.
If we are not using proper locking statement then deadlock will occur.

48. What is TRANSACTION?
Set of changes into the database to be accepted / rejected by the system which is called transaction

49. How will you identify the TRANSACTION?
Using the following three steps we can identify that the transaction is available or not

  •        The statements which is directly interact to the database use create update delete insert
  •        When we use the TRANSACTION statement explicitly
  •        Fetching record using exclusive-lock statement


50. What are the types of TRANSACTION?
i) Transaction
ii) Sub Transaction
It can also be a Larger Transaction (nested transaction) or a Smaller Transaction
(Repeat transaction, do transaction, etc.,)

51. What is SUB-TRANSACTION?
A sub transaction is nested in a transaction and encompasses all activity within one iteration of the following kinds of blocks: DO ON ERROR, FOR EACH, procedure, REPEAT, and triggers.

52. What is the use of CAN-DO, LOOK-UP, TRIM, SUBSTRING?
Can-do:
                Can-do is used to find whether an entry is available in the list or not. It returns the Boolean value.
Syntax:
                Can-do (<list>, <string-value>)
Lookup:
                Lookup is used to find whether a given string is available in the list or not return position of a string as integer
Syntax:
                Lookup (<string-value>,<list>).
Trim:
                Removes leading and trailing white space, or other specified characters, from a character string.
Syntax:
                Trim (<String Value>[, character-value])
Substring:
Extracts a portion of a character string from a field or variable
             
Syntax:
                                Substring (<String-value>, starting-pos [, length])

53. What is EVENT?
An action associated with a trigger and an object or a database. This is called event

54. What is the use of SKIP?
Skip statement, which is used to move the cursor position to the next line

55. What are the types of validation?
Blank validation
Data validation
Duplicate validation
Field level validation
Client level validation
Server level validation

56. What are Import & Export and their uses?
Import statement which is used to creating record from file which may be word or excel etc…
Export statement which is used to export the data from database into the file such as word/excel /printer/screen

57. What is TRIGGER?
A sequence of statement which is executed when an event occurs

58. What are the types of TRIGGERS and their uses?
Two types of triggers they are
Schema/Database trigger
                Whenever a specific database event occurs such as creating or deleting a table, assigning a value to a field, and so on.
E.g. :-
              Create , write , delete , etc.,
Session/User interface trigger
An action the user initiates on a widget with a keystroke or a mouse--such as pressing the GO key or marking a widget--executes a user interface trigger
                Eg :-
                                Return, leave, entry, etc.,

59. What is the syntax for creating a TRIGGER?
Syntax:
Trigger procedure for <trigger-type> of table.
                Statements…….
Example:
                Trigger procedure for create of customer.
assign customer.cust-num = next-value(next-cust-num).

60. What is the use of CAN-FIND?
Can-Find function which is used to find the availability of the record
Which is returns the Boolean value. This is faster than find first

61. How will you Enable & Disable the TRIGGER?
Syntax:
Enable Triggers For {Dump | Load} Of <Table-Name>
Disable Triggers For { Dump | Load } Of <Table-Name>
Example:
Enable Triggers For Load of customer.
Disable Triggers For Load of customer.

62. What is the advantage of Disabling TRIGGER?
To improve the performance of the database transaction. To avoid the progress error while backup the database

63. What are the types of tables?
Temp table
Work table

64. Difference between [or] Drawback of WORK-TABLE & TEMP-TABLE?
Work – Table Temp - Table

  •        It is used before progress version 9.0
  •        Stored in memory
  •        We can store lesser volume of data
  •        Cannot inherit or create index for tables
  •        Can be able to store lesser volume of data
  •        There is no empty statement to clear the work table
  •        It will be frequently used from progress version 9.0
  •        It will replace the work-table
  •        Stored in the disk
  •        We can store huge volume of data based on the disk size
  •        When we inherit the database table index and also we can create our own index
  •        Empty temp-table statement used to clear the table

             
65. How will you define [Syntax] WORK-TABLE & TEMP-TABLE?
Work-Table:
1.       Define work-table <table-name> like <database-name>
2.       Define work-table <table-name>
 field1<field-name> as <data-type>
 field2<field-name> as <data-type>
 etc…..
 field (n)<field-name> as <data-type>
Temp-Table:
1.       Define temp-table <table-name> like <database-name>
2.       Define temp-table <table-name>
 field1<field-name> as <data-type>
 field2<field-name> as <data-type>
 etc…..
 field(n)<field-name> as <data-type>

66. What is the location of TEMP-TABLE?
The location can be specified using –T parameter

67. What is BROWSE-WIDGET?
To display the records as row and column format like a data grid

68. What are the types of BROWSE-WIDGET & Selection BROWSER?
There are two types of browsers
1.       Updatable browser
2.       Non-updatable browser
There are two types of selection browser
1.       single select browser
2.       multi select browser

69. What is the default LOCK for Browse Widget?
The default lock of the browser widget is No-Lock

70. What is QUERY?
Its is an instruction that tells the Progress to fetch the records from one or more tables in given database.

71. How will you define QUERY & BROWSE?
Define query <query-name> for <table-name> scrolling
Define browse <browse-name> query <query-name>
                Display <field1><field2>……<field-n>
                Enable <field1><field2> ……<field-n>
With <no-of-records to be displayed> down title <browse-title>

72. What are the EVENTS for BROWSE-WIDGET?
1.       Value-changed
This is fired when moving between records.
2.       Row-leave
This is fired on pressing tab key
3.       Default action
This is fired on double clicking on the browser
o        Mouse-double-click/mouse-select-click

73. What is BUFFER-COPY?
Buffer-Copy is one statement. This is used to bulk copy of a source record to a target record by copying each source field to the target field of the same name

74. What is PRE-PROCESSOR & Types?
The frequently used values and statements are defined as PRE-PROCESSOR.
Pre-processor is used to understand the program easily.
Types of pre-processor:
                & global-define <global-variable> <value>
                & scope-define <local-variable> <value>

75. What are the types of MENUS?
Two types of menus
                Drop-down menu
                Pop-up menu

76. What is .PF file?
.pf is a parameter file. Collection of startup parameter can be initialized

77. What is INCLUDE-FILE?
Used to create for frequently used codes
File extension will be (.i)
Can be include in (.w, .p) files

78. How to pass parameters to include file?
We can pass parameter to the include files using (&) symbol

79. What is ETIME?
E-Time is elapsed time.

80. What is the use of ETIME & what does it Returns?
It is used to find out the time taking for execution of a particular block
It returns milliseconds

81. How will you define Static and Dynamic Query?
Static Query :
                                Define Query <query-name> for <table-name>
Dynamic Query:
                                Create Query <hdl_var_name>.
                                <hdl_var_name> : Set-Buffers(<buf_hdl>).
                                <hdl_var_name> : Query-Prepare(<Query>).
                                <hdl_var_name> : Query-Open().

82. What is the use of Delimiter?
The Delimiter is a character that is used to separate the field values. The default delimiter is space.

83. What is NO-WAIT?
When one procedure is accessing a table in exclusive lock mode at the same time some other procedure try to access the same table it will not wait till the table is released if the no-wait option is used.

84. What is the use of Return-No Apply?
It is mainly used in the GUI. no-apply is suppressed default behaviors of the current user interface

85. How to define Array?
Syntax:
Define Variable <Array-Variable> As <data-type> Extent <N>
                Example:
                                Define variable lv_a as integer extent 10.

86. Tools to develop web based Application?
Web-speed 3.0 is a software, which is used to develop web-based applications.
Web client is a software where client/Server applications will be accessed using browser like Netscape or Internet Explorer

87. Can we create a word-index for an array field?
No, we can’t create a word-index for an array field

88. Types of widgets?
Windows
Frames
Dialog boxes
Browse
Fill-in fields, text, sliders, selection lists, combo boxes, toggle boxes, radio sets, and editors for data representation
Buttons, images, rectangles, and literals
Menus, submenus, menu bars, and menu items

89. How will Enable and Disable Widget?
To enable the widget :
Widget : sensitive = True
To disable the widget :
Widget : sensitive =False

90. What is Assign statement?
To combine more than one statement into a single statement.

91. How will you remove super procedure?
Remove-super-procedure () method is used to remove the procedure from super procedure

92. Difference b/w SUPER & PERSISTENT Procedure?
Super procedure:
Super procedure can be overridden
Super procedures can be executed without using the handle whereas the persistent
Example:
                Run calculate.
Persistant procedure:
Persistent procedure can’t overridden.
procedures needs the handle to run the procedure.
Example:
                Run calculate in lv_handle.

93. How to Exclude in Export /Import statement?
By using the ‘except’ option we can exclude the unnecessary fields in export and import statement.

94. Syntax for BUFFER-COPY?
Buffer-copy <source-name> to <target-name>
BUFFER-COPY
source [ { EXCEPT | USING } field ... ]
TO target [ ASSIGN assign-expression ... ] [ NO-ERROR

95. How to identify whether the record is locked?
Using the locked method we can identify the record is locked
Locked <table-name>
    Eg :-
      For first customer exclusive-lock.
      If locked (customer) then
          Message “Locked” view-as alert-box.

96. What is the exe file to start and shutdown the database for multi-user environment?
_mprosrv.exe this file is used to start the database for multi-user environment
_mprshut.exe this file is used to shutdown the database for multi-user environment

97. How many ways are there to pass parameter values?
Parameter
Pre-processor
Shared-variable
Temp-table
Persistant procedure

98. How to define shared variables?
When the variable is declared for the first time it has to be said as new shared variable .
After that whenever we share the variable we can declare as shared variable.
Syntax:-
Define New shared variable <variable-name> as <data-type> initial <initial-value>
Define shared variable <variable-name> as <data-type> initial <initial-value>
99. How to pass temp-table as parameter?
Tem
p-table can be passed as parameter by using the ‘Table’ keyword with the parameter type in a function or procedure and it can be received by using ‘Table for <local table name>’ keyword in define parameter statement.

100. How will you clear the frame?
Using clear frame statement we can clear the frame
Syntax:
                Clear frame <frame-name>

Progress 4GL Interview Questions with Answers

No comments:

Post a Comment