|
> -----Original Message----- > From: Don [mailto:dr2@xxxxxxxxxxxx] > Sent: Monday, May 10, 2004 11:21 AM > To: COBOL Programming on the iSeries/AS400 > Subject: RE: [COBOL400-L] Helptext on AS/400? > > Terry, > > why not post an example...it'll be good to have one or 2 in the > archives... > > Don in DC Good idea Don! Here's a simple example. It requires creation of a PNLGRP and modification of the DSPF source. For the DDS changes you need to insert the following three keywords HLPTITLE, ALTHELP and HELP as shown at the top of your DDS. Then on the record format you add the HLPPNLGRP and HLPARA keywords. In this example the help area starts at line 1, column 1 and ends at line 23 column 79 - in other words, the whole screen. Note that the HLPPNLGRP has the name of the panel group (CX001H) and the name of the help tag ('CX001I'). *---------------------------------------------------------------* DSPSIZ(24 80 *DS3) INDARA PRINT HLPTITLE('Cardex Inquiry Help') ALTHELP(CA01) HELP CF03(03 'Exit') R MYSCREEN H HLPPNLGRP('CX001I' CX001H) HLPARA(01 01 23 79) The following is the Panel Group (UIM) for the screen. Note that the HELP NAME tag contains the same name in the HLPPNLGRP keyword of the DDS above. .*--------------------------------------------------------------------* .* Panel Group: CX001H * .* Date Written: 10/03/02 * .* Author: T. Winchester * .* Description: Help Panel group for CX001I to comment a little on * .* the program display logic. * .* * .* Date Who Author's Comments * .* -------- --- ------------------------------------------------ * .* * .*--------------------------------------------------------------------* :PNLGRP. .* .* Start Help... :HELP NAME='CX001I'. :P. Enter a Work Order number and Branch/Plant to display Cardex data on a full-screen. :P. Use the Page-Up and Page-Down keys to move thru the Cardex one transaction at a time. If you see the word "Bottom" in RED, then you've reached the end of the transactions. If you see the word "Top" in RED, then you're at the first transaction for this Order. :P. Note: Entry of "XXXXXX" for a branch will also display any Cardex transactions for Engineering (ENG), or Custom Engineering (CE), etc. -IF- they exist in the Cardex for the requested Work Order. :P. Note for XXXXXXXX users: You will only see your own Cardex entries. :EHELP. .* -End- Help... :EPNLGRP. Here is a slightly more complex example that shows how to use "field sensitive" help. Again, here are the DSPF (DDS) changes required. Note there are many HLPPNLGRP definitions, one for each field on the screen. These must be defined before the actual field definitions in the record format. I haven't listed all the fields here but you should get the idea :) Note that each field has its own "named" tag and begin/ending positions on the screen. In this example I used a complete line of the display so that help would be activated *anywhere* the cursor is positioned on the actual screen line. If you place the cursor on the top line of the display the help panel will show *all* field help - just like OS/400 commands. *---------------------------------------------------------------* DSPSIZ(24 80 *DS3) INDARA PRINT HLPTITLE('TFRSRC Command Help') HLPPNLGRP('UT010I' UT010H) ALTHELP(CA01) HELP CF03(03 'Exit') R M3MAP 99 ALARM H HLPPNLGRP('FMBR' UT010H) HLPARA(04 01 04 79) H HLPPNLGRP('FSRC' UT010H) HLPARA(05 01 06 79) H HLPPNLGRP('TSRC' UT010H) HLPARA(08 01 09 79) H HLPPNLGRP('SYS' UT010H) HLPARA(11 01 11 79) H HLPPNLGRP('SPIN' UT010H) HLPARA(13 36 13 38) H HLPPNLGRP('MBRS' UT010H) HLPARA(16 40 16 79) H HLPPNLGRP('STIM' UT010H) HLPARA(17 01 17 29) H HLPPNLGRP('TIME' UT010H) HLPARA(17 40 17 79) H HLPPNLGRP('ETIM' UT010H) HLPARA(18 01 18 29) H HLPPNLGRP('BYTES' UT010H) HLPARA(18 40 18 79) H HLPPNLGRP('ERRS' UT010H) HLPARA(19 40 19 79) H HLPPNLGRP('MSG' UT010H) HLPARA(22 01 24 79) ¹ *---- 1 2'UT010I' COLOR(PNK) 1 25' Transfer Files/Programs via FTP ' COLOR(WHT) DSPATR(RI) 1 73DATE EDTCDE(Y) COLOR(PNK) 2 2USER COLOR(PNK) 2 73TIME COLOR(PNK) *---- 4 2'Member . . . . . . . . . . . . .' M3FMBR 10A B 4 37 DSPATR(CS MDT) CHECK(LC) 41 DSPATR(PC) 41 COLOR(RED) 4 51'name, generic*, *ALL ' COLOR(BLU) *---- 5 2'From File . . . . . . . . . . .' M3FSRC 10A B 5 37 DSPATR(CS MDT) CHECK(LC) 42 DSPATR(PC) 42 COLOR(RED) 5 51'Source, Physical, *SAVF ' COLOR(BLU) *---- 6 2' Library . . . . . . . . . . .' M3FLIB 10A B 6 39 DSPATR(CS MDT) CHECK(LC) 43 DSPATR(PC) 43 COLOR(RED) Now, here is the actual Panel Group for these first three fields. In addition, the "MSG" help name tag is listed to show some of the things you can do with a "list". .*--------------------------------------------------------------------* .* Panel Group: TFRSRC Command Help * .* Date Written: 12/08/97 * .* Author: T. Winchester * .* Description: Help Panel group for the UT010I display file. * .* * .*--------------------------------------------------------------------* .* Date Who Author's Comments * .*--------------------------------------------------------------------* .* 10/21/98 TMW Increase HELP information to include *SAVF info * .* and the "RUNRMTCMD" peculiarities. * .* * .*--------------------------------------------------------------------* :PNLGRP. .* UT010I overview :HELP NAME='UT010I'. :P. This program transfers files and/or source members between the Production and Test systems. It uses the File Transfer Protocol (FTP) utility that is common all to TCP/IP based systems. :P. Status messages are displayed in WHITE at the bottom of the screen. When the transfer completes sucessfully, it will be indicated here as "FTP Transfer Completed". :P. Note: Member descriptions containing an apostrophe may cause the type and description to be blank on the target system. :P. :EHELP. .*-------------------------------------- :HELP NAME='FMBR'. :H2.FROM Member :P. Enter the specific or generic member name to be transferred. Use the *ALL to transfer -ALL- members of a source/database file. You must use *ALL when sending PHYSICAL files. When a physical file is transferred by this utility, you must _rebuild_ the logical files manually on the target system. Logical files CANNOT be transferred using TFRSRC. :P. Note that it is possible to transfer *SAVF files. Think of these as being like "ZIP" files on a PC. Before transferring them with the *ALL member option, you must (1) Create the Save File (CRTSAVF) on *BOTH* systems, (2) Ensure the QPGMR profile has authority *ALL on the target systems Save File (use EDTOBJAUT) and finally (3) Save objects to the file using SAVOBJ on the *CURRENT* system. Transferring many different kinds of objects using the Save File technique is *much* quicker than using tape (providing you have the disk space for the save file, of course!). :P. :EHELP. .*-------------------------------------- :HELP NAME='FSRC'. :H2.FROM Source File, Library :P. Enter the name of the source/database file and the library in which it resides. In the case of PHYSICAL or *SAVF files, the FROM member must be *ALL! :P. :EHELP. .*-------------------------------------- :HELP NAME='TSRC'. :H2.TO Source File, Library :P. Enter the name of the source/database file and the library on the target system. :P. :EHELP. .*-------------------------------------- :HELP NAME='MSG'. :H2.Function Keys/Messages :P. This area lists available function keys and any status messages. :P. :DL. :DTHD.Key/Msg :DDHD.Description :DT.F3 :DD.Exit the command :DT.FTP Transfer Completed :DD. :DT.Building FTP commands to Transfer Members :DD. :DT.FTP has started :DD. :DT.FTP has ended, preparing to update types :DD. :DT.Sorry, No members found matching input requested :DD. :DT.There were xxxx errors, end this task via SYSREQ,2 now! :DD. :DT.Updating Target Member Types/Descriptions :DD. :DT.Checking FTP output for transfer information :DD. :DT.Retrieving Member Description for xxxxxx :DD. :EDL. :EHELP. .* End of Help :EPNLGRP. None of this UIM code is terribly complicated but if your not familiar with its use it may seem strange looking :) Sorry, I don't have a link to the online UIM manuals but I'm sure you can search the InfoCenter and find more than you wanted to know. Terry
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.