Sie sind auf Seite 1von 68

JAN

25
Application Engine


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 in 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 required not be 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.
6.What is the syntax for CallAppEngine?
CallAppEngine (applid [, state record]);
7.What are the 3 trace parameters you can pass to your psae.exe?
- TRACE
- TOOLSTRACESQL
- TOOLSTRACEPC
8.Which Trace option is the best place to start for general performance information?
- TRACE 384 mostly used trace value.
9.What is the difference between a Trace value and Trace parameters?
A Trace parameter determines which type of trace is turned on.
A Trace value determines what type of data is recorded in your trace files (s).

Where does the trace file is written to?
The trace file is written to the server directory when youve specified the trace on the client. If
the client has %Temp% set to a drive or directory that does not exist on the server, PeopleSoft
Application Engine does not generate a trace file.
For an Application Engine program running on a server, PeopleTools writes the generic
PeopleTools trace for SQL and PeopleCode trace files to the same directories as the AET traces.
The prefix of the trace file name is also the same, and the suffix is trace. On the Windows
workstation, the trace is written to the People Tools Trace File specified in the Trace
folder of PeopleSoft Configuration Manager.

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: Which is a Standard or normal 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 Extensible Stylesheet Language Transformations (XSLT).
XSLT Transform programs.

11.How is PSDAEMON process runed?

One PSDAEMON process can run for each row in the PS_SERVERDEFN table. The
PS_SERVERDEFN.DAEMONENABLED field must be set to 1.



12.Does system automatically modifies all static references in other programs to the
renamed program?
The system automatically modifies all static references in other programs to the renamed
program. For instance, if you call the renamed program from another Application Engine
program, the Call Section action in the calling program is modified to reflect the new program
name. All sections and steps are saved under the new name. Only one occurrence of a program
name can exist for a given database.
13.What is the function that can have PeopleSoft Application Engine recompile a reused
statement?

Using the %Clear Cursor function.

14.What happens if the renamed program is called in a dynamic Do action?

The reference is not automatically modified. You should also manually check and modify any
embedded references to the new program name in CallAppEngine or other PeopleCode
functions.
15.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
n If the section is preparing data i,e select data, Populating temporary tables, or updating
temporary tables then the section should be prepare only.
n 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 "Restartable"). with select/Fetch,
all commits inside the loop are ignored, including the commit frequency if it's set.
16.Why Sections are reordered alphabetically by name?
Sections are always reordered alphabetically by name at save time to make it easier to locate a
given section. However, order of execution is dependent on internal call section references, and
is therefore independent of the order that sections are inserted and displayed.
17.What does On Error property do?
The On Error property does not apply to compile errors (for example, specifying erroneous SQL
statements). It checks only for execution-type errors. If your program has a syntax error, the
program terminates.
18.What is to be intend to include multiple SQL statements within a single action?

Use the meta-SQL construct %EXECUTE. The previous sample SQL statement sample contains
bind variables from a previous Application Engine action.
Entries in the AEREQUESTTBL table do not have any effect on Application Engine programs
called from PeopleCode using the CallAppEngine function.

19.What are the Tables Used in the Process Request Page?

The Application Engine process request page inserts values into the following tables:
AEREQUESTTBL.
Contains all of the values that appear on the page except those in the Parameters group.
AEREQUESTPARM.
Includes only initial state record values specified in the Parameters group, if needed.

20.How do you invoke an Application Engine program through the command line?
Restarting.
When a program abends, a system administrator might restart the program using the command
line. If needed, you can locate all of the specific program and process information from Process
Monitor on the Process Request Detail dialog box. Normally, users (or system administrators)
perform a restart from Process Monitor.
Development or Testing.
Many developers include the command line in a batch file to launch a program they are
developing or testing. This way, they can quickly execute the batch file as needed. This also
enables separation of development of the application program from its associated pages.
Debugging.
To debug a program running on the server, you can sign into the server (using telnet, for
example) and invoke the program from the command line.

21.What are the Bulk Inserts ignored?
Bulk Insert is also ignored when all three of the following conditions are true: the database
platform is Oracle, the record contains and EFFDT field (effective date), and the record contains
a mobile trigger. This is required because an Oracle database does not allow the reading of
mutating tables in a row trigger.

22.What is another way to populate PS_MESSAGE_LOG instead of Log Message action?
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.
23.What happens is if an Application Engine program is not set up for restartability?
When an Application Engine program is not set up for restartability, then commits are not
controlled, monitored, or restricted by PeopleSoft Application Engine. When Restart is disabled,
commits are controlled by the program.
PeopleSoft Application Engine does not commit a step containing a Do Select action with the
Select/Fetch option enabled until the entire step completes successfully, regardless of the other
options you have selected.
24.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.
25.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, its 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.


26.What is Prerequisite for the Temporary record?
1) Should have process Instance as key
2) Name should end with _TAO
27.What is the difference between Temp Table instances (Online) and Temp Table
Instances (Total)?
28.Different types of Temporary tables?
- Dedicated
- Un Dedicated (Shared)
29.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.
(You can dynamically modify the state record run application engine step by step
People Code Debugger for the Application Engine.)
AE Trace files: - AE__.AET
Without the process instance: - AE__.AET
30.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
-
31.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).
32.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, If not Re-startable on Program completion.
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.
33.What are the important steps for implementing the parallel processing?
1. Define you Temporary Tables.
2. Set the Temporary Tables Online pool.
3. Assign Temporary Tables to your Application Engine program in it program.
4. Set Temporary Table Batch Pool Instance count in the AE.
5. Build / Rebuild your Temporary Table record.
6. 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.
34.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
doesnt 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.
How can you divide the data to be processed by different instance of the program to perform
parallel program?
Run control parameter 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.
35.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.
36.Which actions are mutually exclusive and why they are mutually exclusive?
Sql and call Section.

37.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 doesnt 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.
38.What are different types Do Select?
1) Select/Fetch
2) Reselect
3) Restartable
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.


39.What is the difference between the %SELECT and %SELECTINIT meta sql functions?

Ans %select : if any values have not selected then previous value will be there
%selectinit : if any values have not selected then previous value will reinitilate to null

39.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 dont make rollback in the
database.

39.What is the Mandatory property of App.engine?
Main-->Step-->Action
Is the Mandatory property of App.engine
Main is the required section in Application Engine.

2. There can be multiple steps in single application engine but atleast one step should be part of
AE.

3. Similarly you can have multiple actions in AE but you should have minimum 1 action part of
step.

4. Save as AE

40.What is the use of temporary records and state record in application engine?
Temp Tables:
They are used to store the immediate values during the processing of the AE.
They help in batch processing by creating multiple instances and there by facilitating parallel
processing.
If used properly they can greatly improve the performance.

State Records:
They are used to pass on values from one section/step/prog to the other.
There can be a max of 200 state records that can be used in a single AE but only one of them can
be default. state record name must end with _AET.

41.What are the Functions to call an AE? Syntax for CallAppEngine?
CallAppEngine
GetAESection
Commitwork
CallAppEngine (applid [, statereclist, processinstance]);

42.Does PeopleSoft A.E write the timings trace?
PeopleSoft A E does not write the timings trace to a table for programs invoked by the
CallAppEngine People Code function.

43.While your COBOL program runs, can it access and return values to the state record?
Yes.

44.What is the difference between dowhen and doselect?
DoSelect: here we don't need to increase the counter. Pointer to the next row in the selected data
will be moved automatically.
DoWhen: Here we need to write the select query to skip the processed row.

45.What is the difference in using SQL directly and calling SQL from PeopleCode in
Application Engine?
If you use SQL directly then it will go to database directly to fetch rows of data. But if u write
SQL'S in PeopleCode den the trip will be from application server to database because
PeopleCode resides in app server.

One should avoid writing SQL'S in App engine PeopleCode as it would degrade the
performance.
46.How many types of ways you can run an Application Engine program?
1. Running from Application Designer.
2. By calling People Code function.
3. Running from DOS Environment (Debugging).
4. Running from Application Engine People Tool.
5. Running from People soft Application.
47.What is a state record?
State Record is used to pass the values from sections to sections and actions to actions. State
record is not a temporary record, it can be Sqlrecord or derived work record. Mainly sql record is
used for restart of the application engine program. It should have naming convention of _AET.
State record is a method by which u pass the values to u r application engine program.

48.Why cant the SQL and call Section Actions be present simultaneously in a single step?
Call section and SQL actions are mutually exclusive so they cannot be called at a time. There is
chance to get into an infinite loop if they are appeared in the same step.
49.How to test an application engine program in 8.8?
One can test Application in two ways:
1. Running Application engine from 2-Tier
2. Running Application engine from 4-Tier.
1. Running Application Engine from 2-Tier: Open Application Designer Then open desired
Application engine. Then on top middle tool bar you can see 'Run Programm button' click on to
that button give vales to parameter like Process Instance Run Cntrl id etc and click. this will run
application engine and genreate a trace file to you local system. After complition of Application
engine you can see if you got desired results or not.
2. Running Application engine from 4-Tier: Open 4-Tier link Go to peopleTools-> Process
Schedular -> Process Add you Application engine process here in 'Process Defination Options'
give 'PRCSMULTI' in COMPONENT and 'TLSALL' in Process Group and then Save the page.
After defining Application engine Go to peopleTools-> Process Schedular -> System Process
Request then add a RUN CONTROL ID After adding run control id click on the RUN button on
the page this will lead you to page where all the process will be listed Select you process name
(Application engine Name) and clik on ok. This will run you Application engine.
50.What is the APP engine event in PeopleCode?
Application engine PeopleCode event is On Execute.
51.How do you debug your AE?
Go to configuration manager of 2 tier (App Designer). Then navigate thru Profile > Edit >
Process Scheduler > Application Engine check the Debug option.
2. Open the App Engine program needs to debug and click the traffic light run program button.
3. Enter the run control id & debug the AE.

52.Differences between State and temporary records?
1. State record at any point of time has only single line information as it's driven by the
Process_Instance as key field. While temp tablecan have multiple rows.
2. State record had only single instance while the temp table can have maximum of 99 instance.
3. State record is used for restart logic.
4. State record can be used for dynamically calling AE section by adding AE_SECTION
AE_APPLID as fields. Temp table can not be used.

53.Why temporary records are needed?
Defines the record definition as a temporary table. Temporary images of the table can
be created specified by the PeopleTools Options Page. Temporary tables are used
for running Application Engine batch processes. Temporary tables can store specific data to
update without risking your main application table.

54.What are the difference between AE and SQR?
1. AE is very systematic as it is structured as Section step and Action. While SQR is not
systematic.
2. AE flow is easy to read and understand while SQR is not that easy.
3. AE is easy to debug as you can do line by line debugging. With SQR its not easily possible.
4. By using SQR you can create and maintain different reports which are not possible in AE's.

55.Difference between sql statements and metasql statements?
SQL - INSERT UPDATE CREATE DELETE
METASQL - BIND EXECUTE EDITS SELECT SELECTINIT SQL TABLE TRUNCATE
TABLE UPDATESTAS.
SQL statements:The SQl statements are used to fetch/retrieve update insert delete data from the
database. In PeopleSoft we use the sql stmts using sqlexec or createsql.
Differnet sql statements are: Select Insert Update Delete.
Meta Sqls: Different RDBMS have difference date and time formats. Though the component
processor takes care of the automatic conversion but at the time of using the sqlexec the
automatic conversion does not take place. So in order to understand this the meta sql concept has
come. Which we can use in diff sql stmts. for example datetimein date time currentdatetime
datetimeout etc.
dateIn: This is used in the where clause of Select and update
dateout: This is used while selecting the data.

56.Which of the following menu options allows you to modify the Last Process Instance
Number used within the system?
Process Scheduler, Use, Process Definitions
Meta-SQL where is it stored?
Temporary Tables.

57.What are the different actions in APP Engine?
In addition to the 8 listed above there is an additionally action for AE programs that are marked
as Transform programs and the action is XSLT.
To launch an Application Engine program from another App Engine program, which one of the
following is correct?
CallSection Action

58.What is an inbound and outbound Process?
Importing data by using a file layout requires the following sequence of activities:
1. Provide the import data in a properly formatted flat file.
Each record in the file must correspond to a record with the same name in the PeopleSoft
database, and its fields must have the same names and data formats as the database records
fields. Each record in the file must end with a new line character.
2. Create a file layout definition to match the record and field structure of the data.
Insert the appropriate record definitions into the file layout, then reposition the file records and
file fields to match the record and field positions in the file.
3. Preview and troubleshoot the input data format and content.
4. Generate the data import Application Engine program and PeopleCode.
5. Run the Application Engine program to import the data.
Export Data:-
To export data to a flat file, you create a file layout definition, and then write PeopleCode to
transfer the data to a file. The PeopleCode can be initiated from Application Engine or from any
event. It should populate text strings, rowset objects, or record objects, and it should apply the
WriteRecord or WriteRowset method from the File class to transfer the data to the file by using
the file layout definition to position the records and fields as required by the target application.

