You are on page 1of 16

Application Engine Introduction

1. What is the Application Engine executable File name


Introduction and path?
Advantages PSAE.exe – Developed in C++ Programming Language.
And the path is c:\<PS_Home>\bin\Client\Winx86\PSAE.exe.
Performance Tuning 2. What is an Application Engine?
Application Engine is a PeopleTools Object. It contains a set of
Types of AE
SQL statements, PeopleCode, and program control Actions
Properties like Looping (DoSelect, DoWhile, and DoUntil) and Conditional
logic (DoWhen).
Sections 3. What is the use of Application Engine?
Application Engine is useful to create Batch or Online
Step Programs that performs background SQL processing.
Actions 4. What are the other Tools which can also supports
background SQL Processing?
State Record COBOL, SQR, Mass Change.
5. Which Tool is preferable to do the Background SQL
Temporary Table Processing?
Application Library Application Engine is preferable as COBOL and SQR are 3 rd
party tools. Though Mass Change is PeopleTools Object it
Dynamic Call Section doesn’t supports Program logic. But the advantage is it
generates the SQL automatically which AE doesn’t generate.
Execution of AE 6. Which PeopleTools table stores the Application Engine
information?
Debugging AE
PSAEAPPLDEFN
Restart Facility 7. Does Application Engine Generate SQLs like Query
Manager?
Meta SQLs No, Application Engine does not generate SQL or PeopleCode.
It executes the SQL and PeopleCode that you include in an
AE Errors Application Engine Action.
Abends 8. Is compilation required for Application Engines?
Compilation is not required for AE Programs.
Online Processing 9. What are the Platforms that AE can support?
Batch Processing DB2, DB2/Unix, Informix, Microsoft, Oracle and Sybase.
10.What is the limitation to the Application Engine
Parallel Processing program name?
12 characters.
Row-by-row Processing
Set Processing
File Layout Advantages
11.What are the advantages of Application Engine?
XL to CI
1. AE is a PeopleTools Object, so it can be easily upgrade
Component Interface between the databases.
2. Supports Restart facility.
3. Supports Meta SQLs which makes the code platform
independent.
4. Supports Parallel Processing.
5. Supports GUI.
6. Supports Effective Dating.
7. Reuse Business Logic.
8. Encapsulation.
9. Portable to Operating System.
12.What are the Advantages of AE over SQR?
1. AE stores in Database server. SQRs Stores in File Server.
2. Encapsulation – As AE Program stores in Database Servers,
if we make any changes to any AE related objects, it
reflects across the Database. And No need to compile the
AE Programs.
3. PeopleCode, SQL Editors are there to validate while
developing the code. Notepad / WordPad / Text Pad / Ultra
Edit will be useful to write the SQR but these Text Editors
will not validate the code.
4. Supports Mets SQLs.
5. Supports GUI – So we can open as many as Objects in the
same window. And shows the graphical representation of
the program execution.
6. Supports Restart facility.
7. We can make some code Active/Inactive from a particular
date.
8. Portable to Operating System – We can call different
versions of a Section for different Platform. Used to enter the Owner ID for the program. Owner ID is a
13.On what basis you would prefer to create AE and SQR? way to identify which objects are owned by which PeopleSoft
products, such as HR, Payroll and so on. The values in the
Prefer AE:
dropdown list are Translate table values associated with the
 When there is huge back ground SQLs to be processed. OBJECTOWNERID field. This field is entirely optional.
 When we wanted to Restart the Program. 28.What are the main options available in Temporary
Prefer SQR: Table Tab?
 When we wanted to generate the Complex Reports - PDFs. Instance Count and Run Time (Continue / Abort)
 When there is a huge logic to be validated. 29.What are the properties available in Advance Tab?
14.Assume we have to develop a simple program which is Disable Restart, Application Library, Batch Only, Message Set,
not even having huge back ground SQLs and huge Program Type.
validations. What tool you would prefer? 30.What is the use of ‘Batch Only’ option in Advanced Tab?
If there is any Client restriction like we should not use any 3rd Select this check box for batch only programs.
party applications, I would prefer AE. Otherwise it depends.
31.Can we execute Batch only programs thru
CallAppEngine()?
Batch only programs are not executed from the
Performance Tuning CallAppEngine() PeopleCode function.

15.How to tune the Application Engine Performance?


1. Use Temporary Tables.
2. Avoid Row by Row Processing. Sections
3. Use Set Processing. 32.Which PeopleTools Table stores the information about
4. Use Bulk Insert. Application Engine Sections?
5. Reuse. PSAESECTDEFN
6. Split the logic into smaller piece rather coding 33.What is the entry point of an Application Engine?
everything in one place. Main Section.
7. By using Traces. 34.Is it required to have a Main Section for every AE?
8. Avoid using SQLs in PeopleCode Action rather use in Do Yes for all Application Engine programs. For Application
Actions. Libraries not required.
35.Can we rename MAIN Section?
No. We can’t.
Types of AE 36.What are the Section Level Properties?

16.What are the Types of Application Engines?


Standard, Upgrade only, Import only, Daemon Only,
Transform only.
17.About Upgrade Only

18.Sample Program for Upgrade Only?


37.What is the use of Section Type Property?
In the case of an abnormal termination, the value of this
19.About Import Only system field specifies whether you must or not restart the
section.
20.Sample Program for Import Only? 38.What is the use of Access Property?
We can specify that a Section can or can’t be called from
21.What is Daemon Processing? another program. If Public check box is selected then we can
A special type of program used as a daemon process and is call this from other Section.
intended for recurrent jobs. For example: A Daemon process 39.Where and what option need to set when we want to
which runs based on an input file. It waits till the input file deactivate a particular Section after 12/12/2010?
loads in particular server then starts executing automatically. In the Section Properties set the Effective Date as
22.What is the Daemon Process executable File name and 12/12/2010 and Effective Status as Inactive.
path? 40.Can we have more than one Section with the same
Name: psdaemon.exe. name in an Application Engine Program?
Path: C:\<PS_Home>\bin\Client\Winx86\psdaemon.exe.  Yes, We can insert more than one Section with the same
23.Sample Program for Daemon? name in an AE Program.
 But Effective Date or Market or Platform should not be same.
24.What is the use of Transform Only AE Type?  AE will pick the most recent effective dated Section based on
the current run date.
These types of programs enable different systems to
communicate with one another by transforming messages 41.What is the default Market?
into appropriate formats. GBL Global.
25.Sample Program for Transform Only? 42.Assume there are 3 Sections with the same Effective
date and 3 different Markets GBL, GBR, GOV. So which
Section will execute?
If the current Market is GBR / GOV then GBR / GOV will
execute, other wise default Market GBL Will execute.
Properties 43.Can we have an AE Section without having any Step?
Yes, AE will not throw an error.
26.How many Tabs available in AE Properties?
1. General
2. State Record
3. Temporary Table Step
4. Advanced
44.Which PeopleTools Table stores the information about
27.What is the Use of Owner ID Option in General Tab? Application Engine Step?
PSAESTEPDEFN Section Level - Auto Commit – After Step is unchecked,
45.What are the Step Level Properties? Step Level – Commit After is Default.
Step Level – OnError is Abort.
 In DoSelect 5 rows will be selected from ABC Table.
 In 1st iteration 699 + 1 = 700 will be inserted into XYZ.
 In 2nd iteration 799 + 1 = 800 will be inserted into XYZ.
 In 3rd iteration 899 + 1 = 900 will be inserted into XYZ.
46.What are the options available with ‘Commit After’  In 4th iteration it will try to insert 999 + 1 = 1000 which is of
Option? 4 digits length. Since field length is 3, AE will throw an error.
Commit will be executed Based on this Property.  All the 3 inserted rows will be rolled back.
1.Default: Commit will be executed based on the option set  Commit will not execute so no row will be inserted into XYZ.
in the Section Level.
EX2:
2.Later: Postpone the Commit until a subsequent Commit
What would be the program flow when
occurs.
Section Level - Auto Commit – After Step is unchecked,
3.After step: Commit will be executed when Step completes.
Step Level – Commit After is After Step.
47.What is the use of Frequency option?
Step Level – OnError is Abort.
Using the Frequency option we can set the commit after a
specified number of iterations.  Same as above example - Inserts 3 rows and AE will throw an
error while inserting 4th row, Commit will not be executed, all
48.What are the default options set for Commits in an AE?
3 rows will be rolled back and there will not be any row in
By default, the Commit values at the Section and the Step XYZ Table.
level are Turned Off.
EX3:
49.What are the options available with ‘On Error’ Option?
What would be the program flow when
We can specify the action to be taken when an error occurs.
Section Level - Auto Commit – After Step is unchecked,
1.Abort: It writes the Message into Message Log and
Step Level – Commit After is After Step.
terminates the process.
Step Level – OnError is Abort.
2.Ignore: It Commits the database and writes the Message
into Message Log and continues with the processing. And there is Commit statement in Step1 - PeopleCode.
3.Suppress: It will not Commit and No message will be SQLExec("COMMIT");
written, but the program will continue.  First 3 rows will be Inserted and each row will be Committed
50.When Commit will be processed if we set ‘Auto Commit and AE will throw and error while inserting 4th row. So finally
– After Step’ at Section level and ‘Commit After – Later’ there would 3 rows in XYZ Table.
at Step level? EX4:
As Step level properties always overrides the Section level What would be the program flow when
properties, Commit will not be executed after the Step. It Section Level - Auto Commit – After Step is unchecked,
postpones the Commit until a subsequent Commit occurs. Step Level – Commit After is Later.
51.When AE issues the Commit? Step Level – OnError is Ignore.
 By Default all the Commits are turned off. Means AE will not  First 3 rows will be inserted. Commit will not execute.
Commit till it gets completed.
 AE will throw and error while inserting 4th row.
 We can Set the Commit option at Section Level – Auto
 Since we selected the Ignore option, AE will ignores that error
Commit – After Step Option.
and Issues the Commit, so first 3 rows will be get committed.
 We Can Set the Commit Option at Step Level – Commit After
 And then continues with the process and inserts the 5 th row.
– Default / Later / After Step Option.
 And it will not Commit after the Step1 since we selected
 If we mention Commit at both the places then Step Level
Later option for Step1. So 5th row will be in buffer.
Commit will be processed.
 Then Step2 – PeopleCode will execute and issues the Commit.
 And we can Commit the Program thru PeopleCode
SQLEXEC(“COMMIT”);
 So finally there would be 4 rows 700, 800, 900, 300 in XYZ.
52.What is the Function to come out from the Current Step EX5:
and continue the execution with next Step? Scenario is same as EX4, Assume due to some Code
Exit(1). error Step2 – PeopleCode got errored out then what
will happen?
53.What is the Function to come out from the Current
Action and continue the execution with next Action in  First 3 rows will be inserted. Commit will not execute.
the Same Step?  AE will throw and error while inserting 4th row.
Exit(0).  Since we selected the Ignore option, AE will ignores that error
54.Assume there are 2 tables ABC and XYZ. Both the and Issues the Commit, so first 3 rows will be get committed.
tables are having ROW_NUM filed with length of 3  And then continues with the process and inserts the 5 th row.
digits. ABC is having the 5 values 699, 799, 899, 999,  And it will not Commit after the Step1 since we selected
299. And we are trying to insert these 5 values into XYZ Later option for Step1. So 5th row will be in buffer.
table by adding 1 to each number.  Then Step2 – PeopleCode will execute and it will throw an
Main Section error. So it will not issue the commit. 5th row in buffer will not
Step1 be get committed in XYZ Table.
DoSelect
 So finally there would be 3 rows 700, 800, 900 in XYZ.
%Select(ROW_NUM)
SELECT ROW_NUM EX6:
FROM ABC Scenario is same as EX4&5, but OnError option is
PeopleCode Suppress then what will happen?
Here I will write the Commit only for 3 rd Example.
 First 3 rows will be inserted. Commit will not execute.
SQL
INSERT INTO XYZ  AE ignores the 4th row and will not issue the Commit.
VALUES (%Bind(ROW_NUM)+1)  Then inserts the 5th row. Commit will not execute.
Step2
 Executes the Step2 – PeopleCode. AE will throw an error (as
PeopleCode
per the scenario). Commit will not execute.
SQLExec("COMMIT");
 So finally there will be not be any row in XYZ table.
EX1:
What would be the program flow when 55.Can we have Step without having any Actions?
Yes, AE will not throw an error.
56.What is the Table Name difference from Version 7 to 8?

7.x Version 8 Version


PS_AE_APPL_TBL PSAEAPPLDEFN
PS_AE_SECTION_TBL PSAESECTDEFN
PS_AE_STEP_TBL PSAESTEPDEFN
PS_AE_STMT_TBL PSAESTMTDEFN

Actions
57.Which PeopleTools Table stores Information about
Actions?
PSAESTMTDEFN
58.How many Actions are there in App Engine?
9 Actions.
59.What’s the Sequence of execution?
DoWhen, DoWhile, DoSelect, PeopleCode, SQL / CallSection,
LogMessage, DoUntil, XSLT.
60.How many Actions we can insert in a Step?
7. If the AE type is Transform we can insert 8 including XSLT.
61.What are the ‘Looping Related’ Actions?
DoSelect, DoWhile, DoUntil.
62.What are the ‘Condition Related’ Actions?
DoWhen

DoWhen
63.About Do When?
Its like IF statement, First it executes the Condition, if any row
of data exists then executes all subsequent Actions. Otherwise
comes out from the Step.

64.What the Properties available with DoWhen, DoUntil,


DoWhile?

65.Sample Program from DoWhen Action?


 Assume a Table ABC is having EMPLID field and there are 10
Employee IDs starting from AA, BB, CC, to JJ.
 And the program structure is
MAIN
Step1
DoWhen
%Select(EMPLID) SELECT EMPLID FROM ABC
PeopleCode
SQLExec("SELECT COUNT(*) FROM ABC", &Count);
MessageBox(0, "", 0, 0, "No of Rows in ABC Table: " |
&Count);
MessageBox(0, "", 0, 0, "Employee ID in State
Record: " | CNU_AET.EMPLID.Value);
SQL
DELETE FROM ABC
MAIN
Step2
Step1
DoWhen
%Select(EMPLID) SELECT EMPLID FROM ABC
DoWhile
PeopleCode
%Select(EMPLID) SELECT EMPLID FROM ABC
PeopleCode
SQLExec("SELECT COUNT(*) FROM ABC", &Count);
MessageBox(0, "", COUNT(*)
SQLExec("SELECT 0, 0, "No of
FROM
RowsABC",
in ABC
&Count);
Table: " |
&Count);
MessageBox(0, "", 0, 0, "No of Rows in ABC Table: " |
MessageBox(0, "", 0, 0, "Employee ID in State
&Count);
Record: " | CNU_AET.EMPLID.Value);
MessageBox(0, "", 0, 0, "Employee ID in State
SQLRecord: " | CNU_AET.EMPLID.Value);
DELETE FROM ABC
SQL
DELETE FROM ABC WHERE EMPLID IN ( SELECT TOP 5
 Application EMPLID FROMfirst
Engine ABCexecutes
ORDER BY EMPLID
the Select DESC)
Statement in
DoWhen Action.
 Application
Condition gets Engine first executes
satisfies as there are the 10
Select Statement
rows.(At in
least one
DoWhile
row needed) Action.
 Condition gets satisfies
In PeopleCode, messageaswill there are 10 rows.(At
be displayed as least one
71.What are the options available with DoSelect?
row needed)
No of Rows in ABC Table: 10 1. Select/Fetch
 Inserts first employee AA into State Record and continues the
Employee ID inrestState of Record: AA  Opens the Cursor.
execution with the Actions.
 InIn PeopleCode, message will bewill
SQL Action, All the 10 rows be deleted
displayed as from table.  Selects the first row that meets the SQL condition.
 As DoWhen is not a looping Action it will not go back to the  Executes the Subsequent Actions in the Step.
Ex:
Select Statement and execute. It comes out from the Step  Returns to the Cursor and retrieves the next row and
No
andofexecutes
Rows in the ABCnextTable: 10
Step. continues again with the rest of the Actions.
Employee ID in State Record: AA
 If no row found, comes out from Do Select Action.
 In SQL
Step2,Action,
DoWhen Top will
5 rows
be executed
in descending
first. order (JJ, II, HH,
 It ignores the internal Commits.
 GG, and FF)
Condition gets willfail
beas deleted.
there are no rows. So it will not execute
the Subsequent Actions PeopleCode and SQL. 2. Reselect
 Application Engine again executes the Select Statement.  Opens the Cursor.
 Condition gets satisfies as there are 5 rows.(At least one row
DoWhile  Selects the first row that meets the SQL condition.
needed)  Close the Cursor.
 Inserts Do
66.About firstWhile?
employee AA into State Record and continues the  Executes the Subsequent Actions in the Step.
execution with
It’s like WHILE loop. rest of theitActions.
First executes the Condition, if any row  Returns to the SQL in the Do Select.
 of
Indata
PeopleCode,
exists then message
executes willall
besubsequent
displayed as Actions. Then  Opens a Cursor again.
again
No of come
Rows back
in ABC to Table:
the Condition
5 and executes, if any row of
 Executes the SQL. Selects the first row, Close the Cursor and
data exists ID
Employee then executes
in State all Subsequent
Record: AA Actions.
continue the same process.
It executes as long as at least one
 In SQL Action, Top 5 rows in descending order (EE,row returned by the
DD,Select.
CC, 3. Restartable
BB, and AA) will be deleted.
 It is similar like Select/Fetch but the only difference is we can
use this with Restart option.
 Application Engine again executes the Select Statement.
 Upon Restart, the program recognizes where the previous run
 Condition gets fail as there are no rows.(At least one row
failed and where to restart the process.
needed)
 When a program runs, each time Application Engine issues a
 Comes out from the Step and as there are no other section to
COMMIT it also saves all of the information required for a
execute, program will end.
program restart in the AERUNCONTROL record. Of course,
when an end user restarts the program, the Application
DoUntil Engine checks the AERUNCONTROL values for a particular
Process Instance to find what Steps to ignore and where to
68.About Do Until? begin processing.
It’s like REPEAT UNTIL loop. First it executes all the Actions 72.What is the difference between Select/Fetch and
then checks the Condition. If any row of data exists then it ReSelect?
comes out from the Step otherwise it executes the Actions  Select/Fetch keeps the selected rows into buffer and executes
again. the subsequent Actions for each row. ReSelect will not keep
It executes as long as no rows returned by the Select the selected rows into buffer rather it Re-executes the Select
67.Sample Program for Do While Action?
Statement. Statement.
 Assume a Table ABC is having EMPLID field and there are 10
 Assume a Table ABC is having EMPLID field and there are 10
Employee IDs starting from AA, BB, CC, to JJ.
Employee IDs starting from AA, BB, CC, to JJ.
 And the program structure is
 And the program structure is

 Ex:
 Assume a Table ABC is having EMPLID and there are No rows.
 And the program structure is
 In PeopleCode, message will be displayed as
No of Rows in ABC Table: 10 SQL
Employee ID in State Record: AA
74.About SQL Action?
 In SQL Action, Top 5 rows in descending order (JJ, II, HH,
GG, and FF) will be deleted. SQL Action is used to perform the DDL, DML, and DCL
operations.
 Application Engine again executes the Select Statement. Mostly we use SQL Action to perform DML commands
 Condition gets satisfies as there are 5 rows. (UPDATE, DELETE, and INSERT).
 Inserts first employee AA into State Record and continues the  Ex:
execution with rest of the Actions.  Program structure is
 In PeopleCode, message will be displayed as MAIN
No of Rows in ABC Table: 5 Step1
SQL
Employee ID in State Record: AA IF EXISTS (SELECT 'X' FROM SYSOBJECTS
 In SQL Action, Top 5 rows in descending order (EE, DD, CC, WHERE TYPE = 'U' AND NAME = 'ABC')
BB, and AA) will be deleted. DROP TABLE ABC;
Step2
 Application Engine again executes the Select Statement. SQL
CREATE TABLE ABC (EMPLID CHAR(10) NOT NULL);
 Condition gets fail as there are no rows.
Step3
 Comes out from the Step and as there are no other section to SQL
execute, program will end. INSERT INTO ABC VALUES ('AA');
INSERT INTO ABC VALUES ('BB');
DoSelect with Select/Fetch Option. INSERT INTO ABC VALUES ('CC');
Step4
 Application Engine first executes the Select Statement in SQL
DoSelect Action. UPDATE ABC SET EMPLID = 'DD' WHERE EMPLID = 'CC'
Step5
 Condition gets satisfies as there are 10 rows.
SQL
 Inserts all 10 rows into buffer. DELETE FROM ABC WHERE EMPLID = 'AA'
Step6
 Selects first employee AA from buffer and executes all SQL
Subsequent Actions. COMMIT
 In PeopleCode, message will be displayed as Step7
SQL
No of Rows in ABC Table: 10
%Select(EMPLID) SELECT EMPLID FROM ABC
Employee ID in State Record: AA Step8
 In SQL Action, Top 5 rows in descending order (JJ, II, HH, PeopleCode
GG, and FF) will be deleted. MessageBox(0, "", 0, 0, "Employee ID in State Record:
" | CNU_AET.EMPLID.Value);
 Selects next employee BB from buffer and executes all
Subsequent Actions.  Application Engine first executes Step1 – SQL. Checks for ABC
 In PeopleCode, message will be displayed as table in System Table. If table exists, it drops the table.
No of Rows in ABC Table: 5  Then Executes Step2 – SQL. Creates ABC Table.
Employee ID in State Record: BB  Then Executes Step3 – SQL. Inserts 3 Employee IDs AA, BB
and CC.
 In SQL Action, Top 5 rows in descending order (EE, DD, CC,
BB, and AA) will be deleted.  Then Executes Step4 – SQL. Updates CC EMPLID with DD.
 Then Executes Step5 – SQL. Deletes AA EMPLID.
 Selects next employee CC from buffer and executes all  Then Executes Step6 – SQL. Commits the transaction.
Subsequent Actions.  Then Executes Step7 – SQL. Selects the EMPLIDs and inserts
 In PeopleCode, message will be displayed as the first EMPLID BB into State Record.
No of Rows in ABC Table: 0  Then Executes Step8 – PeopleCode would display
Employee ID in State Record: CC Employee ID in State Record: BB
 In SQL Action, No rows to be deleted. Program will continue 75.Can we insert more than one SQL in SQL Action?
since ‘Continue’ is selected in ‘No Row’ Property. Yes, we can insert n number of Valid SQL Statements in one
SQL Action.
 Selects next employee DD from buffer and executes all
76.What are the Properties available with SQL Action?
Subsequent Actions.
 In PeopleCode, message will be displayed as
No of Rows in ABC Table: 0
Employee ID in State Record: DD
 In SQL Action, No rows to be deleted. Program will continue
since ‘Continue’ is selected in ‘No Row’ Property.

 It executes like this for 10 times then comes out from


DoSelect as there are no other section to execute, program 77.What are the option available with ‘No Row’ Property
will end. for SQL Action?
73.What is the difference between DoWhile and DoSelect? Now Rows is valid only for SQL Actions.
 Both the Actions execute the Subsequent Actions when Select If the SQL (Insert, Update, or Delete) associated with the SQL
Statement returns at least one row. action does not return any rows, we must specify what the
 For Example Select Statement retuned 5 rows, then DoSelect Application Engine program should do.
executes the Subsequent Actions 5 times but DoWhile  Abort: Terminates the program.
executes the Subsequent Actions only once.  Section Break: Exits the current Section immediately, and
 DoSelect with Reselect Option is same as DoWhile. Both the control returns to the calling Step.
Actions re-execute the Select Statement.  Continue: The program continues processing.
 Skip Step: Exits the current Step immediately and moves
on to the next Step. Application Engine ignores the Commit
for the current Step at runtime. If the current Step contains 85.What are the Properties available with CallSection?
only one Action, use Skip Step only to bypass the commit.
78.About ReUse?
 ReUse is valid only for SQL Actions.
 By default ReUse option is disabled. So runtime AE 86.What’s the use of Call Section?
recompiles the SQL statement every time the loop
 Call Section used to call Local Sections and External
executes.
Sections.
 ReUse Optimizes the SQL. It converts any %BIND
 Local Sections are within the Program.
references to State Record fields into real bind variables
(:1,:2, and so on).  External Sections are any Section of other than the Current
Program.
79.About Bulk Insert?
 To call any Section which is of another program, we have to
 Inserting buffering rows into database.
mention Program ID and Section Name.
 It holds all the data in a buffer and performs an insert only
 And the Section of other Program Access Property should
after a large volume of rows gathered in the buffer.
be set to Public.
 The number of rows allowed to gather in the buffer
87.Can we call the MAIN Section of other AE?
depends on your database platform.
Yes, We can. So It runs the entire program.
 PeopleSoft supports this feature for Oracle, SQL Server,
and DB2. 88.How many levels of nested Call Sections can an AE
supports?
 For statements other than Insert, the Bulk Insert option is
ignored. Application Engine supports up to 99 levels of nested Call
Section actions.

PeopleCode
LogMessage
80.What is the use of PeopleCode Action?
89.About Log Message Action?
 To Invoke PeopleCode Functions.
 A Log Message Action can be used to write a message to the
 To Read and Write the files. PS_MESSAGE_LOG and PS_MESSAGE_LOGPARM based on a
 To Invoke Component Interface. particular condition in the program.
 To Invoke Business Interlinks.  Mostly useful to write Error Message to the Message Log and
 To Publish an Application Message. can be useful to write Informational and Status Messages.
 To do the XML File Processing.  This gives your program Multi-Language capability.
81.What are the options available with PeopleCode ‘On  When a user views the Messages using the Application Engine
Return’ property? Message Log page, the system retrieves the appropriate
message string from the message catalog based on the user’s
language preference.
 You can also use MessageBox PeopleCode to populate
PS_MESSAGE_LOG instead of using the Log Message action.
This enables you to easily record errors encountered within
Application Engine PeopleCode programs.
90.What are the Properties available with Log Message
1.Abort: The program issues an error and exits immediately. Action?
2.Break: The program exits the current Step and Section,
and control returns to the calling Step.
3.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. XSLT
82.How ‘Error handling’ and ‘Exception handling’ can be
done in Application Engine Program? 91.When XSLT action will be enabled?
Step Level - On Error Property. When we select the Application Engine Type as Transform.
Action Level – PeopleCode – On Return Property. 92.What are the mutually exclusive Actions?
Action Level – SQL – No Rows Property. SQL and Call Section are mutually exclusive to avoid the Data
Conflicts and Deadlocks.
83.What is the PeopleCode Command to Send Mail?
SendMail. Assume Call Section and SQL Actions are allowed in one Step.
84.How can we Open/Read/Write files Thru AE? Assume an Update SQL is there in one Step which updates
 By using File Layout Object. ABC Table. So curser will be opened on ABC Table.
 And By using PeopleCode Commands (Get File, ReadLine,
And Assume a Call Section is there in the same Step which
WriteLine) in PeopleCode Action.
calls the other Section which is having another SQL on the
&FileName1 = "C:\Temp\Temp1.txt"; same ABC Table.
&FileName2 = "C:\Temp\Temp2.txt";
As the cursor is already opened, when it tries to execute 2 nd
SQL, Deadlocks and data conflicts will arise.
&FILE1 = GetFile(&FileName1, "R", %FilePath_Absolute);
&FILE2 = GetFile(&FileName2, "W", %FilePath_Absolute); So to avoid these situations, Call Section is not allowed when
there is an SQL Action in a Step and vice versa.

While &FILE1.ReadLine(&Emplid); Sample Program:


&FILE2.WriteLine(&Emplid); Assume Call Section and SQL Actions are allowed in one Step.
End-While; Include Update SQL in one Step and from the same Step call
the other Section which is having Delete SQL on the same
table.
&FILE1.Close();
&FILE2.Close(); Ex:
Main Section
Step1
CallSection SQL
UPDATE ABC SET SALARY = SALARY + 1000 WHERE
Local – With in the Event.
In Main Section – Step1 – SQL Action – Salary will be update
for XYZ employee and it will not Commit. Then it calls the Component - With in the Component.
Section1. Global - With in the Session.
In Section1 – Step1 – SQL Action – It deletes XYZ employee 96.A Local Variable &Local_Variable, A Component
and as there are no other Actions it will try to Commit. As Variable &Component_Variable and A Global Variable
there is an uncommitted SQL, conflict will occur. &Global_Variable Declared in AE1 – Section1 – Step1 –
PeopleCode. Can we Access all the 3 Variables in AE1 –
Since Call Section and SQL are Mutually Exclusive we have to Section1 – Step2 – PeopleCode?
write the same code in other way.
Component and Global Variables can be accessed. We can not
access Local Variable.
97.Can we Access &Component_Variable and
&Global_Variable in AE1 – Section2 – Step1 –
PeopleCode?
Yes.
98. Assume there is a Call Section Action in AE1 –
Section2 – Step1 which calls the Section1 of AE2. Can
we Access &Component_Variable and
&Global_Variable in AE2 – Section1 – Step1 –
PeopleCode?
Yes.
99. When we restart the AE program, can Component /
Global PeopleCode Variables retains their previous
values?
Yes as these variables will be saved for each Commit and
Checkpoints.
100. What’s the use of State Record?
State Record is useful to pass the values from one Section
to other.
101. How many rows can be exists in a State Record?
Only one row at a time.
Assume if DoSelect retrieves 10 rows then AE first keep all
the rows in buffer and selects the first row and inserts into
State Record. After execution of all the Subsequent Actions
then AE selects the 2nd row from buffer and inserts into
State Record and rest of process will continue and so on.
102. Which type of records AE supports as a State Record?
It can be either SQL Table or Work record.
103. Is it required to have PROCESS_INSTANCE in SQL
Table?
Yes, In case of SQL Table PROCESS_INSTANCE should be
included and should be Key Field which is useful for Restart
Facility.
104. Is it required to have a PROCESS_INSTANCE as a KEY
Filed in SQL Table?
Not mandatory, but PeopleSoft recommends to have
PROCESS_INSTANCE with Key.
105. Is it required to have a PROCESS_INSTANCE in Work
Record?
No, In case of Work Record, PROCESS_INSTANCE is not a
mandatory Field.
106. Is it required to Build the State Record?
If the State Record is SQL Table then Build is required, In
case of Work records build is not required.
107. Where can we assign a State Record?
We can specify the State Record in the Application Engine
Properties – State Record Tab.
108. Is it mandatory to have a State Record in every AE
Program?
No, State Record is not mandatory for all AE Programs.
When we want to pass the run control values or any
intermediate values to other Sections then State Record is
required.
109. How many State Records can be defined in an
Application Engine Program?
We can have N Number of State Records but one should be
default. If AE is having one State Record, by default it will
become default State Record.
110. Which PeopleTools table stores the State Records
information?
PSAEAPPLSTATE.
111. What is the name of the State Record before to
version 8?
Cache Record.
112. What’s the naming convention of State Record? WHERE PROCESS_INSTANCE = %ProcessInstance
AND OPRID = %OperatorId
It should be end with _AET. AND RUN_CNTL_ID = %RunControl
113. What happens if the name of Stare Record not ending 123. When data will be cleared from PS_AERUNCONTROL
with _AET? Record?
Record will not be considered as State Record, So it will not When AE program ran to success, data will be cleared from
be available when we click on Get List while assigning the AERUNCONTROL for that particular Process Instance.
State Record. 124. When data will be cleared from State Record?
114. What are the Common Meta SQLs used with State When AE program ran to success, data will be cleared from
Record? State Record for that particular Process Instance.
%Select, %SelectInit, %Bind. 125. Can we insert PROCESS_INSTANCE value into State
115. How many ways we can insert data into State Record? Like %Select(PROCESS_INSTANCE) Select
Record? PROCESS_INSTANCE from PS_AERUNCONTROL
In Do Actions %Select. No, AE will throw an Error Message stating that
In PeopleCode Action RecorName.FieldName.Value = ‘ABC’ ‘PROCESS_INSTANCE is a reserved state field that cannot
116. How to insert data into Default State Record? be modified’.
%Select or %Select (Default Record Name. Field Name) 126. Assume a State Record is having
PROCESS_INSTANCE, OPRID, RUN_CNTL_ID, and
If Record Name is mentioned then value will be inserted into
EMPLID. What would be the output to the below
mentioned record otherwise it will insert into Default State
Program?
Record.
117. How to insert data into Non Default State Record? MAIN
Step1
%Select (Non Default Record Name. Field Name)
DoSelect
118. Assume 2 State Records are assigned to an AE. %Select (EMPLID)
C_TEST1_AET which is SQL Table and Default State SELECT EMPLID FROM PS_JOB WHERE EMPLID = ‘AAA’
Record. And C_TEST2_AET which is Work Record. PeopleCode
What would be the output for the below Program? MessageBox(0, "", 0, 0, "Process Instance: " |
C_RNCTLDATA_AET.PROCESS_INSTANCE.Value);
MessageBox(0, "", 0, 0, "Operator ID: " |
C_RNCTLDATA_AET.OPRID.Value);
MessageBox(0, "", 0, 0, "Run Control ID: " |
C_RNCTLDATA_AET.RUN_CNTL_ID.Value);
MessageBox(0, "", 0, 0, "Employee ID: " |
C_RNCTLDATA_AET.EMPLID.Value);
PROCESS_INSTANCE, OPRID, RUN_CNTL_ID values will be
populated automatically into State Record. We need not to
explicitly insert into State Record. So Output would be
Process Instance: 123
Operator ID: CNU
Run Control ID: 234
Employee ID: AAA
127. How many Long Character fields can be allowed per
each State Record?
Only 1.
128. Can we write PeopleCode on State Record Events?
No PeopleCode fires on an Application Engine State Record.
And No Validation of Translate Values or Prompt Tables are
done.
129. Can we use the State Record as a Component Search
Record?
Yes, We can. It doesn’t make any difference.
130. Query to get the list of State Records which are not
having PROCESS_INSTANCE.
SELECT DISTINCT A.RECNAME
FROM PSRECFIELD A
WHERE A.RECNAME LIKE '%_AET'
AND NOT EXISTS (SELECT 'X'
FROM PSRECFIELD B
WHERE B.RECNAME = A.RECNAME
AND B.FIELDNAME = 'PROCESS_INSTANCE')
131. Query to find out list of AEs which are having more
than one State Record.
SELECT AE_APPLID, COUNT(*)
FROM PSAEAPPLSTATE
GROUP BY AE_APPLID HAVING COUNT(*) > 1
132. Can you give a scenario where we use more than one
State Record?
Assume your AE program is generating Multiple Interface
files – CSV, one for Full Time and the other for Part Time
employees. In this scenario AE can have 2 State Records
one for Full Time with Full time employee Details and other
for Part Time with Part Time employee related information.
133. Can State Record values shared with 2 different AE in
parallel run?
No, as each Program run will have unique Process Instance.
State Record can be sharable but not the values.
134. Can Multiple Programs access the same State
Record?
Yes, as there will be unique Process Instance for each
Program run, unique row of data will be maintained for
each run in the same State Record.
135. Can we assign values to AE2 State Record from AE1?
Yes, AE1 should have all the State Records of AE2 and AE2
doesn’t require having State Records of AE1.
In AE1, simply use %Select or %SelectInit and insert
values into AE2 State Record.
136. Assume AE1 is having a State Record STATE1_AET
And AE2 is not having any State Record.
STATE1_AET.EMPLID.VALUE = 'ABCDEF' assigned in
AE1 - Main Section – Step1 – PeopleCode.
And there is a Call Section which calls AE2 - Main
Section.
Can we access STATE1_AET.EMPLID.VALUE in AE2 –
Main Section – Step1 - PeopleCode?
 Yes, We can Access. AE2 doesn’t require having
STATE1_AET. AE1 State Records can be access by AE2.
 When you call a program from another program, the called
program’s default State Record becomes active until
processing returns to the initial program.
137. Assume AE1 is not having any State Record but there
is a Call Section which calls AE2 – Main Section. And
AE2 is having a State Record STATE1_AET.
Can we assign a value to STATE1_AET.EMPLID in
AE1?
No, AE1 should have State Record STATE1_AET.

Temporary Table
138. Which PeopleTools table stores the Temporary Table
information?
PSAEAPPLTEMPTBL
139. What is the significance of using Temporary Table?
To avoid the dead locks.
Application Engine programs run in batch mode, So
multiple instances of the same program often execute in
parallel processing. When this happens, there is a
significant risk of data conflict and deadlocks on tables. To
avoid this PeopleSoft PeopleTools has provided a feature
that enables you to dedicate specific instances of temporary
tables for each program run.
140. What is the use of Temporary Table?
Temporary table stores intermediate results during a
program run.
141. We can store the temporary data in SQL Table or
Temporary Table. Is there any significant use of
Temporary Table then?
Table instances can be maintained in Temporary tables.
142. What is the use of %Table?
Returns the SQL Table Name.
Ex: %Table(JOB) returns PS_JOB.
If the Table is a Temporary table and the current process is
having Temporary Table Instances then %Table returns
PS_JOBnn Where nn is the Instance Number.
143. What is the use of %TruncateTable?
Deletes the data from the Temporary Table.
144. How many maximum instances can be created for a
Temporary table?
99.
145. What is the instances naming convention for Online
and Batch run?
_TMP is for Online Process and _TAO is for Batch Process.
146. What is the required field in Temporary Table?
PROCESS_INSTANCE and it should be Key field.
147. What is the limitation to the Temporary Table Name?
13 characters.
148. What is the use of ‘Instance Count’ option in AE
Properties - Temporary Table Tab?
 No of Physical Tables will be created based on this
Then 169. Code to run AE thru CallAppEngine when there is No
 Make the Section as Dynamic by selecting Dynamic Check State Record assigned?
Box. CallAppEngine("C_CALLAPPENG");
162. Sample Program for Dynamic Call Section Concept. No Need to pass State Record name.
MAIN 170. What are the limitations to use CallAppEngine
Step1 Function?
DoSelect Use this function in SavePreChange, SavePostChange,
%Select(AE_APPLID, AE_SECTIONID)
Workflow, and Field Change.
Select AE_APPLID, AE_SECTIONID FROM PS_ABC
171. What happens whether CallAppEngine Commits or
OR Rollbacks when there is an error.
If CallAppEngine results in a failure, all database updates
PeopleCode will be rolled back as No commits occur during the entire
MessageBox(0, "", 0, 0, "Main Section - Step1 - program run.
PeopleCode"); 172. Is it required to Create a Process Definition to run AE
If %OperatorId = "PS" Then thru CallAppEngine Function?
C_DYNAMIC_AET.AE_APPLID.Value = "C_DYNAMIC1";
No, Not require.
C_DYNAMIC_AET.AE_SECTION.Value = "Insert";
Else 173. How can we Trace When we run the AE thru
C_DYNAMIC_AET.AE_APPLID.Value = "C_DYNAMIC1"; CallAppEngine PeopleCode Function?
C_DYNAMIC_AET.AE_SECTION.Value = "Delete";
End-If;
Call Section Process Scheduler
Select Dynamic Check Box 174. What is the procedure to run AE thru Process
Delete Section Scheduler?
Step1
 Create Application Engine thru Application Designer.
PeopleCode
MessageBox(0, "", 0, 0, "Delete Section - Step1 -  Create a New Process Definition in Process Scheduler.
PeopleCode");  Got to Home – PeopleTools – Process Scheduler – Process.
Insert Section  Click on Add a New Value.
Step1  Select Application Engine as Process Type.
PeopleCode
 Specify the Exact AE Program Name as Process Name.
MessageBox(0, "", 0, 0, "Insert Section - Step1 -
PeopleCode");  Click on Add.
 Click on Process Definition Tab; Specify Component Name
and Process Groups.
 If trace is required - Click on Override Options, select
Execution of AE Parameter List type as Override and Specify the Trace option
like –Trace7.
163. How many ways we can run AE Program?
 Click on Save.
Online Execution
 Go to the Specified Component, Click on Run and you will
1. Thru PeopleCode – CallAppEngine()
find the Newly Attached Process. Select and Click on OK
Batch Execution
2. Thru Process Scheduler. AE Request Page
3. Thru AE Request Page. 175. What is the procedure to run AE thru AE Request
Manual Execution Page?
4. Thru Run Button in App Designer.  Create Application Engine thru Application Designer.
5. Thru Command Line.  Create a New Process in Process Scheduler.
6. Thru Push Button.  Got to Home – PeopleTools – Process Scheduler – Process.
164. How to call Application Engine form another  Click on Add a New Value.
Application Engine?  Select Application Engine as Process Type.
 Thru Call Section Action.  Specify the Exact AE Program Name as Process Name.
165. How to run Application Engine thru PeopleCode?  Click on Add.
 CallAppEngine.  Click on Process Definition Tab; Specify Component Name as
 ScheduleProcess. AE_REQUEST and Process Groups.
 CreateProcessRequest() / Schedule()  If trace is required - Click on Override Options, select
Parameter List type as Override and Specify the Trace option
CallAppEngine like –Trace7.
166. What is the procedure to run AE thru CallAppEngine?  Click on Save.
 Get the State Record with CreateRecord Function.  Go to PeopleTools, Application Engine, Request AE.
 Assign State Record Values.  Click on Add a New Value.
 Call the AE thru CallAppEngine Function By Specifying AE  Specify the User ID, Run Control ID, Program Name. Then
Name and State Record Name. Click on ADD.
167. What’s the code to run AE thru CallAppEngine?  Specify the required values like State Record name, Bind
&Record1 = CreateRecord(Record.C_CALAPPNG1_AET); Variables. Then Click on Run and you will find the Process.
Select and Click on OK.
&Record1.EMPLID.Value = “A55849”
176. What makes the difference when we run AE thru
CallAppEngine("C_CALLAPPENG", &Record1);
Process Scheduler and AE Request Page?
168. Code to run AE thru CallAppEngine when there is
Thru AE Request Page We can specify additional Values and
more than one State Record?
Parameters.
&Record1 = CreateRecord(Record.C_CALAPPNG1_AET);
177. What are the tables will get populated while running
&Record2 = CreateRecord(Record.C_CALAPPNG2_AET); AE thru AE Request page.
&Record1.EMPLID.Value = “A55849” AEREQUESTTBL and AEREQUESTPARM
&Record2.DEPTID.VALUE = "1000";
CallAppEngine("C_CALLAPPENG", &Record1, &Record2); Commend Line
178. What are the commands required to run AE thru 185. Is it required to Create a Process Definition to run AE
Command Line? thru CreateProcessRequest Function?
PSAE.EXE —CT <DB_TYPE> -CD <DB_NAME> -CO <OPRID> -CP Yes, We have to create a Process Definition otherwise it will
<PASSWORD> -R <RUN_CONTROL> -AI <PROGRAM_NAME> -I throw an error stating that ‘An entry must be provided in
<PROCESS_INSTANCE> the process definition table before this process can be
C:\PT8.45\bin\server\WINX86\psae.EXE -CT MICROSFT -CS scheduled to run.’
PSNT -CD HC -CO PS -CP PS -R 123 -AI AETSTPROG -I 111 186. What are the Attributes we can specify with
179. What are the Command Line Arguments available CreateProcessRequest Function?
when we run AE with Command Line? &RQST.RunControlID = "MYRUNCONTROL_ID";
&RQST.ProcessName = "PROCESSNAME";
&RQST.RunLocation = "PSNT";
&RQST.ProcessType = "SQR";
&RQST.OutDestType = "Email";
&RQST.OutDestFormat = "PDF";
&RQST.OutDest = "User : PS,Role : PeopleSoft User";
&RQST.EmailSubject = &Subject;
&RQST.EmailText = &Text;
&RQST.EmailAttachLog = False;
187. How to Pass Run Control Input Values when we run
an AE Program thru CreateProcessRequest?

Push Button
188. Procedure to run AE thru Push Button?
Insert a Push Button in page.
Go to Push Button Properties, Select the Destination –
Process. Then Process Options will be enabled.
Select Type as Application Engine.
Select the AE name.
Navigate to the Particular Page in PIA.
Click on Push Button.

Debugging AE
189. Why debugging is required?
When we submit a program, it may run to
Success or
No Success or
Success but Output may not be what we expected or
Program may run to success but takes longer time.
Debugging is nothing but finding out the cause for a
problem.
190. How many ways we can debug an Application Engine
Program?
1. Process Monitor.
2. Interactive Debugger.
3. Thru Command Line.
4. PeopleCode Debugger.
5. Trace file.
191. What is the use of Process Monitor?
 Useful to see the Program Status whether it ran to Success
or not.
192. How to debug AE thru Interactive Debugger option?
 In Configuration Manager, Click on the Trace tab and turn
off the Statement Timings.
 Click on Profile Tab - Edit - Process Scheduler – Check
Debug check box.
 After specifying the Debug option in the Configuration
Manger, Run any program then we will see the DOS
communication window, then type ? And press ENTER.
Then it displays all the debugging commands.
(Q)uit Rollback work and end program
Commit work and end program (valid
E(X)it
between steps)
(C)ommit Commit work (valid between steps)
(B)reak Set or remove a break point
(L)ook Examine state record fields
(M)odify Change a state record field
(W)atch Set or remove a watch field
(S)tep over Execute current step or action and stop
Go inside current step or called section and
Step (I)nto
stop
Execute rest of step or called section and
193. How to debug AE thru Command Line? 8 Show fetched values
 Use –DEBUG Y at the end of the Command. 16 Show stack
 Specify the psae.EXE path and all the parameters like 64 Trace start of programs
DBName, UserID, Password, RunControlID, and 128 Trace external function calls
ProcessInstance. At the end use –DEBUG Y 256 Trace internal function calls
 C:\PT8.45\bin\server\WINX86\psae.EXE -CT MICROSFT -CS 512 Show parameter values
PSNT -CD HC -CO PS -CP PS -R 123 -AI AETSTPROG -I 111 1024 Show function return value
–DEBUG Y. 2048 Trace each statement in program(recommended)
 It displays a message “Application Engine Debugger – enter If we want to enable 1, 2,128, we can specify sum of 3 as 131.
command or type ? for help”.
194. How to debug AE thru PeopleCode Debugger option?
Open PeopleSoft Application Designer. Select Debug,
PeopleCode Debugger Mode. Restart Facility
195. Why we normally Trace the Programs? 199. About Restart Facility?
To monitor the performance of AE. When there is an Abnormal Termination or Failure of an AE,
196. What are the default options set for Trace in an AE? we can restart the request from the same point where it
By default, all Application Engine traces are turned off. got errored out i.e. the last successful Check Point.
197. What are the ways to Trace Application Engine? 200. Ways to Disable/Enable Restart facility?
a) Command line 1) Program Properties:
By using –TRACE.  In AE Program Properties – Advanced Tab – Disable
Restart Check box.
For Example:
PSAE.EXE —CT <DB_TYPE> -CD <DB_NAME> -CO <OPRID> -
2) Configuration Manager:
CP <PASSWORD> -R <RUN_CONTROL> -AI  In Configuration Manager – Profile Tab – Edit button –
<PROGRAM_NAME> -I <PROCESS_INSTANCE> -TRACE Process Scheduler Tab – Disable Restart check box.
<Value>
3) Command Line:
C:\PT8.45\bin\server\WINX86\psae.EXE -CT MICROSFT -CS
 Include the −DR Y option in the Command Line of
PSNT -CD HC -CO PS -CP PS -R 123 -AI AETSTPROG -I 111
PSAE.EXE.
-TRACE 384
201. Required steps to implement restart facility?
b) Configuration Manager.
Program level:
Set the Tracing option in Configuration Manager > Trace tab
> A.E Trace.  One State Record should be SQL table.
c) Process Definition.  Disable Restart should not be checked in Program Properties
and Configuration Manager.
Go to Process Scheduler – Process – Select any Process – Go
to Override Tab – Select Parameter List type as Override and Section level:
Specify the Trace option like -TRACE 7 -TOOLSTRACEPC  The options for Section Type should be Prepare Only and
3980 –TOOLSTRACESQL 135. Critical Updates.
d) Server configuration files.  If the Section is only preparing data like selecting it
We can enable the trace in the configuration files of populating temporary tables or updating temporary tables
Application Server and the Process Scheduler Server then the Section type should be Prepare Only.
198. What are the Trace option parameters available in  If the Section is updating permanent Application Tables in the
PeopleSoft? database Section type should be Critical Updates.
SQL Trace: Step Level:
 We need to have some conditions that reduce the answer set
1 SQL statements
returned by the DoSelect
2 SQL statement variables
4 SQL connect, disconnect, commit and rollback  Add and Order By clause:
8 Row Fetch (indicates that it occurred, not data) %Select FIELD1
16 All other API calls except SSB SELECT FIELD1
Set Select Buffers (identifies the attributes of FROM PS_SOME_RECORD
32 WHERE FIELD1>%BIND(FIELD1)
columns to be selected).
64 Database API specific calls ORDER BY FIELD1
128 COBOL statement timings ADD A SWITCH TO THE SELECTED TABLE
256 Sybase Bind information SELECT COLUMN1, COLUMN2
512 Sybase Fetch information FROM PS_TABLE1
WHERE PROCESSING_SWITCH = 'N'
1024 SQL Informational Trace
Delete processed rows.
PeopleCode Trace:
202. How many ways we can Restart the AE Program?
1 Trace STEP execution sequence to AET file
 From the Command Line.
2 Trace Application SQL statements to AET file
4 Trace Dedicated Temp Table Allocation to AET file This Option normally useful to the developers not for the
end users.
8 not yet allocated
16 not yet allocated C:\PT8.45\bin\server\WINX86\psae.EXE -CT <DBType> -CS
<ServerName> -CD <DBName> -CO <OPRID> -CP
32 not yet allocated
<Password> -R <RncntlID> -AI <AE Name> -I <Process
64 not yet allocated
Instance>
128 Timings Report to AET file
 From a Process Request page.
