If you can see this, the eRPG Software Development Kit (eRPGSDK) HTTP Server has been properly configured for static content.

Standard API Examples: Prototype Descriptions: eRPG SDK Examples:

The Hello example is your standard Hello World application using only the standard API wrappers.

Hello (source)

The prototype descriptions are included here so you can see what service programs and functions are available with the eRPG SDK.

Click on any of the descriptions below to view the prototype definitions and descriptions for the subprocedures included in each service program.

IFS Prototypes

IFS Functions

Date Functions

String Functions

Message Functions

Library List Functions

Standard HTTP Wrappers

eRPG SDK Functions

 

The Hello2 program is a simple example showing how to use the eRPG SDK. First the template is loaded. Next, we replace the value /%time%/ with the current time using the #replaceData() function. We then call the #writeSection() function, and finally the #cleanup() function which does the final writing of the data to the web page and all of the clean up necessary after a program has completed.

Hello2 (source) (template)


The Loop1 program is used to show an example of processing more than one section and looping while replacing data in the repeating section using the #replaceData() function.

The call to #setImmediate(*ON) tells the eRPG SDK to write the results immediatly to the specified output instead of buffering it and writing it on the call to the #cleanup() function.

This program also demonstrates the options available for the location of the created results. The call to #setWriteTo(W_STDFILE) tells the eRPG SDK that the results will be written to both Standard Output and an IFS Stream File. The #openOutFile() function is used to open and create (if it doesn't already exist) the IFS Stream File to hold the results.

Loop1 (source) (template) (generated file)


The Loop2 program is used to show another looping example. In this example we are writing to Stanard Output only and are not writing the contents immediately. Instead, when the #cleanup() function is called, the data is written to the web page.

Loop2 (source) (template)


The Loop3 program is used to show how when using the #writeThisSec() fucntion you do not have to reload the previsouly loaded section.

Loop3 (source) (template)


The Input1 program is used to show how simple it is to read data from a web page form. The first web page displays a form with two input fields. When the file is processed the Input program is called and the data entered into the form is read in and displayed on the web page.

Input1 (source) (template)


The Input2 program is used to show how to use the #setDataCase() functions as well as using optoinal parameters when calling the #getData() function to change the way that the data is returned to the program

Input2 (source) (template)



The Input3 program is a duplicate of Input2 except that is uses the the jQuery .post() function instead of a standard web form POST. It uses the same program and template as Input2. The only difference is in the source for the main page.

Input3 (source) (template)


The Data1 program is used to show how to use the library list functions contained within the F.LIBL service program to manipulate the library list at runtime. This means that accessing data in libraries outside of your eRPG SDK library is as simple as pushing and popping libraries from the library list.

Data1 (source) (template)


The AJAX1 program is a very simple example of using AJAX with the eRPG SDK

AJAX1 (source) (ajax javascript)


The AJAX2 program is a another simple example of using AJAX with the eRPG SDK. This sample lets the user choose how many lines of the PO Detail File (used in the Data1 example) should be displayed on the page.

AJAX2 (source) (template)


The DSPJSON program is used to show how to change the CCSID of the output for Standard Output (StdOut) when outputting applicaion/* data such as JSON.  Because the Content-Type is not text/* for JSON data and is instead application/json the HTTP server will not automatically convert the output to EBCDIC.

DSPJSON (source) (header) (jsonfile)

The Catalog Shopping Application is used to show a nearly complete shopping type application including a shopping cart and customizable catalog displays. The source and template for each piece of this application is listed below.

In this application you can sign up creating a new profile to shop with or you can use the current profile that I have set up using a user of "test" and a password of "erpgsdk". If this application is updated to send email messages, I have set up the email address to be erpgsdk@dodgeit.com. You can check email messages by going to dodgeit.com.

Catalog Shopping Application

Catalog Shopping Application Files View View
Add to Shopping Cart Source Template
Display Shopping Cart Web Page Source Template
Shopping Cart (SSI) Source Template
Display Catalog List Source Template
Display Main Catalogs (SSI) Source Template
Display Subcatalogs (SSI) Source Template
Process Sign On Source Template
Process Sign Up Source Template
Display Header (SSI) Source Template