40 pts.
 Add Variable Field to Menu
I wanted to add a field to a menu that is not a constant field, but one that may be populated by a CL program. I have a log on program built that asks for a user ID and some identifying information. From that I obtain their personal information. I'd like to be able, at the top of a menu which displays options they can use, to display "Hello, Joe" (as an example, assuming their name is Joe). I tried to solve it by creating a display file (to which I can add variable fields) and using SNDRCVF to display it...along with CL which allows the selected option to execute. The problem is that I truly do not want to use this in a "green screen" environment, but instead to convert it for web usage through IBM's Webfacing tool. We have done this with many menus and it works great...as the options become clickable links. By using the display file (DSPF), the resulting "Webfaced" product does not recognize the options and hence there are no links generated.  I determined I could add a field of pretty much any type to a menu (MNUDDS) object thorugh using CODE (rather than SDA), but the question is...how can I populate this variable with a value in CL and get it to display on the menu?. Any ideas?

Software/Hardware used:
iSeries
ASKED: April 25, 2011  6:16 PM
UPDATED: May 25, 2011  4:21 PM

Answer Wiki:
You can add a message field to the menu. According to the help: <quote> "Type +M(nn) to create a message constant field of length nn. Note: You will be prompted for the message identifier and the message file from which the first nn characters of test are to be extracted. Type a question mark (?) in the attribute position of the message constant to look at or change the message identifier and the message file." </quote> It's not the most elegant way to do this, but it may work. If you are moving to web pages, why not use something like CGIDEV2, RPGsp or WebSmart?
Last Wiki Answer Submitted:  May 25, 2011  4:21 pm  by  Teandy   0 pts.
All Answer Wiki Contributors:  Teandy   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

What OS version are you running? Some WebFacing capabilities changed in some later releases.

Tom

 108,055 pts.

 

We are using V5R4 of OS and 7.0 of WebFacing.

 40 pts.

 

The problem is that I truly do not want to use this in a “green screen” environment, but instead to convert it for web usage through IBM’s Webfacing tool.

Why is that a problem? This ought to be possible at V5R4. When you convert the DSPF for WebFacing, what shows up? You may need to end and restart the WebFacing server.

Is the problem that menu options aren’t clickable links? Or is it that the “Hello, Joe” fields aren’t handled as you need? (Both?)

Tom

 108,055 pts.

 

The “Hello, Joe” message is fine. The problem is that the menu options are not clickable links. When I say “problem’, I guess I mean that it is something which is different than what I’m used to seeing. We typically convert menus (MNUDDS) objects which have reated “QQ” MNUCMD files;;.whereas this DSPF uses options coded into CL with “SELECT…WHEN”.

 40 pts.

 

Can you post a copy of a menu? It will be useful to have it for reference for questions.

Tom

 108,055 pts.