profound ui

Use this board to ask questions or have discussions with other Rich Displays users.
John

profound ui

Post by John »

How do I pass a string value to the cl program that I am calling via the http command?
User avatar
Alex
Profound Logic Staff Member
Posts: 233
Joined: Fri Jan 04, 2008 12:10 pm
First Name: Alex
Last Name: Roytman
Company Name: Profound Logic Software
Contact:

Re: profound ui

Post by Alex »

You can pass a series of parameters to your starting CL or RPG program via the query string. You must provide the parameter values and the length of each parameter. Query strings parms p1, p2, p3, etc. provide the values. Query strings parms l1, l2, l3, etc. provide the lengths.

So, for example:
yourbox:8080/profoundui/start.html?pgm=library/program&p1=VALUE1&l1=6&p2=VALUE2&l2=10

This calls a program and passes "VALUE1" as a 6A field, and "VALUE2" as a 10A field.

All parameters are character fields and are passed in as standard *ENTRY parameters to the program.
tcj2001
Profound User
Posts: 40
Joined: Tue Jun 28, 2011 4:55 pm
First Name: Thomson
Last Name: Mathews
Company Name: Chesapeake Energy
Contact:

Re: profound ui

Post by tcj2001 »

I am not able to pass parm to the starting CL, it gives message id PUI0022
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: profound ui

Post by David »

In your applications, are you using anonymous sessions or are you using signed-in sessions with OS/400 profiles?

Alex's example attempts to launch the program in an anonymous session. The PUI0022 error indicates that you have not configured PUI to allow for running this program anonymously.

If you are using signed-in sessions, it's not possible to pass the entry parameters through the PUI sign on program...

However, if you are using at least version 3.0.0, you can pass entry parameters into a signed-in session if you are using the HTTP server authentication.

For that, you can use a URL like this:

/profoundui/auth/start?p1=VALUE1&l1=6&p2=VALUE2&l2=10

This will establish a signed-in session and call the configured initial program, passing the parms.

The difference with using that URL is that you'll get the HTTP server's pop-up sign on dialog, rather than the PUI sign on screen. The parameters can be passed through in this mode.

Using the HTTP server authentication also enables tabbed browsing without the need to sign in more than once per browser session.

Does this help at all? We are currently looking at ways of getting the URL parameters through the PUI sign on program, but we are not yet sure at this point whether it's going to be possible to provide the functionality.
tcj2001
Profound User
Posts: 40
Joined: Tue Jun 28, 2011 4:55 pm
First Name: Thomson
Last Name: Mathews
Company Name: Chesapeake Energy
Contact:

Re: profound ui

Post by tcj2001 »

thanks got that working.

Another problem
Does PROFOUNDUI work with SQLRPGLE programs?, SQL was just used to load data to a grid.

I have a rich display DDS subfile grid, in my SQLRPGLE program I am trying to open a sql cursor and read a file to load the data into the subfile. The program fails with the error SQL7903 When it tries to open the cursor.
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: profound ui

Post by David »

Yes, you can use embedded SQL in PUI programs. Actually PUI doesn't place any restriction at all on what you can/can't do in the RPG.

This particular SQLCOD seems to indicate that the program was not somehow not compiled properly using the IBM SQL pre-compiler.

Are you using IBM OA or are you using PUI's RPG Preprocessor for compiling?

If using IBM OA, compile with CRTSQLRPGI as usual. If you are using PDM options to compile, make sure the member type is properly set to 'SQLRPGLE' so that PDM will select the right command for the member.

Otherwise, if using PUI's RPG Preprocessor, place the /DEFINE PROFOUNDUI in the source code as usual and compile with PUISQLRPGI.

Does this help?
tcj2001
Profound User
Posts: 40
Joined: Tue Jun 28, 2011 4:55 pm
First Name: Thomson
Last Name: Mathews
Company Name: Chesapeake Energy
Contact:

Re: profound ui

Post by tcj2001 »

it worked with PUISQLRPGI command,

I was using 14 option with DEFINE(PROFOUNDUI) on the compile option, i have the pui exit program enabled so that i can use PDM 14 option directly instead of using profound's compile command. It works great with RPGLE program but not with SQLRPGLE
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: profound ui

Post by David »

I understand.

It looks like the exit points are not working for you with SQLRPGLE. We'll check into it to see if we can recreate the problem.

What version of PUI are you using and what OS/400 release?

Until we sort this out, you can certainly work around by calling PUISQLRPGI directly.
tcj2001
Profound User
Posts: 40
Joined: Tue Jun 28, 2011 4:55 pm
First Name: Thomson
Last Name: Mathews
Company Name: Chesapeake Energy
Contact:

Re: profound ui

Post by tcj2001 »

pui 3.0.2 and V7R1
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: profound ui

Post by David »

Thanks. It's very likely an issue with the compile exit points on V7R1.

We don't have any customers using the exit points on V7R1 because the RPG Preprocessor is intended only for production use on systems V5R3 and V5R4.

For V6R1 or higher, you'll need to (except for trial purposes) be using IBM OA for compiles instead.

With IBM OA, the special 'PUIXXXXXX' compile commands are not used -- you just use the normal IBM commands and/or PDM options with no exit points or anything like that.

We will still have our development team look into this, though -- it's nice to be able to use the RPG Preprocessor for evaluation purposes when you don't yet have OA installed...
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest