0% found this document useful (0 votes)
130 views

App Engine

Application Engine is a PeopleTool that allows developers to create background SQL processing programs as an alternative to writing COBOL or SQR programs. It executes SQL statements and PeopleCode defined in Application Designer to perform batch processing tasks. Key benefits of Application Engine include its graphical developer interface in Application Designer, integration with the PeopleSoft data dictionary, support for SQL and meta-SQL, effective-dating of program sections, platform flexibility, ability to reuse business logic through PeopleCode and libraries, and ease of upgrading.

Uploaded by

Karthik Srm
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views

App Engine

Application Engine is a PeopleTool that allows developers to create background SQL processing programs as an alternative to writing COBOL or SQR programs. It executes SQL statements and PeopleCode defined in Application Designer to perform batch processing tasks. Key benefits of Application Engine include its graphical developer interface in Application Designer, integration with the PeopleSoft data dictionary, support for SQL and meta-SQL, effective-dating of program sections, platform flexibility, ability to reuse business logic through PeopleCode and libraries, and ease of upgrading.

Uploaded by

Karthik Srm
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

C H A P T E R

INTRODUCTION TO
APPLICATION ENGINE

Overview
Application Engine is a PeopleTool designed to help you develop background SQL
processing programs. Use of this tool is intended for developers with knowledge of SQL,
SQL tools and PeopleTools.
Application Engine offers you an alternative to writing COBOL or SQR programs for
background SQL processing. Application Engine does not generate, parse, or understand
SQL. It merely executes SQL that you provide. This can be SQL you write as part of an
application, or SQL that has been generated by tools such as Query.

Objectives
By the end of this chapter, you will be able to:

Describe the major features and benefits of Application Engine.

Execute an Application Engine program.

PEOPLESOFT PROPRIETARY AND CONFIDENTIAL

INTRODUCTION TO APPLICATION ENGINE

1-1

APPLICATION ENGINE

JUNE 2002

What is Application Engine?


Using the Application Engine, you create applications that perform background SQL
processing against your data. Application Engine is used for batch processing where you
have a large (or small) amount of data that needs to be processed without user
intervention. It provides you an alternative to writing COBOL or SQR programs.
In the realm of Application Engine, a program is a set of SQL statements, PeopleCode,
and Program Control Actions (that allow looping and conditional logic) defined in
Application Designer that performs a business process. You can use Application Engine
for straight, row-by-row processing, but the most efficient Application Engine programs
are written to perform set-based processing.
Application Engine does not generate SQL, attempt to understand SQL or parse SQL. It
merely executes the SQL that you provide. This can be SQL that you write within the
Application Engine, or SQL that has been generated by another tool, such as Query.
Application Engines execution component is written in standard C++ and is part of
and maintained byPeopleTools. This executable program is called PSAE.exe. It
interprets and executes your requests for processing that you have defined and written as
your Application Engine program. You build your program with the Application
Designer graphic developer interface and the program is stored in PeopleTools tables.

Application Engine Advantages


There are many benefits to developing a program using Application Engine, instead of
COBOL or SQR. These are summarized below.

Graphical Developer Interface


With PeopleSoft 8, Application Engine is now fully integrated with PeopleTools. This
means that you use the Application Designer, an intuitive graphical interface, to create
your Application Engine program.
The Application Designer offers Application Engine developers the following benefits:

1-2

Easy access to the new PeopleCode and SQL editors.

Two views of your program. The Definition view is where you create and modify
your programs. The Program Flow view allows you to see the actual order in which
your program will execute the statements.

INTRODUCTION TO APPLICATION ENGINE

PEOPLESOFT PROPRIETARY AND CONFIDENTIAL

JUNE 2002

APPLICATION ENGINE

Encapsulation
Unlike applications developed using COBOL or SQR, Application Engine programs
reside completely within your database. With Application Engine, you do not have to
compile your programs, there are no statements to store, and there is no need to directly
interact with the operating environment you use.
You can develop your entire program from scratch, including the table definitions, all
within the Application Designer, and then you can run and debug your applications
without exiting PeopleTools.

Data Dictionary Integration


Application Engine is designed to anticipate changes in field attributes. With Application
Engine, developers enjoy the freedom of changing meta-data as needed thanks to the
PeopleTools data dictionary. One of the cornerstones of PeopleSoft functionality is the
Application Designer. Because of the way it works, most field attributes, such as type,
length, and scale, only need to be specified once, and that change will be reflected
globally. If the same field appears on more than one record, you know that the same
attributes reside in each record definition. If you needed, there are attributes you can
override at the record level, such as a default value or whether a field is a key and so on.
For the most part, these global definitions allow a developer to change the database to
meet the sites current needs and then ALTER the affected tables, as needed. Although
some cosmetic changes to pages might be required in some cases, typically, no
PeopleCode program changes are required.
Because Application Engine works in harmony within the PeopleSoft system and
references the data dictionary for object definitions, changes to meta-data in the database
have no impact on Application Engine programs.

PEOPLESOFT PROPRIETARY AND CONFIDENTIAL

INTRODUCTION TO APPLICATION ENGINE

1-3

APPLICATION ENGINE

JUNE 2002

Enhanced SQL/Meta-SQL Support


You can write your SQL within Application Engine, or you can copy SQL statements
into Application Engine from any SQL utility with few, if any, changes. This way you
can write and tune your SQL statements before you try to incorporate them into an
Application Engine program. In fact, you may find yourself spending more time
developing in an external SQL utility, and then cutting and pasting your SQL into the
corresponding Application Engine Actions.
RDBMS platforms have many differing syntax rules-especially in regard to date, time,
and other numeric calculations. For the most part, you can work around this problem
using PeopleSoft meta-SQL, which Application Engine supports. This language is
designed to replace RDBMS-specific SQL syntax with a standard syntax, called metastrings.
For example, if you reference a date field called AE_DATE in a SELECT clause, you
specify it as %DATEOUT(AE_DATE). This meta-string will be resolved to the
appropriate value as required by the current RDBMS platform.
In addition, PeopleSoft meta-SQL has been expanded with functions that let you
dynamically generate portions of your SQL statements. This new meta-SQL is not
supported in COBOL or SQR.
For example, if you wanted to join two tables on their common keys, you could use the
following code:
%Join(COMMON_KEYS, PSAESECTDEFN ABC,

PSAESTEPDEFN XYZ )

At runtime, the function would be expanded into the following:


ABC.AE_APPLID = XYZ.AE_APPLID
AND ABC.AE_SECTION = XYZ.AE_SECTION
AND ABC.DBTYPE = XYZ.DBTYPE
AND ABC.EFFDT = XYZ.EFFDT

A p p en d i x D co n t a in s a l i s t o f t h e A p p l ica t i o n E n g ine s p e c if i c and t he D a te /T im e M e ta


S Q L. P e op l eB o o k s c on t a in s a co m p le te l i s t .

Effective-Dating
Application sections are effective-datedmeaning you can activate/deactivate a section
as of a particular date. This enables you to archive sections as you modify them, instead
of destroying them. In the future if you decide to revert to a previous incarnation of a
section, you can simply reactivate it.

1-4

INTRODUCTION TO APPLICATION ENGINE

PEOPLESOFT PROPRIETARY AND CONFIDENTIAL

JUNE 2002

APPLICATION ENGINE

Platform Flexibility
Even with the use of Meta-SQL, there may still be times when you have to write and
execute different SQL in your Application Engine program, depending on the RDBMS
platform on which you intend your program to run.
In Application Engine, you have the ability to call different versions of a Section for
different platforms, as needed.
You can specify a Section to be one of the following:
Default

This is the common denominator or global


version.

Supported RDBMS platform

DB2, Oracle, Informix, DB2/Unix, Sybase, or


Microsoft.

Most Sections will only have the default version, and, even in cases where you refine a
particular Section for a specific RDBMS, a default version of that Section will also exist.
When Application Engine executes a Section, it will use the version thats specific to the
current database platform if a specific version exists. If there is no RDBMS-specific
version, Application Engine uses the (default) version.
Within platform-specific Sections, you also have the ability to call base portions of SQL
statements by using the %SQL object. This means you can write your generic SQL
portions just once, and then you can reference them from your different platform
versions.
Even if you dont intend to develop platform specific versions, using %SQL is still a
benefit since you can refer to the SQL repository from within Application Engine SQL.
This allows for reusing SQL and dynamic SQL.

PEOPLESOFT PROPRIETARY AND CONFIDENTIAL

INTRODUCTION TO APPLICATION ENGINE

1-5

APPLICATION ENGINE

JUNE 2002

Reuse Business Logic


Application Engine programs can invoke PeopleCode. This means that you can call
common PeopleCode functions from Application Engine. Conversely, PeopleCode can
now invoke an Application Engine program synchronously.
Application Engine Libraries are used to store common routines, stored as callable
sections. These sections can then be called by multiple programs.

Upgrade Support
Since Application Engine program definitions are now defined in and stored as
Application Designer objects, they join the growing ranks of PeopleTools components
that you can easily upgrade using Application Designer.
You can upgrade Application Engine definitions by project, program, or section.
Also, you can insert records and Application Engine programs in the same project. This
means that if you change your record definition, you can put the modified record into a
project, and you can then also include in the project any Application Engine programs
affected by the changealong with affected pages, and so on. Then you upgrade the
entire project all at once. With COBOL and SQR, you have to do the record change then
modify your batch programs using some other mechanism all while making sure to keep
track of what was changed and how and where it affects the batch program. With
Application Engine and PeopleTools, its all taken care of automatically.

