Launching Programs
Ā
Once you have compiled your program, you are ready to launch it as a browser application.Ā You can launch it as an anonymous program, or you can require users to sign in to establish a session before calling the program.
Launching an Anonymous Program
To launch an anonymous program, you must first register it.Ā In the Visual Designer, select Launch ā Maintain Anonymous Programs.Ā Specify library/program, click Add, and then click OK.
Next, select Launch ā Launch Anonymous Program.Ā Type in the program and library name, and then click Launch.
Your program will launch in a new browser window or tab.
Note: If you created a CL program to setup the library list and call your RPG program, you must specify the name of the CL program here, instead of the RPGLE program.
Note: Anonymous Programs can also be configured by directly editing a database file. This is useful for production and QA systems that do not have a visual designer. Details here.
Launching a Session
In order to have users sign in through a session, you must specify an initial program for them.Ā This can be done individually for each user, or by providing a default program for all users.Ā In the visual designer, select LaunchĀ ā Maintain Initial Programs from the ribbon.
In the top section of the dialog, specify the default program for all users.Ā You can override the initial program for each specific user, in the editable grid, at the bottom of the dialog.
After specifying initial programs, you can start a session by selecting LaunchĀ ā Launch Session from the ribbon.Ā A new Profound UI session will open in a separate browser window or tab.
First, the Profound UI sign on will be displayed.Ā The sign on screen is shipped as a rich display fileā¢ in library PROFOUNDUI.Ā You can customize the look and feel of the sign on screen by opening source member PUISCREENS in file PROFOUNDUI/QDDSSRC using the Profound UI Visual Designer.
Upon successful sign on, the userās initial program is called.
Note: Initial programs can also be configured by directly editing database files. This is useful for production and QA systems that do not have a visual designer. Details here.
Passing Parameters to Initial Programs
To use the parameter interface, weāve implemented query string parameters āpxā and ālxā to indicate the parameter values and lengths. Itās very important that the order of the parameters and lengths match up exactly to the parameter list in your CL or RPG program or youāll get āpointer or parameterā errors when trying to call them. You can pass as many parameters as you like by using p1, l1, p2, l2, etc as many times as you want.
Up to 255 parameters can be passed in this way. 255 is the limit of parameters that an ILE RPG program can receiveā¦
For example, to call an initial program that has a parameter list like this:
PGM PARM(&PARM1 &PARM2 &PARM3)
DCL VAR(&PARM1) TYPE(*CHAR) LEN(50)
DCL VAR(&PARM2) TYPE(*CHAR) LEN(2)
DCL VAR(&PARM3) TYPE(*CHAR) LEN(10)
Use this link (your data values are represented by Xās, fill in your parameter values there):
for an anonymous program, the url would be like this:http://yourServer:8080/profoundui/start?pgm=MYLIBRARY/MYPROGRAM&p1=XXXXXXXXXX&l1=50&p2=XX&l2=2&p3=XXXXXX&l3=10
for the initial program when using basic authentication the url would be like this:http://yourServer:8080/profoundui/auth/start?p1=XXXXXXXXXX&l1=50&p2=XX&l2=2&p3=XXXXXX&l3=10
If you pass fewer characters than specified by the ālā value for a parameter, it will be blank-filled to ālā number of positions. If you pass more characters, the value passed into the program will be truncated to ālā characters.
Only data types that can be represented as characters can be passed. Primarily this is just *CHAR, but positive zoned decimals and dates can be used if needed.
Launching PHP
To launch a PHP script, you must specify a path to it using the controller query string parameter. Ā For example: http://yourServer:8080/profoundui/start?controller=/php/profoundui/helloworld.php
PHP must be enabled (see here). Ā If default settings are used, the above helloworld.php file would be stored in the /www/zendcore/htdocs/profoundui IFS directory.
Launching through Genie
Genie is a browser-based 5250 emulator that can run both Rich Display programs and green-screen programs (refaced on-the-fly). Ā You can start a Genie session with the following URL: http://yourServer:8080/profoundui/genie. Ā A simple CALL, just like you would call any other RPG prorgam, is all that's required to launch a Rich Display program from Genie. Ā For more information about Genie, see here.