Application Engine Interview Question




1) There are different types of variables in the Application Engine people code?
Local variable – these are available for the duration of the program in which they are declared.
Global / Component – These variables are available while the Application Engine program is running. They are saved at commits and checkpoints, so they can be used for restarts. Component variables are same as Global incase of the AE.

2) What are the Different ways to pass data between the steps?
1) State records – One row can be passed and can have many state records.
2) Component/Global People code variables
3) Temporary records – Multiple rows of data can be passed.

3) What is Prerequisite for the State record?
1) Should be either Derived work record Or SQL Table.
2) Name of the record must end with _AET; this is how the system identifies the record as a state record.
3) PROCESS_INSTANCE must be a key.
4) Any data types except character or numeric must not be required fields.
Note: - No People code fires on an Application Engine state record.
No Validation of translate values or Prompt tables are done.

4) How to read the runctrl parameters in AE?
1) SQL: - %Select (EMPLID) Select EMPLID from PS_AERUNCONTROL                                                                                    where PROCESS_INSTANCE = %PROCESS_INSTANCE and ORPID = %oprid
2) People code: - &SQL = “Select EMPLID from PS_AERUNCONTROL Where PROCESS_INSTACNE =” PS_TEST_AET.PROCESS_INSTANCE “and OPRID =” %oprid.
%PROCESS_INSTANCE or %Bind (PROCESS_INSTANCE) can be used.
%PROCESS_INSTANCE is more efficient and faster.

5) How do you execute Application Engine through Push Button?
1) CreateProcessRequest (), Schedule ()
2) CallAppEngine.      Syntax:   CallAppEngine (applid [, state record]);

6) what are the 3 trace parameters you can pass to your psae.exe?
- TRACE
- TOOLSTRACESQL
- TOOLSTRACEPC 
7) Which Trace option is the best place to start for general performance information?
- TRACE 384 – mostly used trace value.

8) What is the difference between a Trace value and Trace parameters?
A Trace parameter determines which type of trace is turned on.
A Trace parameter determines what type of data is recorded in your trace files (s).

9) What are the 3 common ways to pass a trace parameter and value to your program psae.exe?
Configuration manager, Process Definition, Command prompt.

10) What are the Different types of Application Engine?
Standard: Standard entry-point program.
Upgrade Only: Used by PeopleSoft Upgrade utilities only.
Import Only: Used by PeopleSoft Import utilities only
Daemon Only: Use for daemon type programs.
Transform Only: Support for XSLT Transform programs.

11) How do you program AE program for the restarts?
Program Level State Record
one of the state record needs to SQL Table, Since All Derived work record will be re-initializing on commit.
Program Properties
on the Advanced tab in the program properties dialog box, make sure that disable restart is not checked.
Configuration manager
In the configuration manager, sure that Disable restart is not selected on the process scheduler tab.
Section Level
Section type
The option for section type are prepare only and critical updates
If the section is preparing data i.e. select data, Populating temporary tables, or updating temporary tables then the section should be prepare only.
If the section is updating the permanent application tables in the database, you should select critical update.
Step Level
Add an order by clause
%Select Field Select Field1 from PS_SOME_RECORD Where FIELD1 > %Bind (FIELD1) Order by FIELD1.
Add a switch to the selected table
Delete processed rows.

The only restriction for batch runs occurs when you have restart enabled, and you are inside a Do Select that is of the Select/Fetch type (instead of "Re-select" or "Restart table"). With select/Fetch, all commits inside the loop are ignored, including the commit frequency if it's set.

12) What is Set Processing? 
Set Processing uses SQL to process groups, or sets, of rows at one time rather than processing each row individually. With row by row processing you following a repetitive loop that selects a row, determines if it meets a given criteria, if so, apply rule x to row Update row, commit. With set processing, you only select those rows that meet the filtering criteria and then run the rule once again all the affected rows.

13) Advantages of Set Processing?
Improved Performance: - Our internal testing has revealed that, in an overwhelming majority of cases, set processing performs significantly better than it is -by-row counterpart for “reasonable” batch processing volumes.
Minimized SQL Overhead: - It tends to use fewer Application Engine SQL statements that each processed more data than the statements executed in row-by-row processing.
Easy Maintenance: - if need to make a fix or add an enhancement to SQL, it’s just a matter of modifying the SQL or inserting the new “Chunk”.
Leveraging the RDBMS: - With Set – based processing, you take advantage of the SQL processing engine on the database rather than placing the processing burden and overhead on the application executable.

14) Testing and debugging application engine?
Application Engine Trace file-You can track the step execution of your application execution.
Application Engine Interactive Debugger – First click on the trace tab and turn off the statement timings.                       Select Profile -> Edit Profile-> Process Scheduler Tab -> Application section Select Debug check box.

15) Order and flow of action types
1) Do When
2) Do While
3) Do Select
4) Peoplecode
5) SQL    /    6) Call Section
7) Message Log
8) XSLT                                                                                                                                                                       9) Do until
16) What is Prerequisite for the Temporary record?
1) Should have process Instance as key
2) Name should end with _TAO

17) Different types of Temporary tables
- Dedicated
- Un Dedicated (Shared)

18) Why Parallel Processing required?
Potential performance improvements by splitting the data to be processed into groups and simultaneously running multiple instance of your program to deal with different groups of data.
If you have a one program that uses a temporary table and is invoked multiple times, that single temporary table could be used concurrently in multiple executions of the code. This could create unpredictable results since the different instances of the code would be issuing delete, Inserts and/or updates unsynchronized with each other.
You could solve the problem by creating multiple temporary tables as a pool of tables. Each invocation of your program would have to allocate an unused temporary table,
mark it as ‘in use’ , use it and release it back to the pool when you through with it (for each Application Engine program you write).

19) How running AE program as Batch differs from running it online?
Application Engine programs are designed for two types of execution and each has its own pool of Temporary Tables
Online: 
Invoked by CallAppEngine from People code
Run quickly, synchronously, and at random times. Potential for simultaneous executions
uses the online Temporary Table pool.
Not restart able.
Psae.exe randomly assigns an instance number from the number range on your online temp tables.
If the instance number is in use psae.exe puts the program in Queue until the assigned instance becomes free.
Unlock on completion, on Crash free from Manage Abends.
Batch:
Invoked through the Process Scheduler.
Run for longer amounts of time, asynchronously, and at scheduled times.
Can be designed for parallel execution for performance.
Uses the Batch/Dedicated Temporary table.
Restart able.
It allocates instance number based on the availability on a record by record basis and psae.exe begins with the lowest instance numbers. If the properties are set continue - Base table is used with Process instance as key.
If Re-starable – Locked across Restarts until completes successfully.
If not Re-startable on Program completion.

20) What are the important steps for implementing the parallel processing?
Define you Temporary Tables.
Set the Temporary Tables Online pool.
Assign Temporary Tables to your Application Engine program in it program.
Set Temporary Table Batch Pool – Instance count in the AE.
Build / Rebuild your Temporary Table record.
Code %Table Meta – SQL as reference to Temporary Tables in your Application Engine program, so that Application Engine can table references to the assigned Temporary Table instance dynamically at runtime.

21) What happens when all the instance of the temporary table are in use?
It behavior can control by AE developer. If the runtime options are set to continue “People Tools will insert rows into the base table using the PROCESS_INSTANCE as a key”. If temp table doesn’t contain PROCESS_INSTANCE as a key field in a Temporary table, you should change the Temp table runtime options to “Abort” in the appropriate Application Engine programs.


22) How can you divide the data to be processed by different instance of the program to perform parallel program?
Run control parameters passed to each instance of the AE program enable it to identify which input rows “belong” to it, and each program instance inserts the rows from the source table into its assigned temporary table instance using %Table.

23) What are the 3 common ways to pass a trace parameter and value to your program psae.exe?
Configuration manager, Process Definition, Command prompt.

24) What is the main purpose of the Access property in the Section?
Basically they have two options, public and private if section declared as public then it be access from other program. Private we cannot call from other program.