59.What is the maximum limitation on temporary table instances in AE?
99

60.Define physical n derived state record?
Which process is used for running AE programs, which are to be run at a frequency of less than a
day?
PSAppsrv
PSAESRV
PSDAEMON
PSQCKSRV

61.(Some scenario) Find which is not part of AE Program, Options would be
1. Action, Section, Step, Event
62.In an Application Engine Program, Maximum number of Actions in a Step?
a. 8
b. 6
c. 7 (SQL & Call Section cant be together)

In an Application Engine Program Call Section Action it is possible to leave the Program
ID with blank Value in certain cases?
a. True
b. False
Let us take a Temp Table TMP_TAO.
In People Tools options the following instance settings are done
Temp Table Instances (Total) : 5
Temp Table Instances (Online): 4
In AE1 App Engine Program the instance count to TMP_TAO is 3
In AE2 App Engine Program the instance count to TMP_TAO is 5.
63.PeopleSoft allows multiple long fields per State Record?
a. True
b. False
64.How many instances are created to TMP_TAO?
a. 8
b. 17
c. 13 (5+3+5) refer to Temporary Table in App Engine
d. 12

65.The physical, dedicated tables are locked at the time the Application Engine program is
loaded into memory?
a. True
2. False
66.State Record can be Dynamic Record?
a) True
b) False
AE does Parse SQL?
a) True
b) False
67.Report Output files are stored in
1. App Srv 2. Batch Srv 3. Web Srv 4. File Srv
68.Trace 255 command line option produces the trace file with the name?
a). PI.AET
b). PID.AET
c). PD.AET
d). None of the above

69.Which process is used for running AE programs, which are to be run at a frequency of
less than a day?
1. PSAppsrv
2. PSAESRV
3. PSDAEMON
4. PSQCKSRV
70.Which of the following are parts of an AE program? (choose 3)
a. Section
b. Procedure
c. Step
d. Function
e. Action
71.Which of the following is application for UPGConvert?
(a). Conversion of Data, consists of cobol programs
(b). Conversion of Data, consists of SQR programs
(c). Data conversion, consists of AE programs

72.Where do u write meta-SQL?
1.Dynamic View
2.Derived Work/Record
3.SQL View
4.Query View
Your Onsite DBA has called you up and told you that one of the tables PS_ABC_TAO has
grown very big in size. Based on the standard naming convention, you have determined that the
record is a temporary record since it ends with _TAO
You look into the database and decide that the data is not required any more.
You ask the DBA to delete the data in the table.
Next day you get a call from an irritated user who says that a daily process that took only 1
minute to run is taking about 2 hours today. You look into his process and find that it uses
PS_ABC_TAO as a temporary table.
73.Two Program views of AE Program?
a). Definition, Program flow
b). Definition, Program view
c). Program view, Object view
d). None of the above
In Call Section Action it is possible to leave the Program ID with blank Value in certain cases?
a) True
b) False
74.State Record can be Dynamic?
True
False
75.People Soft allows multiple long fields per State Record?
a). True
b). False
76.How many instances are created to TMP_TAO?
1. 8
2. 17
3. 13
4. 12
77.The physical, dedicated tables are locked at the time the Application Engine program is
loaded into memory?
a). True
b). False

78.To launch an Application Engine program from another App Engine program, which
one of the following is correct?
a). CallAppEngine
b). CallSection Action
c). a & b
d). None of the above

Meta-SQL where is it stored?

a) Temp Tableb) SQL Table c) Query Table d) Dynamic
79.How do you set the Debug options in AE through Web?
Other than the follwing two options:
a) Through configuaration Manager b) Through command line

80.Explain the sequential steps to dump the data from CSV file to Database tables
(Inbound), but not fetching the data Row by Row?
81.What type of situations did you used DoSelect and DoWhen
82.What is difference b/w Get Record and Create Record? And what CreateSQL will do?
83.What is the use of Getgrid function?
84.Explain about the %OperatorId
85.Is it used to restrict the access to records or fields to specific operators or not?
86.What is the use of using setid?
Passing parameters for an AE program from web.

87.How do we capture errors thrown by the system in AE.
88.Restart option if enabled how does it function in an AEprogram?

Using the restart feature enables you to perform commits more often in a program. Restart
reduces the overall impact on other users and processes while the background program is
running, because it reduces the amount of rows that are locked by the program, allowing multiple
instances of the program to run concurrently (parallel processing), which may be useful for high-
volume solutions. Restart is essential for programs that primarily do set-based processing.
With restart, if a failure occurs at any point in the process, the user can restart the program and
expect the program to behave in the following manner:
Ignore the steps that have already completed up to the last successful commit.
Begin processing at the next step after the last successful commit.
The ability for PeopleSoft Application Engine toremember completed steps depends on a record
called AERUNCONTROL, which is keyed by process instance.
When a program runs, each time PeopleSoft Application Engine issues a commit it also saves all
of the information required for a program restart in the AERUNCONTROL record.

89.What are the characteristics, if we want to disable restart?
If program has one the following characteristics, you may want to disable restart:
Its mainly row-by-row processing.
The overhead involved with PeopleSoft Application Engine performing a checkpoint during the
program run is not desirable.
The program commits after N iterations of a looping construct within a step, and the Select
statement driving the loop is composed in such a way that if the program terminated and then
started again, it would ignore transactions that were already processed in the previous program
run. In this sense, the program processes the restart internally, in that PeopleSoft Application
Engine treats each start of a program as a fresh start, instead of restarting a previous instance.
90.How do we Use Restart at the Program Level?
PeopleSoft Application Engine automatically performs all state record updates. When an
Application Engine program starts, it inserts a row in the state record for the assigned process
instance.
If the state record the program uses is a work record, no database updates can be made to the
record. Consequently, if you restart the program, you might get unexpected results, because the
memory was lost when the program terminated. In fact, the system reinitializes any state records
that are work records at each commit, to ensure consistent behavior during a normal run and a
restarted run. Therefore, you may need to make at least one of your state records a SQL table to
contain values that must be retained across commits or in case of termination.
Finally, the other consideration for programming for restart at the program level is to check both
the PeopleSoft Application Engine Program Properties dialog box and PeopleSoft Configuration
Manager to make sure that Disable Restart check box is not selected.

91.How do we Use Restart at the Section Level?
The section level property associated with restart is section type, which has the options Prepare
Only and Critical Updates.
If a section is only preparing data, as in selecting it, populating temporary tables, or updating
temporary tables, then set the section type to Prepare Only. However, if the section updates
permanent application tables in the database, set the option to Critical Updates.
During runtime, when the system arrives at the first section set to Critical Updates, it sets the
AE_CRITICAL_PHASE value in the AERUNCONTROL record to Y. Once set, the value of
AE_CRITICAL_PHASE remains Y until the program completes successfully. When the program
completes, the corresponding row in AERUNCONTROL is deleted. Therefore, a Prepare Only
section following the Critical Updates section wont reset the AE_CRITICAL_PHASE value
to N.
If your program terminates, the user can check the AE_CRITICAL_PHASE value. If its Y. the
user knows that the section that failed is critical and that the program should be restarted to
ensure data integrity. If AE_CRITICAL_PHASE is N, restarting may not be necessary; however,
as a general rule, you should restart even if AE_CRITICAL_PHASE is set to N.

92.How do we Use Restart at the Step Level?
In your programs Where clause of a Do Select action, you should include conditions that reduce
the answer set returned from the Select statement.
For example,
SELECT RECNAME, FIELDNAME
FROM PS_AE_RECFIELD
ORDER BY RECNAME, FIELDNAME
If you ran this Select statement as part of a Do Select action with Restartable selected as the Do
Select type, the system might process some of the rows twice after a restart. Also, if you have
specified Reselect, the program could execute in an infinite loop, because theres nothing to
reduce the answer set. However, if you modified the Select statement to look more like the
following, you could make it Restartable.
SELECT RECNAME, FIELDNAME
FROM PS_AE_RECFIELD
WHERE RECNAME > %Bind(RECNAME)
OR (RECNAME = %Bind(RECNAME) AND FIELDNAME > %Bind(FIELDNAME))
ORDER BY RECNAME, FIELDNAME
A Do Select action that has been coded for Restartable can be converted to Select/Fetch, but the
opposite is not true.
93.Message creation process in Peoplesoft?
94.In an AE when running in batch mode program how to share the value?
A) Using state records
95.Is Encapsulation possible in AE?
Yes
How to insert and update rows into a record using Application Engine and Component Interface?
There are many ways to Insert and Update rows into a record either using Application Engine or
Component Interface.
In Application Engine programme, using peopelecode we can create a stand-alone rowset with
the record to be updated.
Fill the rowset using rowset.fill method. Manipulate the data and use record.Save() method.
In Component Interfaces, if the record is in the C.I buffer and is populated in the buffer, the C.I
Save method will Update or Insert the data in the record.

96.What is the Mandatory property of App.engine?
1. Main is the required section in Application Engine.

2. There can be multiple steps in single application engine, but atleast one step should be part of
AE.

3. Similarly you can have multiple actions in AE but you should have minimum 1 action part of
step.

4. Save as AE
97.What is the use of temporary records and state record in application engine?
Temp Tables:
They are used to store the immediate values during the processing of the AE.
They help in batch processing by creating multiple instances and there by facilitating parallel
processing.
If used properly they can greatly improve the performance.
State Records:
They are used to pass on values from one section/step/prog to the other.
There can be a max of 200 state rec that can be used in a single AE but only one of them can be
default.state record name must end with _AET.
Scope of the state record is limited to the application engine Program only.
It can be physical or derived work record. Physical record can be used when you have a
restart logic and when you have disables the restart logic derived and work record can be used.
The naming convention is, it must end with _AET identifier and process instance should be the
one and the only key for the state record, so that application will identify the record as a state
record.

98.PeopleCode events used in AppEngine?

We can use the on-execute event. Sometimes we can use the saveprechange event also.

99.What is state record?

Ans: This is used to pass values between, Sections, Steps and Actions.
What are the meta-sqls used in state record?
Ans: %BIND, %SELECT & %SELECTINIT.
100.What type of records used in state record?
Ans: Derived/ Work Record & SQL Table.

101.What are the Doselect, Dowhile & Dountil?
Ans:

What is set processing?
Ans: Performing Data Processing as a Sets of Data and at the Database level is called Set
Processing.

102.What is restart facility? Where do you set this?
Ans: This is set at the Application Engine Advance Properties.

103.What is parellel processing?
Ans: Dividing the retrieved data to different temp tables based on some criterias.

104.How can we overcome from deadlocks in Application Engine?
Ans: locking the temp table before processing data and unlocking the temp table after
Process data.

105.How are Abnormal Terminations controlled?
A controlled abnormal termination (sometimes called an abend) means that Application Engine
exits gracefully because of a calculated error condition. Some examples of controlled abends are:
SQL errors while you have set On Error toAbort.
A PeopleCode return value, when On Return is set to Abort.
A SQL statement that affects no rows, when you have set On No Rows to Abort.
In these situations (when PeopleSoft Application Engine is in control) the Run Status field in
Process Monitor reads Error.

106.How can we Restart an Application Engine Programs?
There are two ways to restart an Application Engine program:
From the command line.
Collect the command line values associated with the failed program.
Enter the following command line syntax at the command prompt substituting
the values from the previous step.
PSAE.EXE CT DB_TYPE -CD DB_NAME -CO OPRID -CP PASSWORD -
R RUN_CONTROL -AI PROGRAM_NAME -IPROCESS_INSTANCE
From a process request page.
You can restart programs from a process request page only for those programs that run on the
server.
1. Open PeopleSoft Process Scheduler by selecting PeopleTools, Process Scheduler, System
Process Requests.
2. Locate the run control ID number of the program to restart.
3. To display the details of the failed process, click the Process Detail link.
4. On the Process Request Details page, select Restart Request, and click OK.
107.How many instances can we able to give in AE?
Ans: Maximum instances are 99.
108.Where can we set Enabling and Disabling Restart?
To disable restart, use any of these methods:
Select the Disable Restart check box on the PeopleSoft Application Engine Program Properties
dialog box.
To access program properties, select File, Definition properties, and select the Advanced tab.
Select the Disable Restart check box in the Configuration Manager profile.
To access the profile, start Configuration Manager, select the Profile tab, and
Click Edit. Then select the Process Scheduler tab.
Include the DR Y option in the command line of PSAE.EXE.
If youve disabled restart in any of these three places, restart is disabled.

109.How do we free locked temporary tables?
We free locked temporary tables using the Manage Abends page:
1. Select PeopleTools, Application Engine, Manage Abends.
2. Identify the program that has the particular temporary tables locked.
3. You can uniquely identify programs using the process instance, run control ID, program name,
user ID, and run date and time columns.
4. Click the Temp Tables link.
5. On the Temporary Tables page, click the Release button to unlock the temporary tables
associated with the program.

110.What is the difference between %select and %selectinit?
Ans:If we tried %select and it returns no value then state record fields retain their previous value.
If we tried with %selectinit and it returns no value then it reinitializes buffers.

111.What is the flow of actions in AE?
Ans: DoWhen--> DoWhile-->Doselect-->Peoplecode-->SQL-->Logmessage-->DoUntil

112.What is the difference between Reuse and Restart operation?
Ans: Reuse operation recompiles the SQL statements every time the loop executes.Restart
operation is for select/fetch and it creates checkpoints wherever the program fails.

113.While I ran AE getting an error like File data is not reading properly why this
error is showing? And How to rectify it?
Ans:This error will occur because of problem on reading the file data.For this we use readrowset
function. I think miscalling this fucntion in the inbound program.

114.Suppose by running AE we can able to insert 100 rows. But the requirement is user
want to know which rows have been inserted and which rows havent been inserted. How
to reach it?
Ans: We should use temporary tables. if the row passed successfully then insert into temporary
table.

115.While I am running AE getting an error like Processes are suspended.. Why this
error is coming and how to resolve the same?
Ans: a)If we used to run on same runcontrol id then we got this error.
b) If the peoplecode debugger is not enable then we got this error

116.In an AE when running in batch mode program how to share the value?
A) Using state records

117.Is Encapsulation possible in AE?
A) Yes

118.How to insert and update rows into a record using Application Engine and
Component Interface?

A) There are many ways to Insert and Update rows into a record either using Application Engine
or Component Interface.
In Application Engine programme, using peopelecode we can create a stand-alone rowset with
the record to be updated.
Fill the rowset using rowset.fill method. Manipulate the data and use record.Save() method.
In Component Interfaces, if the record is in the C.I buffer and is populated in the buffer, the C.I
Save method will Update or Insert the data in the record.

119.Does PeopleSoft A.E write the timings trace?
Ans: Yes

120.What is the difference in using SQL directly and calling SQL from Peoplecode in
Application Engine?

121.As we have the option AE and SQR to do interfaces why we use CI with AE?
Ans: Its easy to write Peoplecode in AE using CI and also the peoplecode enhancements
will also applicable to CI.

122.While I am running AE getting an error like Processes are suspended.. Why this
123.Error is coming and how to resolve the same?
124.How to pass run control parameters to AE?
125.While I ran AE getting an error like File data is not reading properly why this
error is showing? And How to rectify it?
---------- is the required the section in AE Programs.
Application Engine Programs can be written without having the State Record. (True/False)
-------------- Sections are allowed in the Application Engine Programs.
The key field in the State Record is --------------

126.Which are the primary methods to trigger Application Engine Programs?
A. Batch file
B. PeopleCode
C. Process Scheduler
D. from within Application Designer
E. COBOL

127.How do you run an online job or process in PeopleSoft?
You can run using a Run Control page, once you click the run button it will submit the job to
Process Scheduler. to check the status of submitted job click on Process Monitor link.

128.What is the APP engine event in peoplecode?
A: Application engine peoplecode event is OnExecute.

129.What are the different actions in APP Engine?
A1: dowhen,dowhile,doselect,peoplecode,sql,call section,log message,do until.
A2: in addtion to the 8 listed above, there is an additionally action for AE programs that are
marked as Transform programs and the action is XSLT

130.How many temporary records are there in app engine?
A1: Maximum we can use 99 Temp Tables in App Engine.
A2 : There Can be n number of Temporary tables, but App. engine. creates upto 99 instances for
a single temporary table.

131.How do you debug your AE?
A1: 1. Go to configuration manager of 2 tier (App Designer). Then navigate thru Profile > Edit >
Process Scheduler > Application Engine, check the Debug option.
2. Open the App Engine program needs to debug and click the traffic light, run program button.
3. Enter the run control id & debug the AE.
A2: 1)Peoplesoft>Peopletools>Process Schedule>process> Select Process Name
2)In the page select "Over Ride Options"
3)*Parameters List > Append > -Trace.
A3 : 1 .Open the Configuration Manager and click the Profile tab. You will see a list of
instances to choose.
2. You can double-click the instance or highlight the instance and click on the Edit push button
3. Click on the Process Scheduler tab. You will see the Debug checkbox in the upper right hand
corner.

132.Why temporary records are needed?
A1: Temporary tables are basically used for the parellel processing and for better performance.
A2: Defines the record definition as a temporary table. Temporary images of the table can be
created, specified by the PeopleTools Options Page. Temporary tables are used for running
Application Engine batch processes. Temporary tables can store specific data to update without
risking your main application table.
A3: Temp tables are mainly used for Parrellel processing. Also you take the data you want for
manipulation into your Temp table, and you can play with that. Finally when you get the desired
data, you can update the main tables.
A4: One important thing, when dealing with temp tables. When you use PeopleCode to call the
app-engine, it runs synchronously and also it doesn't use any temporary table instances created
for batch processing instead it uses the instances created for online processing which by default
is 3.
A5: We use temp records for batch processing.This temp table can store specific data to update
without risking our main application table.
A6 :temporary tables are used by PF_RESOLVER in EPM. The source data will be resolved
based on the run time parameters and inserted into the temporary table instance based on the
record suite ID.
A7 : AE programs run in batch mode so the multiple instances of the same program gets created
and due to this the deadlock situation can come. To avoid this situation peoplesoft provides the
concept of temp tables i.e. the data that needs to be updated by the AP program is stored in the
temp tables. This avoids the situation where the programs fetches the row one by one, process it,
and then send the updated data back. By creating temp tables you can store the data that is
effected by business logic in the temp table and then you can perform the opertaions on it instead
of the main table. Once the processing is completed you can send the data back to the main table.
A8 : Temporary table can be used in application engine programs to support parallel processing
and better performence.

133.Why state records are needed?
A1: State Records are used to pass parameters and values between the various sections in an
Application Engine. State record may be either SQL Table or a Derived Work record.
A2: state record is a method to allocate variable for yr app. engine programs, using state record
we can pass values from one section to another.
A3: State records are used in Application engine development and customization. Basically they
are used to pass the values (variables, database field) from from section to another section, from
action to another action.Each application engine can have multiple state record but there will be
only one default state record. It can be a SQL table or derived table. All state record ends with
_AET.
A4: The use of State record beside just passing the parameters between different steps of AE, is
to enable restart logic. The programmer can program AE by using state record, in such a way
that it can be restarted from any point of AE. But to enable the restart, the state record should be
physical table and not the derived/work record.
A5 : State record is used for providing the variables, database fields to different sections of the
application engine. Scope of the state record is limited to the application engine program. AE can
have multiple state records, but can have only one as a default state record.
It can be physical or derived work record. Physical record can be used when you have a restart
logic and when you have disables the restart logic derived and work record can be used.
The naming convention is, it must end with _AET identifier and process instance should be the
one and the only key for the state record, so that application will identify the record as a state
record.
A6: The state records main use is passing values between sections. ONE of the other main resons
is to hold the run time parameters passed from a run page as well when application engine is
triggered from a run page as also run time pareameters passed from within a peoplecode ust
before the app engine is called. THis does not mean the default state record holds only the exact
number of fields on the run page. Example AE_EXISTS helps as flag and whoose value can be
used for controlling the logic between the execution of SQLS between the sections of the
application Engine.
A7: State records are created by app engine program developers. The state records are used to
pass vaules from one action to aonther. State records can be considered as temporary storage for
online processing.
%Bind is used to retrieve value from ate record.
%select is used to pass values to the state record.

134.Differences between State and temporary records?
A1: 1. State record at any point of time has only single line information, as it's driven by the
Process_Instance a skey field. While temp table can have multiple rows.
2. State record had only single instance, while the temp table can have maximum of 99 instance.
3. State record is used for restart logic.
4. State record can be used for dynamically calling AE section, by adding AE_SECTION,
AE_APPLID as fields. Temp table can not be used.
A2: In the above comment by Vaibhav, "State record is used for restart logic", Temp records can
also be used for restart logic. That should not be counted as a diff. FYI.
Temp tables are used for set processing kind of things whereas state records for row processing.
A3: The Temp table data is available only for the duration of run. Hence when the program is
aborted the data stored in Temp table is lost and you can not restart the program from that
particular point. Hence the statement I used is correct that State record can only be used for re-
start logic.

135.What is set processing and row processing?
also why is it said that once the process is aborted the temp table data gets lost? it s a table
afterall and until the table is explicitly truncated, we can retrieve the values, right? what
restart logic?
This is in addition to all the replies above -
If you create a sql table as State Record - data will be stored in the database. If at any point of
time, App Engine programs stops, you can continue from that point on provided Restart is
enabled. This is called the restart logic. With restart enabled, you don't have to run app. engine
program all over again. For this to be true, state record cannot be a derived record. It has to be a
sql table.
Temp. table is primarily used for set processing. If there are several users running the program at
the same time, copies of tables are created in order to process in parallel. Temp. table lives only
until the program runs and is dissolved immediately after.
A6: purpose of Temp record is different that is parallel processing not the restart logic. and it's
right that state record can be used for restart logic because it have last row processed.

136.Different ways to run AE, SQR, (Command, process scheduler)?
A: command prompt, process schedular, online, manually from 2-tier.
A2:SQR:command line(sqrw.exe),process scheduler & peoplecode
AE: commandline(psae.exe),process scheduler,peoplecode-callappengine(aename,st-rec).

137.Difference between sql statements and metasql statements?
A: Insert, Select, Update, Insert.
Metasql - %InsertSelect, %Select, %Selectinit.
A2: SQL - INSERT,UPDATE,CREATE,DELETEMETASQL - %BIND,%EXECUTE
EDITS,%SELECT,%SELECTINIT,%SQL,%TABLE,%TRUNCATE
TABLE,%UPDATESTAS.
A3: can u specify the difference between sql and meta sql.
A4: SQL statements:
The SQl statements are used to fetch/retrieve, update, insert, delete data from the database. In
PeopleSoft we use the sql stmts using sqlexec or createsql. Differnet sql statements are:
Select, Insert, Update, Delete.
Meta Sqls:
Differnet RDBMS have differne date and time formats. though the component processor takes
care of the automatic convesion but at the time of using the sqlexec the automatic conversion
does not take place. So in order to understand this the meta sql concept has come. Whcih we can
use in diff sql stmts. for example %datetimein, %date, %time, %currentdatetime,%datetimeout
etc.
%dateIn: This is used in the where caluse of "Select and update"
%dateout: This is used while selecting the data.
A5: SQL Statements are PLaform Dependent where as Meta-SQL statements are Platform
Independent.

138.Name some app engines u worked on?

A1: I created a standard appengine program from scratch.
A2: Which populates employees table. I don't remember the exact name, it must be like PER016.
A3: the name of the ae program is per099. Which is used to refresh the employees. after creating
the person from the workforce administration we have to run the refresh employees ae program,
then the entries will be made in the database.
A4: AR_UPDATE(POSTING ITEMS, MAKING PAYMENTS)
AR_PREDICT(AUTOMATIC CHSH APPLICATION PROCESS)
AR_DRAFTS( USED IN DRAFT PROCESSING)
AUTO_MAINT (USED FO|R AUTOMATIC MAINTAINENCE)
THESE ARE SOME OF THE APP ENGINE PROGRAMS I DELT WITH WORKING WITH
AR (Accounts Receivable) module.

139.What is the difference between dowhen and doselect?
A1 : Do When is something like IF statement. It is the first action in execution order. if the query
written in the Do When action returns any rows then the subsequent actions will be executed.
In a simple way
DoWhen is a conditional action.
DoSelect is a looping action.

140.How many types of ways you can run an Application Engine program?
A1: We can run AE program in 5 ways;
1. Running from Application Designer.
2. By calling People Code function.
3. Running from DOS Environment (Debugging).
4. Running from Application Engine People Tool.
5. Running from People soft Application.
A2: 5 ways to run an AE: for end-uses: Process Scheduler for developers: Process Scheduler, PP
Tools>AE, Dos Command Line, App Designer, called by PP Code.
A3: We can Run Application engine programs three ways
1. Two tier mode
2. Using Process scheduler
3. Command prompt

141.What is a state record?

A1: State record is a method by which u pass the values to u r application engine program..
A2: State record is temporary memory storage for AE program. It can be a record or a table
A3: A State Record is temporary record which is used in AE Programs, Which is used pass the
values between one Section to another section.
A4: State Record is used to pass the values from sections to sections and Q183actions to actions.
State record is not a temporary record; it can be Sql record or derived work record. Mainly sql
record is used for restart of the application engine programme. It should have naming convention
of _AET.
A5: The State record is used to pass variable information between the application engine sections

142.Why cant the SQL and call Section Actions be present simultaneously in a single step?

A: If u use both call section and sql it gives the data base Traffic. Same time both will call d/b.

143.How to test an application engine program in 8.8?
A: One can test Application in two ways:
1. Running Application engine from 2-Tier
2. Running Application engine from 4-Tier.
1. Running Application Engine from 2-Tier: Open Application Designer, Then open desired
Application engine. Then on top middle tool bar you can see 'Run Program button' click on to
that button, give vales to parameter like Process Instance, Run Cntrl id etc and click. this will run
application engine and generate a trace file to you local system. After completion of Application
engine you can see if you got desired results or not.
2. Running Application engine from 4-Tier: Open 4-Tier link, Go to peopleTools-> Process
Schedular -> Process, Add you Application engine process here, in 'Process Defination Options'
give 'PRCSMULTI' in COMPONENT and 'TLSALL' in Process Group and then Save the page.
After defining Application engine, Go to peopleTools-> Process Schedular -> System Process
Request, then add a RUN CONTROL ID, After adding run control id, click on the RUN button
on the page, this will lead you to page where all the process will be listed, Select you process
name (Application engine Name) and clik on ok. This will run you Application eingine.

144.How do you run an online job or process in PeopleSoft?
A. You can run using a Run Control page, once you click the run button it will submit the job to
Process Scheduler. To check the status of submitted job click on Process Monitor link.

145.Two Program views of AE Program?
A1: Definition, Program flow
A2: PeopleSoft Application Designer enables you to display your program in the following two
views:
Definition
Program Flow.

146.In Call Section Action it is possible to leave the Program ID with blank Value in
certain cases?
A: True
A2: The Answer is True, as many times you will call section from the same App Engine. In such
scenario, the Program Id can be blank.

147.State Record can be Dynamic?

A: Yes, if you don't have restart enabled, state record can be dynamic.

148.People Soft allows multiple long fields per State Record?

A: False

149.Let us take a Temp Table TMP_TAO.?

In People Tools options the following instance settings are done.Temp Table Instances
(Total) : 5Temp Table Instances (Online): 4In AE1 App Engine Program the instance
count to TMP_TAO is 3 In AE2 App Engine Program the instance count to TMP_TAO is
5.How many instances are created to TMP_TAO ?
A: 13

150.The physical, dedicated tables are locked at the time the Application Engine program
is loaded into memory?
A: True

151.To launch an Application Engine program from another App Engine program, which
one of the following is correct?

A: Call Section Action.

152.What are the differences between AE and SQR?
1. AE is very systematic as it is structured as Section, step and Action. While SQR is not
systematic.
2. AE flow is easy to read and understand, while SQR is not that easy.
3. AE is easy to debug as you can do line by line debugging. With SQR, its not easily possible.
4. By using SQR, you can create and maintain different reports, which are not possible either
AE's.
The main difference and advantage is when a people soft object are changed, APP engine will be
updated automatically, while SQR should be done manually.

153.What are two program views in AE Program?
Definition and Program flow

154.What is the APP engine event in peoplecode?
Application engine peoplecode event is "OnExecute". Sometimes we can use
the saveprechange event also.

155.Why temp records are needed?
Temporary tables are basically used for the parallel processing and for better performance

156.What is the Mandatory property of App.engine?
1. Main is the required section in Application Engine.
2. There can be multiple steps in single application engine, but atleast one step should be part of
AE.
3. Similarly you can have multiple actions in AE but you should have minimum 1 action part of
step.
4. Save as AE

157.How do you check the process status in peoplesoft?
A. Go to PeopleTools -> Process Scheduler -> Process Monitor.

158.Purpose of Application Engine?
Ans: 1.Backgroung SQL processing.
2. To pass data between Modules.
3. To pass data between Databases.
4. To populate Reporting tables using data in Transaction Tables.
5. For integration purpose.
6. Validation of data
7. Data Manipulations.
8. For Version Up gradation.
9. Archive Data .Etc.

159.Process instance no is stored in which table?
PSPRCSRQST

160.How will you read Data from the CSV file or Excel file and Upload it into the Database
using AE Program?
Ans: Using File Layout Integration Tool.

161.PeopleSoft reserves ALL Message Sets (in Utilities, Message Catalog) up to which
number?
10,000
19,999
30,000
40,000
50,000

162.What are the Tabs that you see in a Application Engines Program Properties?
(1). General (2). State Records (3). Advanced
(4). Section Filtering (5). Temp Tables
(a). 1, 2, 4, 5 & 3 (b). 1, 5, 2 & 4 (c). 1, 2, 5 & 3 (d). 1, 2, 3, 4 & 5

163.The Section Filtering menu options allow you to filter the current view so that you only
see Sections and Steps based on specified criteria. This feature will typically be used in
situations where you are developing Application Engine programs intended to run:
(a). in Multiple Markets (b). On Multiple Platforms
(c). with effective dated sections (d). All of the above

164.Which in of the following is correct regards to the usage of ReUse statement in
App.Engine Programs:
(1). Don't use ReUse if you use %BIND variables to build parts of the SQL statement
(2). If you use STATIC option on the %BIND you can use ReUse.
(3). Don't use ReUse if you have %BIND variables in the field list of a SELECT
statement unless the value is constant.
(4). You can have Application Engine recompile a reused statement by using the %ClearCursor
function.
(a). 1 & 3 only (b). 2 & 4 only (c). 1, 2 & 3 only (d). 2, 3 & 4 only (e). All 1, 2, 3 & 4
Which of the following is not true:
(a). Application Engine Definition is an Application Designer Object
(b). Application Engine Developers can take advantage of all the interface benefits that
Application Designer offers.
(c). Multiple window support, which allows a developer to have multiple Application
Engine programs open simultaneously.
(d). Change control support allows you to manage access to Application Engine objects
by locking records.
(e). You can easily launch the PeopleCode Editor and the SQL Editor from within the
Application Engine Designer interface, as needed.
(f). None of the above.

165.Difference between Interface, Report & Process?
Ans: Interface: This is used to interact with other system may be PS or Legacy System
Report: This has a user interaction to execute or generate.
Process: This is scheduled in Batch Server so there is no need for the user to especially run it. It
automatically executes.

166.Ways to call AE programs (peoplecode,batch file,process scheduler,application
designer.
Where can u see the status of the job report and details in secured way?
Process monitor

167.Where does one see the status of the process requested to be executed?
Process monitor

168.Which of the following menu options allows you to modify the Last Process Instance
Number used within the system?
a) Process Scheduler, Use, Job Definitions
b) Process Scheduler, Use, Process Servers
c) Process Scheduler, Use, Process System
d) Process Scheduler, Use, Administration
e) Process Scheduler, Use, Process Definitions
169.Which process requests will run through the process scheduler server?
a) All processes submitted on the server
b) All SQR and COBOL processes ONLY
c) All processes submitted on the client
d) Application related processes ONLY (no PeopleTools processes)
e) All processes submitted on the client or server
170.Application engines are comprised of one or more steps and are quite similar, in
construct, to other programming language constructs.
Referring to the above information, which one of the following has the equivalent
construction of an application engine?
Choice 1
A SQL script
Choice 2
A database agent
Choice 3
A message agent
Choice 4
A SQR program
Choice 5
A COBOL paragraph

171.Where can you place Meta-SQL?
In a Derived/Work Table.

172.Advantages of Set Processing in AE Programs?
1. Improved Performance
2. Minimized SQL Overhead
3. Easy Maintenance
4. Leveraging the RDBMS
5. All of the above
173.What are the different ways 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
4. All of the above
5. None of the above
174.Which user login must you use to log in to the Data Mover in Bootstrap mode?
1. Security Administrator
2. Peoplesoft Superuser
3. Data Mover Superuser
4. Database Superuser
175.What is the configuration file for Application Servers?
Configuration Manager

176.State Record is mandatory for coding an Application Engine programs?
False

177.Recreating the table will have an impact on the existing data?
True

178.. What are the advantages of application engine over SQR?
Ans: 1. AE is very
it is not easily possible
3. And the main advantage is When peoplesoft changes systematic as it is structured with
section, step and action. While SQR is not systematic.
2. AE is easy to debug as we can do it line by line. In SQRs are done AE is updated
automatically, while SQR should be done manually.

179. How many types of Application Engine programs we have and what are those?

Ans : There are 5 types of processes:
1. Standard: which is a standard or normal entry point program.
2. Upgrade only: used by PeopleSoft upgrade utilities only.
3. Import only: used by PeopleSoft import utilities only.
4. Daemon only: use for daemon type programs.
5. Transform only: Support for extensible style sheet language transformations(XSLT).

180. What is the Maximum limit of call section actions in Application Engine to call other
sections?
Ans: AE supports up to 99 levels of nested call sections actions. For example the first call section
can call a second, which can call a third, and so on upto 99 call sections.

181. What is the use of Daemon Application Engine Program?
Ans: PSDEAMON process supports limited tracing because it runs indefinitely. Specially it only
allows Application Engine tracing at the step and SQL levels.
In addition to the standard peoplesoft SQL and peoplecode tracing.

182. How many types of actions we have in Application Engine. What are those?
Ans: There are 8 but we usually use 7 in an AE as SQL and Call Section cannot be used in a
single step.
1. DO WHEN
2. DO WHILE
3. DO SELECT
4. PEOPLE CODE
5. SQL
6. CALL SECTION
7. LOG MESSAGE
8. DO UNTIL
<**************** Do i have to mention XSLT action also?************************>

183. Explain the following terms?
What is Application State Record?
What is the use of state record?
How to create the state record.
Is there any mandatory fields in state record if so what are those fields?
Ans: A state record is a PeopleSoft record that must be created and maintained by the application
engine developer. This record defines the fields an AE program uses to pass values from action
to another.



An AE state record could be a physical/work record and any no of state records can be associated
with an AE program. But physical state record must be keyed by process instance. And one these
records will be default one.

184. which are the mutual excusive actions in AE, why?111111
Ans: SQL and Call section are mutually exclusive actions in an AE so they cannot be called at
the same time as there is a chance to get into infinite loop if they are in the same step. Because it
gives database traffic, as same time both the actions will call database.

185. How to perform the set-processing and row-by-row processing in Application Engine?

Ans: 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. Because the
updates in set processing occur within the database, use temporary tables to hold transient data
while your program runs.
Although temporary tables are not required for set processing, they are often essential to achieve
optimum performance in your batch program.

186. What is the use of process instance Application Engine and where we are using this?
Ans: Process instance is the instance created by the process schedular when u run the process.
Using this process instance we can write our business logic(code).
SQL: - %Select (EMPLID) Select EMPLID from PS_AERUNCONTROL where
PROCESS_INSTANCE = %PROCESS_INSTANCE and ORPID = %oprid

187. How to restart the application engine programs? Which table is used to restart
application engine process?
Ans: 1. One of the state record needs to SQL Table, Since All Derived work record will be re-
initializing on commit.
2. On the Advanced tab in the program properties dialog box, make sure that disable restart is not
checked.
3. In the configuration manager, make sure that Disable restart is not selected on the process
scheduler tab.

.What is an interface program?






NOV
15

SQR

1. What are the sections and paragraphs available?
There are five sections and three paragraphs available in SQR programming. The sections
include
a. Begin-setup End-setup.
b. Begin-program End-program.
c. Begin-procedure End-procedure.
d. Begin-heading End-heading.
e. Begin-footing End-footing
And the paragraphs include
Begin-select paragraph.
Begin-SQL paragraph.
Begin-document paragraph

2. Is it possible to increase the array size once defined?
No, it is not possible to increase the Array size once defined

3. What is Load-lookup? Give the Syntax for Load-Lookup?
The LOAD-LOOKUP command defines an array containing a set of keys and values and
loads it into memory. With LOAD-LOOKUP, you can reduce the number of tables that are
joined in one SELECT. Use this command in conjunction with one or more LOOKUP
commands.
Syntax: begin-setup
load-lookup
name=prods
table=products
key=product_code
return_value=description
end-setup

4. Can you Call a SQR from another SQR? How?
We can call one SQR program from another SQR program using Call.callsystem. But this is
possible only in UNIX Operating system.

5. Briefly explain Most commonly used SQCs in SQR programs?
: Some of the most commonly used SQCs are
1.STDAPI.sqc : This Is Process Scheduler Interface which is used to initiate and
terminate some field values such as Process_instance & Run_cntl_id
2.SETENV.sqc : This is used to set the Default Environment based on the Database
such Printer Type, Paper Size,Date formats Etc.
3.NUMBER.sqc : This file contains generalized routines to format numbers.
4.DATETIME.sqc : This file contains generalized routines to format dates and times.
6.RESET.sqc : This is an important Footing SQc.

6. What are the commands used in filehandling of sqr?
Using File Handling we can Import. Steps are
1. Opening a File Using OPEN FOR-READING command.
1. Reading Data From File Using READ command.
Writing Data into Table Using BEGIN-SQL paragraph & INSERT command

7. What are On-break parameters?
ON-BREAK causes the specified action to perform in a tabular report when the value of
a field changes. The default action prints the field only when its value changes
(PRINT=CHANGE).Mainly used for Redundancy of Printing on a page.

