Powerbuilder Interview Questions & Answers

  1. Question 1. What Are The Processes Of Material Module?

    Answer :

    Define All process of material Generate indent to issue product.

  2. Question 2. How Do You Pass Parameters When Opening A Window?

    Answer :

    Use OpenWithParm method () and accessing the three system message object properties:

    • Message.DoubleParm
    • Message.PowerObjectParm
    • Message.StringParm

    The parameters are stored in the Message object.

  3. Informatica Interview Questions

  4. Question 3. What Are The Different Statuses A Row Can Have In A Dw And What Function Do You Call To Find The Status?

    Answer :

    The 4 DW Statuses:

    1. Not Modified – the information in the row/column is unchanged from what was retrieved.
    2. Data Modified – the information in a column or one of the columns in the row has changed since it was retrieved
    3. New Modified – the row is new and values have been assigned to columns. (Changes are primarily due to user entry or by using the set item () method)
    4. New – the row is new and values have not been specified to columns.

    All are applicable to rows but only 1 & 2 are applicable to columns.
    Getitemstatus () can be used to find the data window status.

  5. Question 4. What Is The Purpose Of Using The Super Keyword?

    Answer :

    It is used to refer to an object’s immediate ancestor. Take for example Super:: wf_myfunc (myarg1, myarg2). This example calls the ancestor function wf_myfunc (presumably the descendant also has a function called wf_myfunc). This example must be part of a script or function in the descendent window, not one of the window’s controls.

  6. Informatica Tutorial

  7. Question 5. What Is A Dynamic Data Window? Give An Example Of Why You’d Need To Use A Dynamic Data Window?

    Answer :

    It is a data window that is modified or created during runtime. CREATE method can be used to create or replace the current DW object in the DW control with the newly created DW. Settransobject () needs to be reset with the new DW in the control since the earlier association would have been destroyed.

  8. PL/SQL Interview Questions

  9. Question 6. What Is The Difference Between Item Error () And Db Error ()?

    Answer :

    Item Error () occurs when the data supplied to a particular column in a table fails some validation rules. For example a DW column designed to accept only integer values throws this error if a string value is passed. DB Error () occurs when INSERT/UPDATE/DELETE/RETRIEVE fails. When it occurs, the DW Control throws up a message box describing the error to the DBMS. The user can also get the appropriate error code and throw up message boxes.

  10. Question 7. What Is A Data Store? What Type Of Events Does It Support/not Support?

    Answer :

    It is a non-visual data window. For example if you want to retrieve data from a table without showing it, then you can go for data store. It does not support clicked events but supports delete row (), insert row (), retrieve () and update (). It also supports Item Error () event.

  11. SQL Server 2008 Tutorial
    SQL Server 2008 Interview Questions

  12. Question 8. As An Extension Of (8) Above, Mention Two Differences With Data Windows?

    Answer :

    • A DW can be designed such that the user is prompted to enter the parameters for data retrieval while this not possible with data store. If the user calls the RETRIEVE method for a DW control, the DW object expecting an argument, if the user leaves it blank, it prompts the user to enter an appropriate value, this behaviour is not supported in data stores.
    • The PRINT Set-up dialog box for setting print specifications is not possible in data stores.
  13. Question 9. Explain The Following Terms: Regeneration, Optimization & Pbd?

    Answer :

    • Regeneration – when you modify an ancestor object, you can regenerate descendants so they pick up the code changes to the ancestor.
    • Optimisation – it is the process of compressing library objects; it removes gaps in libraries and defragments the storage of objects, thus improving performance. Optimising only affects the layout on disk and not the contents of the objects. Objects are not recompiled. For best performance libraries should be optimised once a week.
    • PBD – DW objects are stored in PBLs that are converted to PBDs thereby providing runtime versions of DW objects.
  14. Software Engineering Interview Questions

  15. Question 10. When Do You Use A Data Pipeline?

    Answer :

    If the user wants to copy DB objects from one database to other or copy from one DBMS to another, the data pipeline can be used. The file can be exported from one database and imported to the target database. In the Data Pipeline painter you define a data source, source database, target database, retrieval arguments, unions, sorting, selection, and grouping criteria.

  16. Software Engineering Tutorial

  17. Question 11. Explain And Differentiate Between Settrans () And Settransobject ()?

    Answer :

    While using settrans () the user need not specify an explicit CONNECT or DISCONNECT statement in the script since PB internally calls them whenever required. As part of internal transaction management of DW controls, when the DW needs to access the DB, the DW control issues an internal CONNECT, performs data access and then issues an internal DISCONNECT.

    Settransobject () is used when the user goes for a separate transaction object (example SQLCA) or creates a separate one in the script.

    The sequences of statements are as follows:

    Transaction tra_1

    tra_1 = CREATE transaction

    tra_1.DBMS = “ODBC”

    tra_1.database = “myDB”

    CONNECT using tra_1

    Dw_1. Settransobject (tra_1)

    Dw_1. Retrieve ()

  18. Hadoop Interview Questions

  19. Question 12. Explain The Components Of Odbc Architecture?

    Answer :

    • Application – any front end/GUI from where ODBC calls are made.
    • Driver Manager – it is a DLL that controls loading of appropriate drivers to connect to DBMS. When an ODBC call is made, it scans the *.ini files to determine which driver to use.
    • Driver – it is the heart of ODBC that takes care of N/W protocols to connect to the data source; it also submits SQL statements to the data source.
    • RDBMS – an ASCII file containing information such as DBMS name, login/password etc.

    ODBC takes care of locating the Sybase/SQL server address on the network by reading the win.ini/sql.ini files.

  20. Informatica Interview Questions

  21. Question 13. Explain The “connect String Dbparm” Parameter In Power Builder.

    Answer :

    It specifies the parameters required to connect to an ODBC data source. PowerBuilder uses these parameters to connect to the database. The syntax is

    Connect String = ‘DSN = data_source_name; {UID = user_Id; PWD = password; driver_specific_parameters}’

    PowerBuilder generates the Connect String automatically when you define an ODBC data source and copies it to the DBParm box in the Database Profile Set-up dialog box. This happens before you connect to the data source in PowerBuilder.

  22. Hadoop Tutorial

  23. Question 14. Which Are The Pfc Class Libraries In Power Builder?

    Answer :

    PFC is a combination of reusable and extendible classes and framework.

    The 8 libraries are:

    • pfcmain.pbl – basic services
    • pfcapsrv.pbl – application
    • pfcdwsrv.pbl – data window
    • pfcw srv.pbl – window

    The 4 extension layer class libraries are pfemain.pbl, pfeapsrv.pbl, pfedwsrv.pbl & knownsrv.pbl. 2 more security related libraries (with no extension layers) are pfcsecad.pbl & pfcsecsc.pbl.

  24. Question 15. When Should Internal Transaction Management Be Used?

    Answer :

    It can be used if the number of connections to theDB are limited and also for pure retrieval when COMMIT & ROLLBACK are not application priorities.

  25. Powerbuilder Programmer Interview Questions

  26. Question 16. Explain The Different Types Of Data Sources That Can Be Linked To Data Window Controls?

    Answer :

    • Quick Select – Used when data comes from one or more tables linked by a foreign key.
    • SQL Select – In addition to above grouping & computed columns can be specified
    • External – the data can be imported from a flat file or populated from the code. ( for example using setitem() methods)
    • Query – used when the data source (SQL statement) is saved in a query object defined in the query painter.
    • Stored Procedure
  27. Question 17. Explain How The Auto Commit Property Works In Pb?

    Answer :

    When the Auto Commit property is set to FALSE (default) or 0, PB issues SQL statements inside the scope of a transaction. 1(TRUE) implies statements outside the scope of a transaction (for example when your application requires creating temporary tables).

    • If you want to execute stored procedures containing DDL (CREATE, ALTER, DROP etc) statements, then Auto Commit = TRUE.
    • If Auto Commit = TRUE, then rollback cannot be issued, it should be set to FALSE after completing the DDL operation.

    When Auto Commit is set from FALSE to TRUE, then PB issues a COMMIT statement by default.

  28. Sybase Interview Questions

  29. Question 18. Explain The Steps To Update A Multi-table Dw In Pb?

    Answer :

    The following steps are involved in the process:

    • Use. modify/.object notation to make ONE table updateable
    • SET the primary keys for the table
    • Perform DW_1 update with FALSE argument for the reset option in the Update() function
    • After © is successful, make 2nd table updateable and 1st table not updateable
    • Next call update() with TRUE argument for the the reset option in the Update() function
    • COMMIT/ROLLBACK depending on success or failure.
  30. PL/SQL Interview Questions

  31. Question 19. What Is A Dwchild Object? Name Two Events Associated With It?

    Answer :

    A dropdown DW is a DWChild. For example a DW object that populates a column having the dropdown DW edit style is a DWChild object. It does not have any events associated with it.

  32. Question 20. Explain Multi-byte Support For Pb?

    Answer :

    • PB 8 supports both ANSI and double-byte character sets (DBCS); any PB8 application runs in a DBCS environment. In a DBCS environment 1 character = 2 bytes as opposed to 1 byte in an ANSI environment. For example we may need to change the width of a column of type char (40) to char (80).
    • The wide version of the Len () function (called Lenw ()) should be used since the former returns the number of bytes while the latter returns the number of characters.
    • PowerBuilder can access Unicode data in an ASE 12.5 Unicode database or in Unicode columns in ASE 12.5. PowerBuilder converts between double-byte character set (DBCS) data and Unicode automatically, provided that the Locale parameter is set with DBCS values. For example, the Locale DBParm should be set to chs or cht.
  33. Database Administration Interview Questions

  34. Question 21. Explain The Three Methods Of Passing Arguments To Functions/events In Pb?

    Answer :

    • By Value – a copy of the variable is passed. Any changes to the value of the variable will affect the copy only, the original variable in the calling script is not affected.
    • By Reference – a pointer to the variable is passed to the function/event. Any changes affect the original variable in the calling script.
    • READ-ONLY – a copy of the variable treated as a CONSTANT is available to the function/event.
  35. Question 22. Differentiate Between Instance And Shared Variables In Pb?

    Answer :

    • Instance variables are created when the object is created and destroyed when the object is destroyed while a shared variable is created when the FIRST instance of the object is created and is destroyed when the application is closed.
    • The value of an instance variable in each instance is independent of its value in other instances while changing the value of a shared variable in one instance will affect other instances.
  36. Question 23. Mention Some Features Of N-up, Composite & Cross Tab Dw Presentation Styles?

    Answer :

    N-Up: two or more rows of data displayed next to each other across the page. It is useful for periodic data such as data for each day/week or each month in the quarter.

    CrossTab: provides a data summary in a row and column format. Data to be selected from one or more tables, DW cannot be external. Crosstab functions can be used for filters, validation rules or computed fields.

    Composite: – it consists of one or more nested reports. It also serves as a container for other reports and has no data source of its own. The user can specify one DW object to be shown on screen, as many reports as the number of DW objects can be viewed on screen based on the retrieval arguments specified by the user.

  37. Hadoop Administration Interview Questions

  38. Question 24. Explain Some Performance Considerations That You As A Developer Would Like To Review While Designing Client/server (pb/sybase) Applications?

    Answer :

    An important consideration is the usage of COMMIT/CONNECT statements to maximize performance and limit locking and resource use.

    Two design considerations that should be taken care are:

    Long running connections – if these are NOT acceptable then the application should connect to the database only when necessary. If acceptable then COMMITs should be issued as often as possible so that the changes do in fact occur. More importantly COMMITs should be issued to release any locks placed on DB entities as a result of statements executed during the transaction.

    Settrans/Settransobject function – if the application functionality requires connections to be kept open and issue periodic COMMITs then Settransobject () should be used or use Settrans () for many short-lived transactions.

  39. SQL Server 2008 Interview Questions

  40. Question 25. Explain The Usage Of Settransobject Function With Composite Dws?

    Answer :

    Only this function should be used for composite presentation styles acting as containers for other DW objects. If settrans () is used with each DW in a composite DW then disconnect does not occur until PB session ends. It should be used only for pure retrieval when DB locks need not be held on tables in other words update () functions are not used.

  41. Question 26. Explain Function Overloading With An Example?

    Answer :

    It is a feature in PB where a function is defined with the same name as another. The two functions may differ in the number of arguments and also the type of arguments. An example is the Messagebox () function.

  42. Informatica Admin Interview Questions

  43. Question 27. Explain The Two Classes Of Pb User Objects And Their Sub Types?

    Answer :

    Uos are custom visual objects that you can build to supplement standard PB objects. UOs can request/display information and respond to mouse or keyboard actions and create a tab page UO.

    Visual UO – a reusable control/set of controls. For example a set of buttons to function as a unit having scripts associated with them for standard processing.

    Three types are:

    1. Standard – inherited from a specific visual control. For example command button/checkbox etc.
    2. Custom – inherited from the user object system class. You can include many controls in the UO and write scripts for these events.
    3. External – it is a UO that displays a visual control defined in a DLL.

    Class UO – they consist of properties, functions, and events with no visual components.

    1. Standard – inherited from a NV PB object such as a transaction/error object, which can have instance variables and functions.
    2. Custom – an object of your own design for which you define variables, events and functions in order to encapsulate application-specific programming in an object.
  44. Software Engineering Interview Questions

  45. Question 28. How Do You Change The Sql Statement Of A Dw At Run-time?

    Answer :

    It can be done by linking the DW control to modify () function or using “. Object” notation.

  46. Question 29. Can You Use An Array As An Argument To The Dw’s Retrieve () Function?

    Answer :

    Yes, it can be used when your DWs data source contains a Select statement with an IN clause.

  47. Hadoop Testing Interview Questions

  48. Question 30. Application Functionality Would Like To Allow The User To Print Selected Rows. How Is This Done?

    Answer :

    You can copy the selected rows to a data store or a hidden DW control using rowscopy () and print the data store or hidden DW control.

  49. Question 31. Explain The Dw Validation Rule?

    Answer :

    If the data in a column has changed, it checks for the correctness of the value (both data type and data value) in the primary buffer. Wrong data type or data value will trigger the ItemError () event. If the data is correct it triggers item changed () event, which if it returns ZERO, triggers itemfocuschanged () event.

  50. Question 32. Explain The Following Error: “rows Changed Between Retrieve And Update”?

    Answer :

    It occurs when a user updates the data before you update it. PB detects it when you include the timestamp column in the DW or use “key and updateable columns” in the WHERE clause. The solution to the problem would be to use the reselect row () function to reselect the row that caused the error and get the latest values for the error row and update the DB again.

  51. Microsoft sql server notification services Interview Questions

  52. Question 33. What Is The Difference Between A Computed Column And A Computed Field?

    Answer :

    The former is defined as part of the SELECT statement, (for example sum, avg etc) whose values are calculated by the database, while in the latter the PB client calculates the values. If it is a fat client then computed fields are recommended, else for thin clients it is computed column.

  53. Hadoop Interview Questions

  54. Question 34. If The Application Needs To Display Rows As Soon As They Are Retrieved, What Should Be Done?

    Answer :

    Write code in the retrievrow () event and also set the asynch attibute in the DBParm property in the transaction object.

  55. Question 35. How Would You Retrieve Multiple Result Sets In A Single Dw?

    Answer :

    A DW can retrieve only one result set at a time. To retrieve other result sets, you can change the result set number either by modify () or using object notation making sure the number of columns and data types match the existing DW definition.

  56. Question 36. What Is The Event From Which I Can See The Exact Sql Statement Sent To The Db By Power Builder?

    Answer :

    SQLPreview ().

  57. Powerbuilder Programmer Interview Questions

  58. Question 37. How Can You Update A Dw That Has A Stored Procedure As A Data Source?

    Answer :

    It can be done by going to the update properties in the DW by selecting Rows/Update properties from the menu in the design mode in the DW painter. The tables to be updated can be selected.

  59. Question 38. What Are The Different Types Of Windows In Pb?

    Answer :

    They are main, popup; child, response, MDI frame, and MDI frame with microhelp.

  60. Question 39. If You Create A Response Window And Open That Window In An Mdi Frame Using Open Sheet (), What Would Happen?

    Answer :

    When you open a window in a MDI frame using opensheet () or opensheetwithparm () the window gets the sheet properties irrespective of the window type. If a response window is opened using the above functions the window will behave like any other sheet having maximise, minimize, close controls etc.

  61. Question 40. What Is The Difference Between Trigger Event () And Post Event ()?

    Answer :

    The former executes the specified event’s script right away while the latter posts the request in the operating system’s message queue.

  62. Sybase Interview Questions

  63. Question 41. How Can I Find Out If The Pr Application Is Connected To The Db Or Not?

    Answer :

    Use the Dbhandle () function.

  64. Question 42. Name Three Pb Pronouns Used To Reduce Hard Coding.

    Answer :

    This, parent, parentwindow & super.

  65. Database Administration Interview Questions

  66. Question 43. Differentiate Between Parent & Parent Window?

    Answer :

    Parent refers to the PB object where the current object is placed. For example parent in a command button’s script will refer to the window in which the command button is placed. Parentwindow is used to refer to the window for which the current menu is attached.

  67. Question 44. I Have A Window, Which Has A Menu, Associated With It. For Some Reason I Have Deleted The Menu And I Am Getting Any Error While Trying To Open The Window. What Needs To Be Done?

    Answer :

    Export the window as a SRW and look for the menu name in the file. Once found the menu can be created again and linked to the source window.

  68. Question 45. Explain The Different Types Of Embedded Sql That Can Be Used In Pb Scripting?

    Answer :

    Given below are the SQL statements in scripts that are possible with Sybase ASE:

    • Transaction Management statements – CONNECT, COMMIT, ROLLBACK and DISCONNECT are used to manage transactions in ASE. If a trigger fails, then a RAISEERROR should be issued in the trigger and not ROLLBACK. PB has got a DBMS specific return code (SQLDBCode = -1) within the transaction object which can be used to throw messages to the user.
    • Non-cursor statements – INSERT/UPDATE/DELETE/SELECT.
    • Cursor statements – the user can retrieve ( declare, open, fetch & close cursors) and issue update( update & delete cursors).
    • DB Stored Procedures – they can be used for retrieve, update or both. To execute DDL statements the AutoCommit must be set to TRUE (1), but if it is TRUE, ROLLBACK cannot be issued, hence after completion of the DDL operation it must be set back to FALSE.
  69. Question 46. What Is Dde? Which Pb Object Has Dde Related Events Associated With It?

    Answer :

    DDE stands for dynamic data exchange by means of which two applications can talk to each other and exchange data between them. Examples are RemoteExec & Remote Send. A PB window has DDE events associated with it.

  70. Question 47. Explain The Concepts Of Embedding And Linking?

    Answer :

    When you embed an object it is saved as part of the OLE container object i.e. any changes to the actual object will not reflect in the embedded object. In case of Linking the original object resides where it was and link information is stored in the OLE container object i.e. any changes to the actual object will reflect in the OLE container object. OCX is an OLE control that implements the component-based architecture.

  71. Question 48. Explain Enumerated Data Types In Pb?

    Answer :

    Enumerated data types are specific to Power Script. They are used as arguments in functions and also to specify the properties of an object or control. A variable of one of the enumerated data types can be assigned a fixed set of values. For example, the enumerated data type Alignment, which specifies the alignment of text, can be assigned one of the following three values. Center! Left!, and Right.

    For example:mle_edit.Alignment=Right.

  72. Question 49. Explain The Concept Of Inheritance In Pb?

    Answer :

    It is a feature that enables you to build windows, user objects, and menus that are derived from existing objects. When you change an ancestor object, the changes are reflected in all the descendants and the descendant inherits the ancestor’s scripts.

    Two main features to be noted here are:

    1. Descendant objects – In PB, an object class can be inherited from another class. The inherited or descendent object has all the instance variables, events, and functions of the ancestor. You can augment the descendant by adding more variables, events, and functions. If you change the ancestor, even after editing the descendant, the descendant incorporates the changes.
    2. Instantiating – When you instantiate a descendent object, PowerBuilder also instantiates all its ancestor classes. You do not have programmatic access to these ancestor instances, except in a few limited ways, such as when you use the scope operator to access an ancestor version of a function or event script.
  73. Question 50. If You Were Experiencing A Gpf In Your Application, How Would You Go About Tracking It Down?

    Answer :

    • Check library search path in development, required DLL’s, PBL’s in runtime etc
    • If PFC is used, check that the PB version is exactly the same as PFC version, i.e. 5.0.04 etc
    • Use DLL tracking utility to check executables DLL list
    • Enabling the PB Debug Tracing information and find the last line of code that executed prior to the GPF.
  74. Question 51. Name Some Of The Pfc Services?

    Answer :

    • Application (debugging, error message, security)
    • Data window (filter, linkage, print preview, resize, sorting)
    • Window (menu, resize, file, metaclass)
  75. Question 52. Explain The Type Of Inheritance?

    Answer :

    Two types of Inheritance: Single Inheritance and Multi-level Inheritance.

  76. Question 53. Is Power Builder Support Multiple Inheritance?

    Answer :

    No,But you need`multiple inheritance then you can inherit one object from other and You make one object as userobject and then use this userobject inherited object.

  77. Question 54. How Many Event Support An Application?

    Answer :

    Six even support an application.

    open(),close(),connection begin(),connections(),idle(),system error().