Built-In Restart Logic


Within each Application Engine program, you must define how frequently your program
will issue a COMMIT. After doing so, each COMMIT becomes a checkpoint that
Application Engine uses to locate where within a program to restart after an abend.
The restarted Application Engine program locates the last checkpoint, or the last
successfully executed and committed Step, and continues with the processing from that
point. This type of built-in logic does not exist with COBOL or SQR, you would, of
course, need to code it in your programs yourself.
With COBOL or SQR, you would not only have to resolve the issue that caused the error;
you may have to undo what the program processed before the failure. Otherwise, you
may encounter duplicate processing and inaccurate data.
Besides offering the obvious advantage of having built-in restart capability, Application
Engines restart capabilities also affect the design and performance of an Application
Engine program. Having restart functionality allows the developer to commit more often,
without the added burden of coding additional restart logic with every commit. This
reduces the overall impact on other users and processes while the background program is
running.

1-6

INTRODUCTION TO APPLICATION ENGINE

PEOPLESOFT PROPRIETARY AND CONFIDENTIAL

JUNE 2002

APPLICATION ENGINE

Inactivate Courses

Walk Thru

In this course, we will be using some applications that have been set up for the Training
environment. These applications are not part of the PeopleSoft products, but rather just
used for educational purposes.
One of the tables we will be using is the PS_PSU_COURSE_TBL. This table stores
course information. Once a particular course is no longer offered, the status is changed to
Inactive. The Application Engine program that we will be executing will inactivate all
courses for Tools Release 6.

Open Query Analyzer. Start, Programs, Microsoft SQL Server, Query Analyzer.

Enter sa for the password.

Press OK.

Select your database.

Enter the SQL statement shown below.

Execute the statement.

PEOPLESOFT PROPRIETARY AND CONFIDENTIAL

INTRODUCTION TO APPLICATION ENGINE

1-7

APPLICATION ENGINE

JUNE 2002

Running an Application Engine Program


1. Sign on to PeopleSoft in the browser using the User ID PTTRA and the password
PTTRA.
2. Navigate to the run control for Inactivate Rel 6 Courses.
Navigation

Courses

Process Course
Information

Inactivate Rel 6
Courses

Run Control ID:


Training

3. To run the program, click the

1-8

INTRODUCTION TO APPLICATION ENGINE

push button.

PEOPLESOFT PROPRIETARY AND CONFIDENTIAL

JUNE 2002

APPLICATION ENGINE

4. Click OK to execute the program. You will be returned to the run control.
5. Use the Process Monitor hyperlink to check on the progress of your program.

Hopefully your job will be successful. If the program is still processing, use the Refresh
button to update the run status.
6. Click on the Details link.

Details

The message log will display any program messages that were issued.

PEOPLESOFT PROPRIETARY AND CONFIDENTIAL

INTRODUCTION TO APPLICATION ENGINE

1-9

APPLICATION ENGINE

JUNE 2002

The Redirected Terminal Output will display the standard output log for the application
engine program.

View Log/Trace

Redirected
Terminal Output

You will see that a message was sent from the program Process Completed. You will
also see that the program ended normally.
7. Check the database to see that the rows were inactivated.

The Release 6 courses are now inactive.

1-10

INTRODUCTION TO APPLICATION ENGINE

PEOPLESOFT PROPRIETARY AND CONFIDENTIAL

JUNE 2002

APPLICATION ENGINE

Chapter Review
1. List 4 of the benefits of using Application Engine programs for your batch jobs.

2. What is the name of the Application Engine executable and what language is it
written in?

3. Where are Application Engine programs stored?

4. What benefit can be attained by using meta-SQL?

5. What do we mean by "Restart Capability"

PEOPLESOFT PROPRIETARY AND CONFIDENTIAL

INTRODUCTION TO APPLICATION ENGINE

1-11

APPLICATION ENGINE

JUNE 2002

Chapter Key Points

1-12

The Application Engine executable is PSAE.exe and is written in C++.

Application Engine is integrated into the Application Designer to give you a


graphical developer tool.

Application Engine programs are stored in your PeopleSoft database.

Applications can dynamically adjust for changes in record and field definitions
through integration into the PeopleSoft Data Dictionary and meta-SQL, a situation
requiring changes and recompilation of COBOL.

Using meta-SQL your programs can be written to be database platform independent.

Portions of your program are effective-dated so you can activate/deactivate a section


as of a particular date.

Your programs can take advantage of existing business logic in the form of shared
PeopleCode.

You have Upgrade integration for migrating programs to other instances of your
database as well as future release upgrade support.

Application Engine has built in restart capability.

INTRODUCTION TO APPLICATION ENGINE

PEOPLESOFT PROPRIETARY AND CONFIDENTIAL

You might also like