8. How can you Debug SQR programs?
We can Debug SQR using Debugging Commands such as
2. #IF DEBUGxxx
#END-IF
2. DISPLAY and
3. SHOW

9. What is the difference between sqr and sqc?
SQR SQC
1.This is nothing but the Actual 1.This is like a function in SQR.
Source program.
2.This consists of Program Section. 2.This does not consists of program Section.
3.This can be Compiled & Executed. 3.This cannot be Compiled and Executed.
4.We cannot call one SQR from 4.We can call one SQC from another SQC or another
SQR
or SQC. SQR program.

10. What are different types of variables in sqr?
Types of variables in SQR are
1. Column Variables.
2. List Variables.
3. System Variables.
4. Document Variables.
5. Substitution Variables.
User Defined Variables

11. Is there any read-only variable in sqr?
Column Variables & System Variables are Read-Only Variables.

12. How to pass Inputs for sqr program while running from windows?
Using ASK & INPUT Commands.


13. How to pass Inputs to the SQR while running through the Process Scheduler?
Using Procedures & SQCs to access data on Run Control Page (Run Control Fields).

14. What is the purpose of Stdapi.sqc?This is a Process Scheduler Interface sqc which is
used to initiate and terminate some field
values such as Process_instance & Run_cntl_id

15. What is the SQT file? What are the advantages of SQT files?
SQT file is nothing but resultant file after the compilation (i.e.) Runtime File. By using this
SQT file for Execution we can increase the Performance of the program by reduciong the
Compilation Time.

16. What is the SQC used to read data from translate table?
READXLAT.sqc is the SQC used to read data from Translate Table.

17. Which section is mandatory in an SQR program?
BEGIN-PROGRAM Section is Mandatory for an SQR program.

18. How will you display an image in SQR?
Using DECLARE-IMAGE , END-DECLARE command.

19. What is use of SETENV.SQC?
This is used to set the Default Environment based on the Database such Printer Type,
Paper Size, Date formats Etc.

20. How will you perform ERROR handling in SQR?
We can do Error handling in SQR using some command line flags such as O, -L,-ZMF,-
XMB and using Error handling commands such as
ON-ERROR = Skip/Warn/Stop (for Compile time errors)
ON-ERROR = Procedure Name (for execution stage errors).

21. How many ways of performance tuning are there in SQR?
1. Using LOADF-LOOKUP & LOOKUP.
2 .Using ARRAYS.
3. Using MULTIPE REPORTS.
4. Using SQT Files.
5. Using Bnn Command line Flag.
6. Running on BATCH SERVER.
7. Using Proper Programming Logic in SQR such as Using BREAK statement in
EVALUATE Command.
8. Proper SQL tuning such as using Sub queries instead of Joins.






22. Can you call procedure in oracle from Sqr? How?
To call a database procedure using Begin-select paragraph, the syntax is as follows:
Begin-select
[(report arguments)]
from Dual
End-select
To call from Begin-sql, the syntax will be
Begin-SQL
;;
End-SQL

23. Can you connect more than one database using one Sqr? How?
Yes.

24. What are the differences between Load lookup and Array?ARRAYS LOAD-LOOKUP
1. Arrays can be declared in any section. 1. Load-Lookup is declared in only in
SETUP section only.
2. Number of rows are not automatically 2. Numbers of rows are automatically added.
gives a error if the number of added.
Exceeds the specified number.
3. We should insert data in to Array by 3. Rows are automatically inserted in to
programming. Load-Lookup.
4.We can retrive any number of fields. 4.We can retrive only Two fields from
from a table. a table.
5.We have Length & Data type. 5.We dont have Length & Data type.
6.We cannot directly print from Array. 6.We can directly print from
Load-Lookup.

25. What are the steps required to run the SQR from peoplesoft environment?
Three steps we have to fallow to run the SQR program from the peoplesoft environment
(Process Scheduler). These steps include
a. Making the SQR program API aware by calling two procedures (stdapi-init, stdapi-
term) from the Begin-program section and including the Stdapi.sqc in the bottom of the
program.
b. Create new run control table or using existing run control table and creating run
control page, component and register the component. Creating new run control SQC if we
create a new run control table.
c. Giving the permission to the user by giving process groups.

26. How to pass command line flags to a sqr report running through process scheduler?
Using override options in the process definition in the Process Scheduler in the People
Tools.

27. What are On-break parameters?
ON-BREAK causes the specified action to perform in a tabular report when the value of a
field changes . The default action prints the field only when its value changes
(PRINT=CHANGE).Mainly used for Redundancy of Printing on a page.

28 .How does peoplesoft Process monitor knows that the process (Say sqr report) is at what
stage such as initiated, in process, completed etc
From the Field Value of RUNSTATUSDESCRfield from PS_PMN_PRCSLIST table.

29. How can u Debugging SQR programs?
We can Debug SQR using Debugging Commands such as
3. #IF DEBUGxxx
#END-IF
2. DISPLAY and
3. SHOW

30. How to refer a global variable in local procedure?
After special character (ex.#,&) we use underscore(_) after that variable name.

31. What is -Bnn flag?
This is used to specify the number of rows that are to be taken from Dbase to the Buffer
because default the system takes 10 rows at a time.

32. What is -Tnn flag?
This is mainly used for testing purpose. We can restrict the system to generate only a
specific number of pages instead of generating all pages for testing. This is used in
Windows Environment.

33. What is -RS & -RT Flags?
RS is used to generate SPF file ie; stopping the program after the comilation. _RT is used
to run the SPF file .This is also one kind of Performance increasing technique by saving the
compilation time.

34. What are the sections in Sqr? Which one is necessary?
Setup, Heading, Footing, Program & Procedure Sections. Program section is the Mandatory
section.

35. What is -debug command line flag?
This is used for Debugging in SQR.
36. How to place an corporate logo in sqr?
Using Declare Image command
37. what are the debugging commands in sqr?
Show & Display are debugging commands
38. what is the difference between them?
Show is used to display more than one variable at a time.
Display is used to display only one variable at a time.
1) What is the difference between:
Print $some_var (1,1,0) and
Print $some_var (+1,1,0)
2) What are some possible reasons for seeing an error like this:
(SQR 5528) DB2 SQL PREPARE/DECLARE error -204 in cursor 1:
SQL0204N "DRO.DEALERSHIP" is an undefined name. SQLSTATE=42704
SQL: SELECT orgHier.GEOG_NM,
dlrshp.DLR_CD,
dlrshp.dlrshp_nm,
agmt.APPNTD_DT,
agmt.CNSCTV_TERM_NO
FROM
DRO.DEALERSHIP dlrshp,
.....
....
Error on line 227:
(SQR 3716) Error in SQL statement.
Errors were found in the program file.
SQR: Program Aborting.
3) What is the Load-Lookup structure in SQR useful for and when might you use it.
4) How is a Load-lookup table different from an Array
5) What is the difference between an ASK and an INPUT parameter.
6)
let $var = SQR RULES
print $var (1,1,5)
print $var (+1,5,0)
What will the output of these print statements be? (Type in the answer below)
7) For this questions assume you are given the following report to build. The requirements
are that after each break in diversity type the total net profit and total number of dealers in
the diversity type should be printed (the bolded values inside the squares). And at the end
of the report a grand total should be printed. The diversity type should only be printed for
the first dealer of that diversity type. Assume you are connecting to the following table:
Diversity_Dealers
dd_id INTEGER
diversity_type VARCHAR
region_cd VARCHAR
start_dt DATE
dealer_cd VARCHAR
dealer_nm VARCHAR
address VARCHAR
city VARCHAR
state_abr VARCHAR(2)
zip_code VARCHAR(5)
area_code VARCHAR(3)
phone_nbr VARCHAR
first_nm VARCHAR
middle_ini VARCHAR
last_name VARCHAR
net_profit INTEGER
Refer the mock up of the report below and write an SQR program that will use the above
table to generate this report. (Note: dont worry about minor errors in syntax or getting the
print placement parameters exactly correct. The idea here is to test your ability to use SQR
to generate the report and meet the requirements.)


7) True or False, the SQR syntax does allow for a GOTO control structure.
8) What do the RTRIM and RPAD functions do?
9) Write an SQR program that offers a local procedure that allows a user to form a single
string that will contain the value of a persons full name, Darrin Alan Miller for example.
The SQR program should:
1. Prompt the user for a persons first name, middle name, and last name
2. Allow the user to enter the aforementioned values in upper, lower, or mixed case
3. Prompt the user for the style of name they want to see (LFM, FML, LF, FL)
4. Prompt the user with a choice whether or not they want the middle name portion of the
resulting name to be abbreviated or not. If the user wants the abbreviated version of the
middle name, then that name must be followed with a period.
5. Return the persons full name with each word having its first character capitalized.
6. If a persons last name is the first portion of the full name string created, then that last name
should be followed by a comma and appropriately spaced
7. Although the user may be requesting to see the persons middle name as part of the full
name variable that is created, if the middle name is null (and it can be), then the logic for
making this name part of the full name variable should be omitted.
First Name Middle Name Last Name Style Abbr
MN
Result
DARRIN Alan Miller LFM Y Miller, Darrin A.
Darrin Miller FML Y Darrin Miller
Darrin AlAN miller FML Y Darrin A. Miller
10) True or False, the attributes associated with a chart as declared within the DECLARE-
CHART definition of an SQR program may be overridden by corresponding attributes within
the PRINT-CHART command.
11). The creation of charts within an SQR program requires the use of what type of in
memory data type:
A. An array
B. A load-lookup
C. A file
D. A cursor
E. A select statement
12) True or False, the use of arrays within an SQR program should be avoided because
they can not be dynamically sized and therefore may obtain more OS memory than needed.
13) What are the methodologies available to pass user parameters into an SQR program?
1. INPUT
2. PROMPT
3. ASK
4. Choices A and B above
5. Choices B and C above
6. Choices A and C above
7. All of the above
14) True or False, user parameters passed to an SQR program via the INPUT command
retrieve a compile-time substitution variable.
15) Within a BEGIN-SQL paragraph various DDL and DML commands such as creates,
drops, updates, etc. can be issued against the RDBMS. The ability to issue these types
of commands is determined and constrained by the
1. RDBMS privileges assigned to the database administrator
2. RDBMS privileges assigned to Dan Thornhill
3. RDBMS privileges assigned to the user executing the SQR program
4. roles, grants, and synonyms assigned to the user executing the SQR program
5. SQR program designer
16) Which SQR section is responsible for defining and controlling information that is to be
printed at the top of each output page?
17) An & variable within SQR
A. May represent and store a numeric value selected from the RDBMS
B. May represent and store a string value selected from the RDBMS
C. Is a read only variable
D. A, B, and C above
E. None of the above
18) Referring to the excerpt of SQR code that follows and assuming that the procedure
queried 10 rows of data and that each row possessed a value of 10.00 for the
PROD_PRICE column, what will be the value of the #product_total variable that is
displayed?
BEGIN-PROCEDURE CALC_FIGURES
LET #PRODUCT_TOTAL = 100
BEGIN-SELECT
PROD_CODE &PROD_CODE
PROD_PRICE &PROD_PRICE
LET #PRODUCT_TOTAL = (#PRODUCT_TOTAL + &PROD_PRICE)
FROM PRODUCTS
WHERE PROD_CODE = 1709
END-SELECT
DISPLAY #product_total
END-PROCEDURE
19) Referring to the excerpts of SQR code that follow, will the contents of #PROD_TOTAL
in both excerpts be the same after program execution has completed?
BEGIN-PROCEDURE CALC_FIGURES
BEGIN-SELECT
PROD_CODE &PROD_CODE
PROD_PRICE &PROD_PRICE
LET #PROD_TOTAL = (#PROD_TOTAL + &PROD_PRICE)
FROM PRODUCTS
WHERE PROD_CODE = 1709
END-SELECT
END-PROCEDURE
BEGIN-PROCEDURE CALC_FIGURES
BEGIN-SELECT
PROD_CODE &PROD_CODE
SUM(PROD_PRICE) &PROD_TOTAL
MOVE &PROD_TOTAL TO #PROD_TOTAL
FROM PRODUCTS
WHERE PROD_CODE = 1709
END-SELECT
END-PROCEDURE
20) & variables within SQR are assigned during the processing of what type of SQR
paragraph?
A. BEGIN-SQL
B. BEGIN-PROCEDURE
C. BEGIN-ERROR
D. BEGIN-SELECT
E. BEGIN-PROGRAM
Use the following excerpts of SQR code to answer following questions.
Program Excerpt A:
BEGIN-PROCEDURE GET_CUSTOMERS
BEGIN-SELECT
C.NAME (1,1)
O.ORDER_DATE (1,35)
O.ORDER_NUM (1,50)
NEXT-LISTING
FROM CUSTOMERS C,
ORDERS O
WHERE C.CUST_NUM = O.CUST_NUM
ORDER BY C.NAME
END-SELECT
END-PROCEDURE
Program Excerpt B:
BEGIN-PROCEDURE GET_CUSTOMERS
BEGIN-SELECT
C.NAME (+1,1)
C.CUST_NUM &LE_NUMBER
DO GET_ORDERS
FROM CUSTOMERS C
ORDER BY C.NAME
END-SELECT
END-PROCEDURE
BEGIN-PROCEDURE GET_ORDERS
BEGIN-SELECT
O.ORDER_DATE (0,35)
O.ORDER_NUM (0,50)
FROM ORDERS
WHERE CUST_NUM = &LE_NUMBER
END-SELECT
END-PROCEDURE

21) The &LE_NUMBER portion of code is known as a:
1. blind variable
2. bound variable
3. flexible variable
4. bind variable
5. substitution variable

22) If the CUSTOMERS table contains 20 rows, and the ORDERS table contains 20
rows, and these tables have 10 rows with matching CUST_NUM values, will both
programs achieve the same results?




23) The code within Program Excerpt B can be described as:
1. a correlated sub-query
2. a cascading query
3. a join query
4. a cluster query
5. a goto query


24) How many distinct queries are being issued to the RDBMS within Program
Excerpt B



25) Modify the excerpts of SQR code above related to the previous questions so that
possible errors encountered from the RDBMS will be handled.

sqr

1. Explain what is on-break in SQR with options and their use?
Ans: On-break is a very powerful SQR feature that will allow you to control what happens when
values in a column break, or change. Specifically, you will use on-break to:
Suppress duplicate values
Produce subtotals
Produce subheadings
Control the flow of your SQR
Syntax: print {field} (a, b, c) on-break {print = change |
print = change/top-page |
print = always |
print = never}
before = procedure_name
after = procedure_name
save = $text_var
skiplines = nn
level = nn

2. What is the load look up concept in SQR?
Ans: A common function within an SQR program is to join tables in order to get the long
description of some data code.
For instance, in a given table, you may have a COURSE or DEPT_ID but the corresponding
description is in another table.
This situation requires the SQR program to retrieve subordinate data and can be done via a join,
or by performing a procedure that performs a
separate SELECT from within the main SELECT statement. However, for large tables with large
amounts of data, a table join can be a slow process.
There is a more efficient way of retrieving this data in SQR. You can use lookup tables to save
static data in a dynamic structure providing you more
efficient data retrieval during the execution of an SQR program. Lookup tables are implemented
in SQR programs using the load-lookup and lookup commands.
load-lookup
Example: load-lookup
name=EmployeeDetails
rows=12
table=PSJOB
key=EMPLID
return_value=NAME
where=DEPT=Company
and (effective dating logic) (this is the syntax we gve in set-up section)
lookup EmployeeDetails &EMPLID $NAME(this is how we call from a procedure)

3. How do you pass parameters among procedures, what is the alternative to do that?
Ans: We usually pass parameters from one procedure to another using variables prefixed by $ or
# depending on the data type.
<******************************* I doubt even arrays
****************************************>

4. How do you control page breaks?
Ans: You can prevent page breaks within a record by following four simple rules:
1. Place ON-BREAK columns ahead of other columns in the select paragraph.
2. Place the lower-level ON-BREAK columns ahead of the higher-level ON-BREAK columns in
the select paragraph.
3. Use the same line positions for all ON-BREAK columns.
4. Avoid using WRAP and ON-BREAK together on one column.

5. How do you influence report output to landscape or portrait
Ans: PeopleSoft has standardized the Setup section using SQC files references by the #include
command. Examples
setup31.sqc Portrait mode
setup32.sqc Landscape mode

6. How you debug SQRs

Ans. 1. By displaying data when the query runs using show/display so that isolate problems areas
by temporarily skipping the program that is not working.
Show is used to show any number of variables. Display is also speified for any variable, column
or literal but it displays only one value.
2. SQR provides #debug command to make temporary changes to the code.

7. Explain Complier directives in SQR
Ans. Compiler directives are #IF, #ELSE, #END-IF, #IFDEF, #IFNDEF used before the
substitution variables declared by #DEFINE.
1. #if: Compiles the commands followed by #if if the condition satisfies.
2. #else: compiles the commands followed by else if the #if condition doesnt satisfy.
3. #end-if : Ends the #if.
4. #ifdef : Compliles the commands under #ifdef if the substitution variable is defined.
5. #ifndef : Compliles the commands under #ifdef if the substitution variable is not defined.

8. How many flat files can be opened through SQRs and what is the limitations in reading
or write those files?
Ans. As many but the maximum number of files is 99.

9. What is a difference between Ask & Input command?
Ans. 1. Ask : Retrives values from compile time variables, and can be written in begin-setup
section only. The retrieval can be either from userinput, command line, or from a file.
2. Input : Accept dat entered by the user into the variable specified.

10. How do we work on Effective dated rows on SQR?
Ans. We add the criteria in the sql command the effective date must be equal to current date.
EFFDT = (SELECT MAX(E.EFFDT) FROM PS_JOB A
WHERE A1.EMPLID = A.EMPLID
AND A1.EMPL-RCD = A.EMPL-RCD
AND A1.EFFDT <= DATENOW()

11. How to Refer Global variable in a local procedure through SQR?
Ans: <**********************not sure of ans
**************************************>

12. How do you declare a local procedure and global procedures in SQR?
Ans: SQR procedures that contain variables that are visible throughout the program are called
global procedures. These procedures can also directly reference any program variable.
In contrast, procedures that take arguments, such as the spell number procedure in this sections
check-printing sample program, are local procedures. In SQR for PeopleSoft, any procedure that
takes arguments is automatically considered local.


13. What is the difference between Begin-Select & Begin-SQL?
Ans: 1. The Begin-SQL paragraph allows you to execute any non-select SQL statements (Insert,
Update, Delete) DML
2. The Begin-Select paragraph is the heart of the SQR program.
example: begin-SELECT [DISTINCT]
COLUMN_NAME
[SQR commands]
FROM TABLE/VIEW
[WHERE]
[Order by ]
end-SELECT

14. Can multiple columns be retrieved in Load-Lookup command in SQR?
Ans: <**************************** I wud like to know this
ans**************************************>

15. How do you control the number of iterations or fetch records firing SQL statement in
SQR?
Ans: By looping

16. What is a difference between EDIT & Format in SQR?
Ans: Edit is used to edit any data type and format is used to edit only date fields in input
command.

17. How do you Execute SQR using Process Scheduler?
Ans: BEGIN-SELECT
FROM PS_
WHERE OPRID = $PRCS_OPRID
AND RUN_CNTL_ID = $PRCS_RUN_CNTL_ID
END-SELECT

18. Are SQR commands and variables case sensitive?
Ans: SQR commands and variables are not case sensitive.

19. Do SQR programs require a dot(.) sqr extension? Do SQR runtime files require a dot (.)
sqt extension?
Ans: Yes a SQR needs to be saved as (.sqr) extension and runtime file need (.sqt).

20. How can I read invariable length delimited fields from a sequential file? An example
format would look like this: field1|field2|field3|...
Ans: With the field separator as in above example "|" is the delimiter.

21. How can I insert a null value into a numeric field in the database?
Ans: By inserting zero ('0') into the field we can give null values to numeric field.


22. What does the SQR variable #sql-count holds?
Ans: #sql-count holds the count of rows that are affected by a begin-select paragraph(INSERT,
UPDATE, or DELETE).

23. How do you reset the page number printed on a PAGE?
Ans:

24. For multiple reports is it compulsory to use command declare layout? Or can we
create multiple reports without declare layout?


Component Interface



1) What are the main elements in the component Interface ?
Main elements of component Interface
Component interface name
Keys
Properties and collections
Methods

2) Difference between Get keys, find keys and Create Keys ?
Get keys: - These are mapped to the fields marked as scrh in the components search
record. Automatically Search key fields in search record become Get keys.
We cannot change it.

Find keys: - These are mapped to fields marked as Alt or Srch in the component search
record. You may remove Find keys that you do not wish to make available for searching.
Create Keys: - It is generated from the key fields for the search record. If Add search
record is present then its key fields are taken. We cannot change it.

3) How do you provide security for the component interface?
Open the Permission list
On the Component Interface tab
Add row and select the newly created Component Interface
Edit the permissions to give permission for the standard methods
Get, Create, Save, cancel, find.

4) What the steps that you need to do in people code to invoke Component Interface?
Establish a user section
Get the component interface definition
Populate the create keys
Create an instance of the component interface
Populate the required fields
Save the component Interface.

&Session = GetSession();
&CI = &Session.GetcompIntfc(CompIntfc.INTERFACE_NAME)
&CI.KEY_FILED_NAME = NEW
If not &CI.Create () Then

Else
Populate other fields
End-if;

Populate the other fields

If not &CI.Save () Then
Else
End-if;

5) How do you test Component Interface?
Using the Component Interface tester
Give values in the tester for options
Get Existing, Create new, Find and perform the operation from the CI Tester

6) Catching error message in the component Interface? Or
Use of PSMessages in the CI ?
This function needs to be called when ever methods like Find, Save, Create methods return
false.
Error text and Error type can be printed in the log message for any other action in to the log
messge.

Function CheckErrorCodes()

&PSMessages = &Session.PSMessages;
&ErrorCount = &PSMessages.Count;
For &i = 1 To &ErrorCount
&ErrorText = &PSMessages.Item(&i).Text;
&ErrorType = &PSMessages.Item(&i).Type;
End-For;

End-Function;

7) What is method? What are the different types of method?
Methods: - A method is an object that performs a very specific function on a component
interface at run-time.
Standard methods and user-defined methods.
Standard methods: - Automatically generated upon the creation of a new component
Interface in Application.
Apart from the Standard methods there are Standard methods available for the use with any
collection.
User-Defined methods: - User-defined methods are those that you can create to meet the
requirements of an individual component interface.

8) What are properties?
The Fields in the level 0 in the component are the properties of the component.

Standard properties User-Defined properties
Createkeyinfocollection Developer can further control the exposed Getkeyinfocollection field
properties.
Findkeyinfocollection
Property Info collection
GetHistoryItems (Update/Display mode or Correction mode)
EditHistory Items
InteractiveMode.

9) Traversing the Collections in the Component Interface?
COLL_JOB Collection
Coll_JOBItm Row in the collection.
&COLL_JOBCol = &CI_JOB_DATA.COLL_JOB;
For &i = 1 to &COLL_JOBCol.Count
&COLL_JOBItm = &COLL_JOBCol.Item (&i);
&COLL_JOB_JRCol = &COLL_JOBItm.COLL_JOB_JR;
For &J = 1 to &COLL_JOB_JRCol.Count
&COLL_JOB_JRItm = &COLL_JOB_JRCol.Item (&j);
&COLL_JOB_JRItm.KEYPROP_EFFDT =;

10) How do you login in correction mode in the Component Interface?
Get History Items and Edit History items property to should be set to true.
Get History Items alone: - Update display all - modes will be used.



PEOPLECODE



What is component processor?
The Component Processor is the PeopleTools runtime engine that controls processing of the
application from the time the end-user requests a component from an application menu through the
time that the database is updated and processing of the component is complete.

How does the component processor allocate buffers to hold data?
The component processor starts allocating buffers at occurs level 0 and then works its way down. It
uses the page and record definitions to determine the data it needs. Generally, if there is one field
from the record definition on the page, the entire row will be brought into the buffers. The exceptions
are fields that are in the search dialog box, derived work fields, and related display fields.

How to access the Peoplecode Debugger?
Peoplecode debugger can be used through Application designer. Open the program. Choose Debug,
Enter Debug mode. The local variables watch window opens.
Choose, Debug, View Component buffers. The component buffer pane opens. We can view visible
current line of execution, visible breakpoints. We can also place the cursor on the fields to see their
current value.

What is Win-message built in function?
The Win-message built in function can also be used for debugging. It is used to display an
information message to the user without performing error and warning processing.

What is people code trace?
Peoplecode Trace can also be used for debugging. To turn on the trace, go to PeopleTools, Utilities,
Debug, Trace Peoplecode. We can see number of check boxes to set the detail level of the trace. As
we select a combination of check boxes and click on Save, the system starts creating the trace file.
Add &Trace=y to your browsers URL. All the trace setting options will appear on login page. Using
the Configuration Manager select the check boxes and select Apply. Then log off Peoplesoft and log
back to start the trace.

How many data types we have in people code?
The conventional data types available in previous releases are the core of PeopleCode functionality. The object data
types are used to instantiate objects from the PeopleTools classes. The appropriate use of each data type is
demonstrated where the documentation discusses PeopleCode that uses that data type.
PeopleSoft recommends that you declare your variables before you use them.
In this section, we discuss the following topics:
Conventional data types.
Object data types.
Conventional Data Types
ANY
When variables and function return values are declared as ANY, the data type is indeterminate, enabling
PeopleTools to determine the appropriate type of value based on context. Undeclared local variables are ANY by
default.
BOOLEAN
DATE
DATETIME
FLOAT
INTEGER

Note. The FLOAT and INTEGER data types should be used only where a performance analysis indicates
that the increased speed is useful and an application analysis indicates that the different representations
won't affect the results of the computations.
NUMBER
OBJECT
STRING
TIME
Object Data Types
For most classes in PeopleTools, you need a corresponding object data type to instantiate objects from that class.
The following are the data buffer access types:
Field
Record
Row
Rowset
The following are the page display types:
Grid
GridColumn
Page
The following are the Internet Script types:
Cookie
Request
Response
The following are the miscellaneous object types:
AESection
Array
File
Interlink
BIDocs

Note. BIDocs and Interlink objects used in PeopleCode programs run on the application server can only
be declared as type Local. You can declare Interlinks as Global only in an Application Engine program
JavaObject
Note. JavaObject objects can only be declared as type Local.
Message
OptEngine
ProcessRequest
SoapDoc
SQL
SyncServer
TransformData
Note. TransformData objects can only be declared as type Local

XmlDoc
XmlNode

Note. XmlNode objects can only be declared as type Local.

API Object Type
The API object type has some additional considerations.
Use this data type for any API object, such as a session object, a tree object, a Component Interface, a
PortalRegistry, and so on.
The following ApiObject data type objects can be declared as Global:
Session
PSMessages collection
PSMessages
All Tree classes (trees, tree structures, nodes, levels, and so on.)
All Query classes
All other ApiObject data type objects must be declared as Local .

How many types of variables are there in peoplecode?
4 types of variables are there
local
global
component
system

What is the scope of variables, local, global, component, derived work field, system?
Local: local variables created automatically by assigning a value to the variable. We can declare anywhere with in a
people code program
Global variables: To use these variables we must declare it at the beginning of the program. Once declared it can be
referenced the operator logs off peoplesoft. Only comments or other declarations are allowed top of these
declaration. These variables should be used to transfer values between components only.

At what time system varaiable are created?
System variables are automatically created when an operator logs on to peoplesoft.

Where we can declare variables?
We can declare variables in any peoplecode event

PeopleCode supports how many types of functions?
PeopleCode supports the 2 types of functions:
i. Built-in Functions:
Declaration is not at all required for built-in functions, and we can call directly.
Built-in functions are divided into different types based on their purpose.
ii. User-Defined Functions
We have 3 types of User-Defined Functions.
Internal PeopleCode Functions: Peoplecode common routines contained within the same program
where they are used. These functions are defined by the Function statement. Declaration is not at all
required for Internal PeopleCode Functions. Internal PeopleCode Functions are defined within the
program from which program we are calling the function.
External PeopleCode Functions: Peoplecode functions contained in a different program from where
they are used. These functions are defined by the Declare Peoplecode statement in the programs
where used. Declaration is required to call this function. External PeopleCode functions are defined
outside the calling program. Most External PeopleCode functions are stored on record definitions
called function libraries.
External non-PeopleCode Functions: Common routines written in C or another language and loaded
from a DLL. These are defined by the PeopleCode Declare Library statement. Declaration is required
to call this function, External non-PeopleCode Functions are stored in external libraries. And the
convention is, place the all external functions in the Field Formula
Event

How you declare a function?
Internal peoplecode functions: In this peoplecode identifies function by the Function statement.Each
function must end with a corresponding End-function

Syntax: Function (,)
Statement
Statement
End-function
External peoplecode functions: By using Declare function statement at the beginning of the program.

Syntax: Declare function peoplecode field formula;
The keyword peoplecode identify the function as an external peoplecode function. Once an external people code
function is declared in a program it can then be called multiple times.

External Non peoplecode functions: A common c++ routine that is loaded from a DLL. It defines by
a Declare statement with the keyword library.

What is a Rowset, row, record, field object?
Rowset: It is a data structure used to describe hierarchical data. It is made up of a collection of rows.
It can contain all of the scrolls data. A level 0 rowset contains all the data for the entire component.
A rowset contains one or more rows.A rowset can contain the entire contents of a Component Buffer, or
the contents of any lower level scroll plus all of its subordinate buffer data.

Row: Row represents a single row in a component scroll. A row contains one or more records or
child rowsets.
Record: Record is a single instance of data within a row and is based on a record definition. A
record contains one or more fields.
Field: Field is a single instance of data within records and is based on a field definition.

What is a class and an object?
A class is the formal definition of an object and acts as a template from which an instance of an
object is created at runtime. The class defines the properties of the object and the methods used to
control the object's behavior. PeopleSoft delivers predefined classes (such as Array, File, Field, SQL,
and so on.) You can create your own classes using the Application Class.
An object is a data structure in the memory. An instance of an object is created from its class.

In how many ways an object can be instantiated?
There are 3 ways to instantiate and object-
Createxxx built in functions- create an empty data structure in the data buffer.
Getxxx built-in functions- creates a data structure that refer to already existing data in the buffer.
Getxxx methods- Create a child object of the parent object executing the method.

What is SQLExec?
The SQLExec function executes a SQL command from within a PeopleCode program by passing a
SQL command string. We can use SQLExec with insert, delete, update commands to modify data in
tables that have not been loaded into the component buffer. If you want to delete, insert, or update a
single record, use the corresponding PeopleCode record object method.
If you want to delete, insert, or update a series of records, all of the same type, use the CreateSQL or
GetSQL functions then the Execute SQL object method.
Syntax: SQLExec (SQL statement, );

What is Limitation of SQLExec SELECT Statement?
SQLExec can only SELECT a single row of data. If your SQL statement (or your
SQL.sqlname statement) retrieves more than one row of data, SQLExec sends only the first row to
its output variables. Any subsequent rows are discarded. This means if you want to fetch only a
single row, SQLExec can perform better than the other SQL functions, because only a single row is
fetched. Another limitation is that PeopleTools wont maintain quoted literals. It means if any
changes are made to definitions that are referenced in a SQLExec quoted literal, Peoplesoft cannot
apply the changes to the code. If you need to SELECT multiple rows of data, we can use SQL class.
First a SQL object has to be instantiated using the CreateSQL built-in function
SQLExec statements that result in a database update (specifically, UPDATE, INSERT, and
DELETE) can only be issued in the following events:
SavePreChange, WorkFlow, SavePostChange, FieldChange
Remember that SQLExec UPDATEs, INSERTs, and DELETEs go directly to the database
server, not to the Component Processor (although SQLExec can look at data in the buffer using
bind variables included in the SQL string). If a SQLExec assumes that the database has been
updated based on changes made in the component, thatSQLExec can be issued only in the
SavePostChange event, because before SavePostChange none of the changes made to page data
has actually been written back to the database.
Syntax: Local SQL &SQL (declaring the SQL object from SQL class)
&SQL= CreateSQL (SQL statement, );


What is the fetch method?
The fetch method can be used to retrieve the next row from the cursor. Fetch takes as its
argument the output variables to receive values from the Select.

What is SQLdefinition?
SQL definition- A SQL definition is an Application Designer definition that is used to store and
maintain a SQL statement. We can create the SQL definition using the application designer and
edit the SQL in SQL editor. Benefits of SQL definition- Reusable, Upgradeable, platform
independent, Validated.
To reference a SQL definition, you will instantiate a SQL object with the GetSQL built-in
function.
Syntax: GetSQL (SQL. sqlname, , );
SQL.sqlname is the name you gave the definition when it was saved.
Use CreateSQL(SQL string) when you are passing a text string to your SQL object.
Use GetSQL (SQL.sqlname) when you are getting the SQL from a SQL definition.

In which peoplecode events we can place SQLExec updates, deletes and inserts?
FieldChange
SavePreChange
WorkFlow
SavePostChange

Peoplecode Events:
SearchInit- This event is performed before the search page is displayed to the user. Its a way to
control processing before the user enters any value in the search page. Placed on search record
field or component search record.
SearchSave- This event is performed when the user clicks on the search button in the search
dialog. Error and warning messages can be placed on this event to prompt the user to enter at
least one value in the search dialog. Placed on the search record or component search record.
RowSelect- This event is performed as the component processor reads data into the buffer. This
peoplecode can prevent the component processor to load any specific data into the component by
using the DiscardRow and StopFetching functions. Placed on record field or component record.
PreBuild- This event is performed once before the rest of the component build events. It can be
used to hide or unhide pages and to set component variables. It can also be used to validate data
entered in the search page. Placed on a component.
FieldDefault- This event is performed when a field has no value. It is used to set the default
value to the field. Placed on record field or component record.
FieldFormula- After the FieldDefault is performed successfully, FieldFormula is performed.
But it increases the performance overhead as it processes unconditionally every time the page is
displayed. Now this event is used to store the web function libraries. Placed on a record field.
RowInit- This event is performed for every new row encountered by the component buffer. It is
used to control the initial appearance of the fields. Placed on record field or component record.
PostBuild- This is performed after the component processor builds the page and before the page
is displayed to the user. It is used to hide or unhide pages and set component variables. Placed
only on the component.
Activate- This is performed when the page is displayed to the user. This is the only page event.
It occurs each time the user selects a page. Placed on a page.
FieldEdit- This is performed once the value of the field is changed and the new value satisfies
the system edits. It is used to validate the new value of the field. Error and warning messages can
be placed. Placed on record field or component record.
FieldChange- After the FieldEdit is performed successfully, this event is performed but it is not
used for validation. It is used for any additional processing based on the new value of the
changed field. Placed on record field or component record.
RowInsert- This is performed when the user inserts a new row in the scroll. Placed on record
field or component record.
RowDelete- It occurs when a row is deleted from the scroll. Error and warning messages can be
placed to prevent the user to delete any row. Placed on record field or component record.
SaveEdit- It is performed once the user tries to save the component. It is used to validate data
before it is updated on the database. This applies to all the rows of data and all pages in the
component. Placed on record field and component record.
SavePreChange- It occurs after the SaveEdit is performed successfully. It provides one last
chance to manipulate data before the database is updated. Placed on record field, component
record or component.
WorkFlow- It occurs when a component is saved. Use Workflow to trigger a business
event. Workflow PeopleCode is not field-specific: it triggers PeopleCode on all fields and on all
rows of data in the component buffer. Placed on record field, component record or a component.
SavePostChange- After SavePreChange completes successfully, and the component processor
issues the SQL statement to update the database, SavePostChange peoplecode is applied. It
occurs after the system updates the database. Code in this event is used to update the data not in
the buffer but in the database. Placed on record field, component record or component.
ItemSelected- The ItemSelected event fires whenever the end-user selects a menu item from a
pop-up menu. In pop-up menus ItemSelected PeopleCode executes in the context of the page
field from where the pop-up menu is attached, which means that you can freely reference and
change page fields, just as you could from a pushbutton. This event and all its associated
peoplecode will not fire if run from a component interface.
ItemSelected PeopleCode is only associated with pop-up menu items.
PrePopup- The PrePopup event fires just before the display of a pop-up menu.
You can use PrePopup PeopleCode to control the appearance of the Pop-up menu. This event
and all its associated peoplecode will not fire if run from a component interface.
PrePopup PeopleCode can be associated with record fields and component record fields



Record Field Component Record
Field
Component
Record
Component Page Menu
FieldChange FieldChange RowDelete PostBuild Activate ItemSele
Record Field Component Record
Field
Component
Record
Component Page Menu
FieldDefault
FieldEdit
FieldFormula
PrePopup
RowDelete
RowInit
RowInsert
RowSelect
SaveEdit
SavePostChg
SavePreChg
SearchInit
SearchSave
Workflow
FieldDefault
FieldEdit
PrePopup
RowInit
RowInsert
RowSelect
SaveEdit
SavePostChg
SavePreChg
SearchInit
SearchSave
PreBuild
SavePostChg
SavePreChg
Workflow



What are message events?
These events are not considered part of the Component Processor flow, so theyre documented
separately from the majority of PeopleCode events. The following events are associated with
messages:
OnPublishTransform Event
OnSubscribeTransform Event
OnRouteSend Event
OnRouteReceive Event
OnRequest Event
In a message definition, you can associate a PeopleCode program with the message itself and
with each message subscription included in the definition.

Sequence of events firing:

Field level default processing:
Field default

Component level default processing:
Field formula

Search processing in update Mode:
Search Init
Search Save
Search processing in Add Mode:
Row init
Search Init
Field Edit
Field Change
Save Edit
Search Save

Component Build processing in Update Mode:
Row select
Pre build
Row init
Post build
Activate

Component Build processing in Add Mode:
Row init
Post build
Activate

Save processing:
Save edit
Save prechange
Workflow
Save postchange

Row insert processing:
Row insert
Row init
Post build

Field Modification process:
Field edit
Field change

Row select processing:
Row select

Row delete processing;
Row delete

Popup menu display:
Prepopup

Itemselected processing:
Prepopup

Difference between Field Edit and Field Change?
We can write error messages in field edit and we can not write in field change.