25) Which actions are mutually exclusive and why they are mutually exclusive?
Sql  and callsection.

26) Error handling or Exception handling in Application Engine?
Step properties:-
On Error: -
Abort – Write message to message log and terminate.
Ignore - Write message to message log and continue.
uppress – No message will be written, but program will continue.
People code Action: - On return options can used to handle run time errors.
Abort: - Exits immediately – Not recommended.
Break:- Exits the current step and section and control returns to the calling step.
Skip Step:- The program exits the current step, and continues processing at the next step in the section. If this is the last step in the section, the calling step resumes control of the processing.
SQL Action properties:-
No Rows:- When the Sql doesn’t return any rows, you can tell what application engine program should do.
Abort: - Program terminates
Section Break: - Application Engine exits the current section immediately, and control returns to the calling step.
Continue: - The program continues processing
Skip Step: - Application Engine exits the current step immediately and moves on to the next step. When using skip step keep the following in mind:
1) Application Engine ignores the commit for the current step at runtime
2) If the current step contains only one Action, only use skip step at by-pass the commit.

27) What are different types Do Select? 
1) Select/Fetch
2) Reselect
3) Restart able

Select/Fetch: -
Opens the cursor only at the first time and retrieve rows one at loop.
Commits inside the step (commits in the Called Section) are ignored if AE is Restart enabled.
Reselect: -
It opens the cursor and closes the cursor on each iteration of the loop.
It will reselect the same row of data.
Logic in Actions of the step should be such that it will be changing the status of the rows in the table the do select is selecting.Commits are not ignored and will be committed in a reselect loop when the restart is enabled.
Restart able: - similar to select/Fetch but it WILL COMMIT inside the loop thus allowing the checkpoint to the PS_AERUNCONTROL table.

28) What is the maximum limitation on temporary tabel instances in AE?
99

29) what is the difference between the %SELECT and %SELECTINIT Meta sql functions?
 %select : if any values have not selected then previous value will be there
%selectinit : if any values have not selected then previous value will reinitiate to null

30) what is the difference between exit(0),exit(1) when we are using this functions in AE?
Exit (1) causes immediate termination of a PeopleCode program. Use this parameter to rollback database changes.
Exit (0) caused immediate termination of a Peoplecode Program but don’t make rollback in the database.

31. What is Application Engine?
It is the tool, which performs, background SQL processing against our application data tables. It is an alternative for COBOL, SQL or SQRPrograms. Other tools such as query tool and mass change generate SQL.
32. What are the parts of Application Engine?
Application Engine consists of 4 parts.
1. Application: It is a set of SQL statements.
2. Steps: It is the smallest unit of work committed in an application.
3. Sections: Comprises of 1 or more steps
4. Statements: SQL statements like update, insert, delete or select are issued.

33. What is the advantage of using Application Engine?
The following are the advantages of using Application Engine.
Encapsulation
Unlike applications developed using COBOL or SQR, Application Engine applications reside completely within your database. With Application Engine, there are the programs to compile, no statements to store, and no need to directly interact with the operating environment in use. You can build, run and debug your applications without existing People Tools.
Effective Dating
Application sections are effective dated-meaning you can activate/deactivate a section as of a particular date. This enables you to archive sections as you modify them, instead of destroying them. In the future if you decide to revert to a previous incarnation of a section you can simply reactivate it.
SQL / Meta-SQL Support
In addition to writing your SQL within Application Engine, you can also copy SQL statements into Application Engine from SQL talk or any other SQL utility with few – if any changes.
RDBMS platforms have many differing syntax rules – especially in regard to date, time and other numeric calculations. For the most part you can work around this problem using Meta-SQL which Application Engine supports. This language was created to handle different RDBMS SQL syntax’s by replacing them with a standard syntax, called Meta-strings.
With in Platform specific sections
you can also have the ability to call generic portions of SQL statements by using the & CLAUSE function. This means you can write your generic SQL portions just once, and reference them from your different platform versions.
Set Processing Support
Set processing is a SQL technique used to process groups (or sets) of rows of one time rather than one at a time. Application Engine is particularly effective of processing these types of applications.
Object Orientation
unless designed to anticipate changes in field attributes. COBOL applications may need to be modified when things change. If a developer increases a field’s length, then it may need to be changed in every instance where the COBOL program uses this field as a bind or select variable. This can require a good bit of effort. And, if not handled properly, a change like this can cause confusing errors. For example, if the length of a field in the COBOL is wrong, it may work fine, or you may get an error, or the field may get truncated.
One of the corner stone’s of People soft functionality is Application Designer. Because of the way it works, most field attributes (type, length and scale) can be specified once, globally. If the field is used on more than one record, it has the same attributes in each of these records.

PORTABILITY
you can use Data Mover to import/export your applications. This means that you can export an application(s) into a file, and attach it to an e-mail message. Then, the recipient can simply use the IMPORT feature of Data Mover, and the application is ready to run.

34. What is a Cache Record?
The Cache record (or state record) is a physical People soft record, keyed by process instance that must be created and maintained by the Application Engine developer. This record defines the fields that an application uses to pas values from one SQL statements to another. You retrieve cache field values by the Application Engine and BIND function; you assign cache values using %SELECT.

35. What is unique about panels, which refer to view as opposed to physical tables?

Panels that refer to views in People soft are not used for insert, update or delete. All fields on panels are display only.

36. How search records are used?
Search records are used to search, retrieve and filter data. Search records also define the structure of the dialog box.

37. Where is the search records assigned?
Search records are assigned to a panel group in a menu.

38. Does the search record for a panel have to be the same as the record being accessed on the panel?                 The search record for the panel does not have to be the same as the record being accessed on the panel because the search record is used to search for or Filter the search key.

39. How can a search record dialog box be suppressed? (Or bypass)
A search record dialog box can be suppressed by assigning a search record that does not have search key.

40. What do search views delivered by People soft do besides displaying the dialog Box?
Search views delivered by People soft ware used to implement row level security as well as display a dialog box.
41. What do you need to do to modify the search views? 
To modify a search view, we need to change the record definition and recreate the underlying SQL view.

42. When would you have to alter the tables and modify the panels, in the process of modifying search records?
You need to alter tables and modify panels, when you modify a search record to include a new field.

43. When will there be two occurs level records in a panel group? 
If you are referring to two different record definitions that share a same high-level key then two-level one-scroll bar can be displayed as stacked scroll bars.

44. In what order does the application processor fill buffer for the panel group?
The application processor uses occurs level in the panel group to fill the buffer.

45. Differentiate Error V/s Warning statements in People code? 
The error statement issues a message and the condition causing the error must be corrected before proceeding.                 The warning statement issues a message and the user can proceed without changing any values.

46. Where can you run Jobs?
The process scheduler can run jobs on the client or a server machine.

47. What restrictions are placed on multi-process jobs?
A multi process jobs can only be scheduled to run on a server.

48. List the three output destinations available through the Process Scheduler?
You can direct the output to a printer, file and windows screen.

49. Where do you set up default operator / class options for Process Monitor? 
In operator security, using change, process profile.

50. What are the advantages of incorporating Table set ids into People soft applications?
Table set Ids allow you to share sets of values (codes) in the same prompt table.

51. What fields should be at the top of every search record definition that use table set Ids?
SET ID is the field that should be at the top of every record definition that uses table set Ids.

52. What is a Record Group ID?
A Record group ID is a group of record definitions that are Sharing the same set control field.

53. What do you determine using Table set Ids control information?
Table set ID control information determines how the information should be shared. The Table set ID control panel defines which Table set Ids set control filed code will use for each record group.

54. What are the three types of Maps used by the navigator? 
1. Business Process Map
2. Activity Map
3. Step Map

55. What are the types of layers in Crystal reports?
There are 4 types of layers in Crystal Reports. They are...
1. Report Header - In this, we will write title, date, and logos of the company.
2. Page Header – Used to write column headings.
3. Detail – Contains database column values.
4. Page Footer – Used to write page numbers and address.

2 comments: