On Line Help Program – RPGLE

520 pts.
Tags:
AS/400 Parameters
LDA
RPGLE
Hi Is there a way to invoke a program when pressing the F1 key, without adding the Call statement to the program that is doing the calling ? I would also need to pass parameters, or LDA to the program that I would be calling. Thanks, Nick

Answer Wiki

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

Yes, you can do this in your DDS.
You need to look at the IBM Manual — DDS Reference: Display Files
Look at the keyworks that start with HLP
You can define various area on your DSPF that will display different documents.

Discuss This Question: 12  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
  • Piano
    HI That is helpful, but not what I really need to be able to do. I am trying to invoke PGM B, from PGM A, without inserting a call statement in PGM A. In addition, I would like to be able to pass parameters to PGM B, or the LDA, from PGM A. Thanks, Nick
    520 pointsBadges:
    report
  • TomLiotta
    I don't know of a way to define the {help} function in DDS to result in calling a program. Interesting concept. Passing parms would really be tricky. The LDA should work automatically of course, though loading it with anything at the time of pressing {help} would be difficult. What are you needing to do? Why call a program? There might be alternatives. Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    As Tom said There is no way that the DDS "calls" another program. You will have to put the call in your original program. And, as Tom queried, what are the issues? Phil
    51,235 pointsBadges:
    report
  • Piano
    The issue is that I have 100s maybe 1000s of screen programs. For any screen format that exists in any of these programs, I want to add a function key for on line help. This function key will essentially pass the screen name as a parameter, and then do a reade on a file that has all the help notes using the screen name as the key. I don't necessarily need to be calling an external program, if anyone can think of a better way to do this. I am trying to avoid having to add a call statement into everyone of these screen programs. Thanks, Nick Thanks, Nick
    520 pointsBadges:
    report
  • philpl1jb
    Two methods are available One uses Help/ALTHELP/HLPARA/HLPRCD to display an record in the DDS that contains the help screen. In your DDS you would add lines like this repeating the HLPARA and HLPRCD for each record that you want to create help for (CURRCD is an existing record) and then adding a new record with the help for each. ALTHELP HELP H HLPARA( *RCD CURRCD) HLPRCD(NEWRCD) Another built in help method is using PANEL Groups. These allow you to create a screen that looks and feels like OS/400 Help. The panel group contains a help script. Let us know how we can help further. Phil
    51,235 pointsBadges:
    report
  • TomLiotta
    This function key will essentially pass the screen name as a parameter,... The closest I can think you'll come is to put all records with the same "screen name" into a document. Perhaps name each document the same as the "screen name". You would need to change the DDS for each screen to do something to call a program anyway. You might as well just change the DDS to reference a HLPDOC. This is one of the few things that documents and folders are still good for. Tom
    125,585 pointsBadges:
    report
  • CharlieBrowne
    Here is a wild idea. Use the Attn Key. That would start a Group Job. If you not setting this a the USRPRF, you could set it to call a specific program. That program would check the invocation stact of the other original job and determine what program was running. The yo call a new program with that as a parm and then you can go out to your help text table and display the help for that program.
    41,380 pointsBadges:
    report
  • Piano
    Hi I like the idea of using the attention key. How do I get the attention key to call a Group Program ? I don't know what you mean here. Also, how do I get the the program that is currently running (invocation stack). Not familiar with how to do this either. If I could see an example, I think it would be very helpful. Definitely would like to explore this idea. Thanks for your thoughts. Nick
    520 pointsBadges:
    report
  • Piano
    [...] Here’s another group discussion, this time on online help program in RPGLE. The players: CharlieBrowne, TomLiotta, and [...]
    0 pointsBadges:
    report
  • TomLiotta
    How do I get the attention key to call a Group Program ? That's unimportant and generally irrelevant. It would only start a group job if your attention program told it to do so. While it might be helpful, a group job is a complication right now. Also, how do I get the the program that is currently running (invocation stack). Before even thinking to that degree, you probably should just start with seeing what an attention-program does and how it might affect the jobs that it runs in. Technically, we don't know if they're even workable in your environment. If one call be used effectively, the call stack will be reasonable. Here's a trivial beginning:
    pgm
    
    
       monmsg    ( cpf0000 mch0000 ) exec( goto Std_Err )
    
    
       setatnpgm   Qsys/QCMD
    
       go          USER
    
    Exit:
       /* Fall through for exit... */
    Std_Err:
    
       setatnpgm   *PRVINVLVL
       monmsg    ( cpf0000 mch0000 )
    
    
       return
    
    endpgm
    Compile it and call it. You should see that the USER menu appears. You can take any of the menu options or run commands on the command line, e.g., DSPSYSSTS. If you run a command such as DSPSYSSTS, press the
    125,585 pointsBadges:
    report
  • bvining
    Assuming that 1) F1 is currently enabled for the display file record formats (or you can enable it) 2) The application program (A) is not using F1 Then Yes -- a new program (B) could provide online help support without requiring the actual application program (A) to be changed. This help support could, if desired, be field sensitive or generic and tied to the record format being worked with when F1 is used (again with no change to program A). This is not a trivial task, but I have written such programs in the past as a contractor. Bruce Bruce Vining Services
    6,620 pointsBadges:
    report
  • TomLiotta
    Nick: Bruce Vining is someone who can make this work. If it has to be done, he is probably the path to the least cost. Not necessarily 'cheap', just 'least cost'. Other paths will likely have higher costs. 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