Add Variable Field to Menu

40 pts.
Tags:
AS/400 Display File
AS/400 Menus
CL Program
SNDRCVF
WebFacing Tools
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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?

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    What OS version are you running? Some WebFacing capabilities changed in some later releases. Tom
    125,585 pointsBadges:
    report
  • Bunk
    We are using V5R4 of OS and 7.0 of WebFacing.
    40 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • Bunk
    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 pointsBadges:
    report
  • TomLiotta
    Can you post a copy of a menu? It will be useful to have it for reference for questions. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following