Method/Built-In detail instead of summary in AET
256 Open Process Scheduler by selecting PeopleTools, Process
Timings Report
Scheduler, and System Process Requests.
512 not yet allocated
1024 Timings Report to tables Locate the Run Control ID of the program you need to
restart.
2048 DB optimizer trace to file
4096 DB optimizer trace to tables To display the details of the failed process, click the Process
Detail link.
AE Trace:
On the Process Request Details page, select Restart
1 Trace Evaluator instructions(not recommended) Request, and click OK.
2 List Evaluator program(not recommended) 203. Which Table Stores the last committed information?
4 Show assignments to variables
PS_AERUNCONTROL Table. Write the below SQL in SQL Action.
204. What should we do when we wanted to Restart AE
from beginning? SELECT
Delete data from PS_AERUNCONTROL table and State T1.FIELD1, T1.FIELD2, T1.FIELD3, T2.FIELD4, T2.FIELD5
Record. FROM PS_TABLE1 T1, PS_TABLE T2
DELETE FROM PS_AERUNCONTROL WHERE %JOIN(COMMON_KEYS, TABLE1 T1, TABLE2 T2)
WHERE OPRID = OPRID Above code Generates SQL by joining TABLE1 and TABLE2
AND RUN_CNTL_ID = RunControlID based on their Common Keys. So the SQL would be
205. What is the by default option set for AE Restart? SELECT
By Default AE programs are Restartable. T1.FIELD1, T1.FIELD2, T1.FIELD3, T2.FIELD4, T2.FIELD5
FROM PS_TABLE1 T1, PS_TABLE T2
WHERE T1.FIELD1 = T2.FEILD1
AND T1.FIELD2 = T2.FIELD2
Meta SQLs
206. About Meta SQLs? %Join (COMMON_FIELDS, TABLE1 T1, and TABLE2 T2)
Generates SQL based on their Common Fields.
Meta SQLs are the SQL Statements which will be
SELECT
automatically changed based on the RDBMS.
T1.FIELD1, T1.FIELD2, T1.FIELD3, T2.FIELD4, T2.FIELD5
For Example:
FROM PS_TABLE1 T1, PS_TABLE T2
A Meta SQL
WHERE T1.FIELD1 = T2.FEILD1
SELECT FIELD1 %Concat FIELD2 From PS_ABC
AND T1.FIELD2 = T2.FIELD2
which gets automatically Converts to AND T1.FIELD3 = T2.FIELD3
SELECT FIELD1 + FIELD2 when the database is SQL Server. AND T1.FIELD4 = T2.FIELD4
SELECT FIELD1 || FIELD2 when the database is DB2.
SELECT FIELD1 || FIELD2 when the database is Oracle. We can also specify the override field list to exclude the fields
207. Why Meta SQLs are required? from dynamic where clause.
As each RDBS has its own syntax, in order to have a %Join(COMMON_FIELDS, TABLE1 T1, TABLE2 T2, T1.FIELD2)
common code which will run across the databases, Meta AND T1.FIELD2 = ‘ABC’
SQLs concept has come up. Dynamic where clause would be
208. What is the difference between SQLs and Meta SQLs? SELECT
SQLS are Platform Dependent where as Meta SQLs are T1.FIELD1, T1.FIELD2, T1.FIELD3, T2.FIELD4, T2.FIELD5
Platform Independent. FROM PS_TABLE1 T1, PS_TABLE T2
209. %Select – Inserts data in to State Record. WHERE T1.FIELD1 = T2.FEILD1
210. %SelectInit – Inserts the data into State Record. And AND T1.FIELD3 = T2.FIELD3
reinitializes the buffer value. AND T1.FIELD4 = T2.FIELD4
211. %Bind – Retrieve data from the State Record. AND T1.FIELD2 = ‘ABC’

212. %Date – Returns the Current Server Date. 228. %InsertSelect – Generates an Insert Statement with
Select. It will not generate Where Clause.
213. %DateIn – Use %DateIn when there is comparison in the
WHERE clause. It converts the date into PeopleSoft Date 229. %Mode – Gives the user action Mode, like add/update…
format. 230. %Execute – Used to execute Oracle PL/SQL Statements.
214. %DateOut – Use %DateOut while Selecting Date in Select Database: SQL Server, Write the below code in SQL Action.
Clause. It converts the Date into PeopleSoft Date format. %Execute(/)
215. %CurrentDateIn – Returns Current System Date used in DECLARE @A SMALLINT
WHERE Clause. SELECT @A = 1 WHILE @A <= 5
BEGIN
216. %CurrentDateOut – Returns Current System Date used INSERT INTO ABC VALUES (@A)
in SELECT Clause. SELECT @A = @A + 1
217. %Concat – Concatenates two fields. END
/
%Select(COMPANY, COUNTRY, DESCR)
SELECT COMPANY, COUNTRY, COMPANY %Concat COUNTRY
FROM PS_INSTALLATION

It returns AE Errors
Company: GBI Country: USA Description: GBIUSA
 If there is no State Record Mentioned.
218. %Table – Returns the SQL Table Name. No default State Record exists for program.
Ex: %Table(JOB) returns PS_JOB.  When there is a DoSelect Action with no SQL inside.
If the Table is Temporary table and the current process is Application error: no SQL statement defined for DoSelect
having Temporary Table instances then it returns action.
PS_JOBnn Where nn is the Instance Number.  When there is a SQL Action with no SQL inside.
219. %TruncateTable – Deletes the data from Temporary Application error: no SQL statement defined for SQL action.
Table.
 When we insert 5 digits to a length of 4 digits field.
220. %AeProgram – Returns a currently executing Application
Engine Program Name. Arithmetic overflow error converting numeric to data type
numeric.
221. %AeSection – Returns a currently executing Application
Engine Section Name. Numeric value out of range.
222. %AeStep – Returns a currently executing Application  In Call Section, if we not specifying Section name.
Engine Step Name. Error retrieving Application Engine <AE Name>. Component:
223. %AsOfDate – Returns As Of Date. Section.
224. %ProcessInstance – Returns Process Instance.
225. %RunControl – Returns Run Control ID.
226. %SQL – Runs the predefined SQL object. Abends
227. %Join – Generates Where clause dynamically by joining
231. About Abends?
the tables.
 Nothing but an abnormal end of the Program.
 2 types of Abends are there, Controlled and Uncontrolled.  DoSelect will fetch 22222, 33333, and 55555 employees.
 A Controlled Abends means that Application Engine exits  In First Loop - Inserts 22222 into State Record.
"gracefully" because of a calculated error condition.  Executes the SQL Action which updates the Salary with 10%
 Some examples of Controlled Abends are: hike for 22222 Employee.
Step Level On Error = Abort.  In Second Loop - Inserts 33333 into State Record and then
PeopleCode Action On Return = Abort. updates the Salary.
SQL Action No Rows = Abort.  In Third Loop – Inserts 55555 into State Record and then
 In these situations (when Application Engine is in control) the Updates the Salary.
Run Status in Process Monitor reads "Error".  Then comes out from the DoSelect.
 An "uncontrolled" Abends occurs in situations where there is a  As the program in Row by Row Processing, it goes to the
memory violation or a user kills a process. In these cases, the database 3 times and updates the Salary.
Run Status in Process Monitor shows "Processing".

Set Processing
Online processing 238. What is Set Processing?
232. About Online Processing? Set processing is nothing but processing set of rows at one
 Online Processing can be done thru PeopleCode – time rather than processing each row individually.
CallAppEngine 239. Sample Program for Set Processing?
 Program runs quickly, synchronously, and at random times.  With Set Processing, AE Program Structure would be
 Synchronous means Subsequent process will waits for the MAIN
result. Step1
 No commits are issued until the program completes. SQL
UPDATE ABC SET SALARY = (0.10*SALARY) +
 Online Programs are not Restartable.
SALARY WHERE DEPTID = ‘BBB’;
 Online Programs requires the User involvement.
 SQL Action will be executed which updates the Salary for all
 Can not Support Parallel Run. the 3 employees at a time.
240. Which Process is efficient – Row by Row or Set
Processing?
Batch Processing Set Processing.
241. What are the SQL Commands mostly useful to
233. About Batch Processing? implement Set Processing?
 Batch Processing can be done thru Process Scheduler or A.E Group By and Having Clauses.
Request Page. Complex Joins.
 Program run for longer time, asynchronously, and at Sub Queries.
scheduled times.
 Asynchronous run means program which runs independently.
 Commit Statements are allowed.
 Batch Programs can be Restartable. File Layout
 Batch Programs runs without the User involvement. 242.
 Supports Parallel Run.

Parallel Processing XL to CI
234. What is Parallel Processing? 243. What is the tool used by PeopleSoft before to XL to CI
Process of running multiple instances of the same program utility?
simultaneously. Import Manager.
235. Sample Program for Parallel Processing? 244. What is the use of XL to CI Utility?
Useful to upload the data into PeopleSoft database from
Excel Spreadsheet.
245. What’s the default path of ExcelToCI.xls file?
Row-by-row processing <PS_HOME>\excel directory.
246. How many Columns and Rows Can XL to CI utility
236. What is Row By Row Processing? Supports?
 A Single row will be fetched and rest of actions will be 252 Columns and 65,000 Rows.
performed and then next row will be fetched and rest of 247. Is database connectivity required?
actions will be performed and next and so on..
No, As Excel to CI uses HTTP and SOAP Messaging.
 Program will fetch the data Row by Row from database and
248. What are required setting in order to use XL to CI?
performs the Subsequent Actions.
 Macros need to set to Low or Medium.
237. Sample Program for Row By Row Processing?
 User should have the access to ExcelToCI Code via
 Assume a table ABC is having EMPLID, DEPTID, and SALARY.
Permission Lists.
 If we wanted to give 10% hike to the employees who are
249. What are the Tabs Available in ExcelToCI.xls?
belongs to ‘BBB’ Department.
Coversheet, Connect Information, Template, Data Input,
Staging & Submission.

Component Interface
250. What Is Component Interface?
CI is a PeopleTools Object provides the synchronous Access
to the Components.
251. Once Component Interface created, do we need to
set any Security or directly can we run the CI?
Yes we need to set the permissions.
Open the Permission List, go to Component Interface Tab,
Add newly created CI, and give the permission to the
Standard Methods – Get, Create, Save, Cancel, Find.
252. What are the attributes of the Component Interface?
1. Component Interface Name.
2. Keys.
3. Properties and Collections (Fields and Records).
4. Methods.
253. What are the Keys available?
1.Get Keys: Nothing but the Search Key fields of Search
Record of the Component. We can’t change these Keys.
2.Create Keys: Nothing but the Search Key and Alternate
Search Key fields of Search Record of the Component. We
can remove any of Alternate Search keys that we don’t
want to make available for Searching.
3. Find Keys: These Keys will be created automatically when
the Add Action is allowed for the component. We can’t
change these Keys.
254. What is Property?
Level 0 fields of a Component are nothing but the
Properties.
255. What are the Properties of Component Interface?
1. Standard properties
2. User defined properties
256. What are the Standard Properties?
1. InteractiveMode
2. GetHistoryItems
3. EditHistoryItems
257. How do you login in Correction Mode in CI?
GetHistoryItems and EditHistoryItems should be True.
258. How do you login in Display All Mode in CI?
GetHistoryItems should be True.
259. Get History Items and Edit History items property to
should be set to true.
260. What is a Method?
Performs a very specific function on a Component Interface
at run-time.
261. How many Methods are available?
1. Standard methods
2. User defined methods
262. What are the Standard Methods?
Cancel, Create, Find, Get, Save.
263. About User Defined Methods?
User-defined methods are created in PeopleSoft Application
Designer to provide added functionality to the Component
Interface.
264. How to call the Component Interface?
GetCompIntfc(GetCompIntfc.<CI Name>)
265. What is Item?
266. What is InsertItem?
267. What is ItemNum?
268. What is Session Object?
269.
270.

Do Reach me @
srinivas.shamanthula@yahoo.com
if something needs to be
Corrected or Added.

You might also like