Differenct between prebuild and postbuild?
Prebuild: The PreBuild event fires before the rest of the component build events. This
event is often used to hide or unhide pages. It's also used to set component variables.
The PreBuild event is also used to validate data entered in the search dialog, after a
prompt list is displayed
Post Build : The PostBuild event fires after all the other component build events have
fired. This event is often used to hide or unhide pages. It's also used to set component
variables.

What is the Difference between save pre change and save post change?
It provides one last chance to manipulate data before the database is updated.
It occurs after the system updates the database. By using this event we can update the data
directly in the database.

What is Importance of row insert?
To restrict some users to insert new rows into scrolls. It is valid only if the component is
having scrolls (means child records). The program never executes unless there is
scrolls, not valid for 0 level records.

Push button- Push buttons are used to trigger peoplecode programs. The advantage is that the
user determines when the program should be performed by clicking on the push button. A push
button will perform any FieldEdit and FieldChange events where the push button is attached.

The component processor flow changes for which events in add mode?
Search Record and Page display.
Traversing the data buffer- Accessing specific data by working through the data buffer
hierarchy is known as traversing the data buffer. We can traverse the data buffer from the top
down, starting from level 0 rowset and working the way down to a specific field.
Step 1: Declare the data buffer objects
Component Rowset &RS_level0, &RS_level1;
Component Row &Row_level0, &Row_level1;
Component Record &Record;
Component Field &Field;
Step 2: Get the level 0 rowset and level 0 row
&RS_level0 = Getlevel0();
&Row_level0 = &RS_level0.GetRow(1);
Step3: Get the level 1 rowset
&RS_level1 = &Row_level0.GetRowset(SCROLL.Empl_Checklist);
Step 4: Get the level 1 row
&Row_level1 = &RS_level1.GetRow(2);
Step 5: Get the level 1 record
&Record = &Row_level1.GetRecord(Record.Empl_Checklist);
Step 6: Get the level 1 field
&Field = &Record.GetField(Field.Briefing_status);
Traversing multiple occurs level-
Rowset &RS_level0 = Getlevel0();
Row &Row_level0 = &RS_level0(1);
Rowset &RS_level1 = &Row_level0.GetRowset(SCROLL.Empl_Checklist);
For &I = 1 To &RS_level1.ActiveRowCount
Row &Row_level1 = &RS_level1(&I);
Rowset &RS_level2 =
&Row_level1.GetRowset(SCROLL.Empl.Chklst_Itm);
For &J = 1 To &RS_level2.ActiveRowCount
Row &Row_level2 = &RS_level2(&J);
Record &Record = &Row_level2.Empl_Chklst_Itm;
Field &Field = &Record.Briefing_status;
End For;
End For;
Using Shortcut-
&Field = GetLevel0()
(1).Empl.Checklist(1).Empl_Chklst_Itm(1).Empl_Chklst_Itm.Briefing_status;
Traversing the Data Buffer Hierarchy Example
Suppose you want to access the BRIEFING_STATUS field at level 2 of the following page:
The first thing to ask is where is your code running? Where are you starting from? For this
example, the code is starting at a field on a record at level 0. However, you do not always have to
start at level 0.
After you start with level 0, you must traverse the data hierarchy, through the level 1 rowset, to
the level 2 rowset, before you can access the record that contains the field. Here's the hierarchy
again:
A rowset contains one or more rows, a row contains one or more records and zero or more
child rowsets, and a record contains one or more fields.

Rowset
You first obtain the level 0 rowset, which is the PERSONAL_DATA rowset. However, you do
not need to know the name of the level 0 rowset to access it.

&LEVEL0 = GetLevel0();


Rowsets Contain Rows
The next object to get is a row. As this code is working with data that is loaded from a page,
there will only ever be one row at level 0. However, if you have rowsets that are populated with
data that is not based on Component Buffers (for example, an Application Message) you may
have more than one row at level 0.

&LEVEL0_ROW = &LEVEL0(1);

Rows Can Contain Child Rowsets
We need to get to the level 2 rowset. To do that, we need to traverse through the level 1 rowset
first. Therefore, the next object we want to get is the level 1 rowset.

&LEVEL1 = &LEVEL0_ROW.GetRowset(SCROLL.EMPL_CHECKLIST);

Rowsets Contain Rows
If you're traversing a page, the first thing to always do after you get a rowset is to get the
appropriate row. Because we want to process all the rows of the rowset, we set this up in a loop.

For &I = 1 to &LEVEL1.ActiveRowCount
&LEVEL1_ROW = &LEVEL1(&I);
. . .
End-For;

Rows Can Contain Child Rowsets, Rowsets Contain Rows
We need to traverse down another level in our page structure. This means accessing the second
level rowset. Then we need to access the rows in the second level rowset, in another loop.
Because we're processing all the rows at the level 1, we're just adding code to the previous For
loop. As we're processing through all the rows at level 2, we're adding a second For loop. The
new code is in bold.

For &I = 1 to &LEVEL1.ActiveRowCount
&LEVEL1_ROW = &LEVEL1(&I);
&LEVEL2 =&LEVEL1_ROW.GetRowset(SCROLL.EMPL_CHKLST_I TM);
For &J =1 to &LEVEL2.ActiveRowCount
&LEVEL2_ROW =&LEVEL2(&J );
. . .
End-For;
End-For;

Rows Contain Records
Rows also contain records. In fact, a row will always contain a record, and may contain only a
child rowset, depending on how your page is set up. GetRecord is the default method for a row,
so all you have to specify is the record name.
Because we're processing all the rows at the level 2, we're just adding code to the previous For
loops. The new code is in bold.

For &I = 1 to &LEVEL1.ActiveRowCount
&LEVEL1_ROW = &LEVEL1(&I);
&LEVEL2 = &LEVEL1_ROW.GetRowset(SCROLL.EMPL_CHKLST_ITM);
For &J = 1 to &LEVEL2.ActiveRowCount
&LEVEL2_ROW = &LEVEL2(&J);
&RECORD =&LEVEL2_ROW.EMPL_CHKLST_I TM;
. . .
End-For;
End-For;

Records Contain Fields
Records are made up of fields. GetField is the default method for a record, so all you have to
specify is the field name.
Because we're processing all the rows at the level 1, we're just adding code to the previous For
loops. The new code is in bold.

For &I = 1 to &LEVEL1.ActiveRowCount
&LEVEL1_ROW = &LEVEL1(&I);
&LEVEL2 = &LEVEL1_ROW.GetRowset(SCROLL.EMPL_CHKLST_ITM);
For &J = 1 to &LEVEL2.ActiveRowCount
&LEVEL2_ROW = &LEVEL2(&J);
&RECORD = &LEVEL2_ROW.EMPL_CHKLST_ITM;
&FI ELD =&RECORD.BRI EFI NG_STATUS;
/* Do processing */
End-For;
End-For;

Using Shortcuts
The previous code is the long way of accessing this field. What if you wanted to use all the
shortcuts, and access the field in one line of code? Here it is! The following code assumes all
rows are 1.

What is current context?
Referencing that portion of the data buffer on which a program is executing is referred to as
current context. Most PeopleCode programs run in a current context. The current context
determines which buffer fields can be contextually referenced from PeopleCode, and
which row of data is the "current row" on each scroll level at the time a PeopleCode
program is running.

Can we update the table, which is not in component buffer?
Yes
Data Buffer methods-
Sort method- Using the sort rowset method, it is possible to sort the rows within the rowset
based on custom criteria.
Syntax- &Rowset = GetRowSet (SCROLL.);
&RowSet.Sort (, A | D [, A | D])
Select method- This method is used to select the rows into a rowset from the select record. The
select method is used only with rowsets that reference the component buffers, instantiated using
the GetRowSet method or function.
Syntax- &RowSet.Select (RECORD.selrecord, where [,]);
Fill method- This method is used to fill the rowset which does not reference the component
buffers. It is used with standalone rowsets instantiated using the CreateRowSet function.
Syntax- Fill (where.. , );
Flush method- It is used to remove the rows from the buffer before using a Select to bring new
rows in. It clears all the rows from the buffer without deleting them from the database.

What are think time functions? What are they?
Think time functions suspends action or processing until the user has taken some action.(such as
clicking ok button in message box).
Do cancel
Do model
Do model component
Exec (when synchronous)
File attach functions
Insert image

We should not write these functions in following events:
Save prechange
Workflow
Row select
Save postchange

What is the difference between functions and procedures?
Functions returns a value, procedures not return any value, package is the combination of
functions and procedures

What is Data Buffer?
Data buffer contains multiple component data.

What is a Component Buffer?
Component buffer contains active component data.

What data stores in Component buffer?
Only search record fields are available, If we put one non search key value in 0 level then all
levels data will available.
All field values of level 0record are available
Primary record fields are available
Derived work record placed on a component is available
Declared translate fields are available

Ways of debugging in 2 tire and 3 tire
Debugging in two-tier connections involves connecting directly to the database, not through the
application server. Use this method to debug two-tier Windows applications.
Use three-tier debugging to debug three-tier Windows applications and PIA applications. For
three-tier debugging, use PSADMIN to make sure that the following items are set.
The appropriate PSDBGSRV Listener Port is specified in the PeopleCode Debugger
section of PSADMIN.
At least two PSAPPSRV processes configured to boot in the domain with the Service
Timeout parameter set to 0 (zero).
You indicate y for Yes at the "Enable PSDBGSRV Server Process" prompt at
the end of the PSADMIN interface.
You set these parameters as you configure or create a domain

Tell me few peoplecode functions you worked with?
Hyde
Unhyde
Grey
Ungrey
Substring
Sql execute
All
None
Win message
Win escape
Fetch value
%page
%component
Msgbox
Setlable,
Get field lable
Row count
Active Row count
Field changed
Get rowset
is changed
discord row
prior value
get sql
create sql.




Difference Between Get Record and Create Record?
CreateRecord creates a freestanding record definition and its component set of field
objects. The specified record must have been defined previously, that is, it must have a
record definition. However, if you are calling this function from PeopleCode associated
with a page, the record does not have to be included on the current page.
This function returns a record object that references a new record buffer and set of fields.
EX: Local Record &REC2;

&REC2 = CreateRecord(RECORD.OPC_METH);

GetRecord creates a reference to a record object for the current context, that is, from
the row containing the currently executing program. GetRecord returns a record object.

The following code:
&REC = Get Record ();
Is equivalent to:
&REC = GetRow().GetRecord(Record.recname);
Or
&REC = GetRow().recname;

What is CreateSQL and GetSQL and how they differ with SQL EXEC?
The GetSQL function instantiates a SQL object and associates it with the SQL definition
specified by sqlname. The SQL definition must already exist, either created using PeopleSoft
Application Designer or the StoreSQL function.
Processing of the SQL definition is the same as for a SQL statement created by
the CreateSQL function.
The CreateSQL function instantiates a SQL object from the SQL class and opens it on the
given sqlstring and input values.sqlstring is a PeopleCode string value giving the SQL statement.
Any errors in the SQL processing cause the PeopleCode program to be terminated with an error
message.
You can use CreateSQL with no parameters to create an empty SQL object that can be
used to assign properties before being populated and executed.


HOW WE ACCESSS THE RECORD IN LEVEL 2?

HOW WE ACESS THE DATA ON SECONDARY PAGE WHICH IS ON LEVEL 3?


WHAT IS THE IMPORTANCE OF ROWINIT, ROWSELECT & FIELD CHANGE? IS
THERE ANY RELATION SHIP B/W THESE EVENTS?




HOW WE DISPLAY THE SECONDARY PAGE BY USING PEOPLECODE FUNTION
By using DoModel function we can display secondary page


HOW CAN WE OPEN DIFFERNET COMPONENT IN A NEW WINDOW BY CLICKING
OF A HYPERLINK?
Yes
HOW WE KNOW WE ARE IN CURRENT PAGE?
%Page

IF WE ARE RUNNING AE PROGRAM THROUH ONLINE PAGE CAN WE USE
COMPONENT BUFFER DATA IN AE PEOPLECODE?

IF AN ERROR OCCURS IN SAVE POST CHANGE PEOPLECODE WILL THE DATA
MODIFIED BY THE USER IN COMPONENT BUFFER UPDATES IN DATABASE? WHY?
No it will not update the database

If there is same Component X in two different menus, menu1 and menu2 and if u want to assign
a different search record for each menu, then which peoplecode function do u use and where do u
write the code?

Explain with an example, where you used peoplecode extensively?

What is File Clause?

Difference between component rec field events and record field events?

From Level 1 how can we access level 2 3
rd
row record field?

Can you assign values to a table, which is not in a Component Buffer?

How can you get a different component by clicking the hyperlink on a page? How can you open
a different component in a new window by clicking on a hyperlink?

Tell me component buffer and scroll buffer functions

What is the scope of variables local global derived work field and system

Some Meta strings

If you are running AE through online page can you use component buffer data in ae peoplecode

Data mover commands

Das könnte Ihnen auch gefallen