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. |
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.
|
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. 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. The Loop3 program is used to show how when using the #writeThisSec() fucntion you do not have to reload the previsouly loaded section. 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. The Input 2 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 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. 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. 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.
|