ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Need help on creating the HELP panel for a command

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help on creating the HELP panel for a command

    Hi All,

    I have to create the HELP panel for a command. So can any one give me some idea or source codes that how to create and use it.

    Thanks in advance.

    Regards
    Skma

  • #2
    Re: Need help on creating the HELP panel for a command

    Here is a simple example of a command:
    Code:
    /*------------------------------------------------------------------*/
     /* Command:     TFRPF                                               */
     /* CL Program:  TFRPFC (Command Processing Program)                 */
     /* Version:     1.00                                                */
     /* System:      iSeries                                             */
     /* Author:      Terry Winchester                                    */
     /* Description: Transfer a Physical File from one AS/400 to another */
     /*              AS/400 and optionally rebuild indexes / move DDS    */
     /*              source code.                                        */
     /*                                                                  */
     /*  To compile :                                                    */
     /*                                                                  */
     /*        CRTCMD     CMD(QGPL/TFRPF) PGM(QGPL/TFRPFC) +             */
     /*                     SRCFILE(PRODOBJ/INCLUDE) +                   */
     /*                     HLPPNLGRP(QGPL/TFRPFH) HLPID(*CMD)           */
     /*                                                                  */
     /*------------------------------------------------------------------*/
     TRPF:       CMD        PROMPT('Transfer Physical File')
    
                 PARM       KWD(FROMFILE) TYPE(FROMFILE) MIN(1) +
                              PROMPT('Physical File')
    
                 PARM       KWD(CREATEPF) TYPE(*CHAR) LEN(1) RSTD(*YES) +
                              DFT(N) VALUES(Y N) MIN(0) +
                              PROMPT('Create Physical')
    
                 PARM       KWD(CREATELF) TYPE(*CHAR) LEN(1) RSTD(*YES) +
                              DFT(Y) VALUES(Y N) MIN(0) +
                              PROMPT('Create Logicals')
    
                 PARM       KWD(MOVSRC) TYPE(*CHAR) LEN(1) RSTD(*YES) +
                              DFT(N) VALUES(Y N) MIN(0) +
                              PROMPT('Move Source')
    
                 PARM       KWD(VIEWMSGS) TYPE(*CHAR) LEN(1) RSTD(*YES) +
                              DFT(N) VALUES(Y N) MIN(0) PROMPT('View +
                              FTP Mesages')
    
     FROMFILE:   QUAL       TYPE(*NAME) LEN(10)
                 QUAL       TYPE(*NAME) LEN(10) DFT(*LIBL) +
                              SPCVAL((*CURLIB) (*LIBL)) PROMPT('Library')
    and it's associated help panel:
    Code:
    .*--------------------------------------------------------------------*
    .* Panel Group:    TFRPFH                                             *
    .* Command Name:   TFRPF                                              *
    .* Date Written:   08/30/04                                           *
    .* Author:         T. Winchester                                      *
    .* Description:    Help Panel group for the "Transfer Physical File"  *
    .*                 command.                                           *
    .*                                                                    *
    .*--------------------------------------------------------------------*
    .*   Date     Who                Author's Comments                    *
    .*--------------------------------------------------------------------*
    .* 08/30/04   TMW   Date created.                                     *
    .*                                                                    *
    .*--------------------------------------------------------------------*
    :PNLGRP.
    .*
    .*---------------------------------------------------------------------
    .*
    .*                                                       TFRPF overview
    :HELP NAME=TFRPF.
    :P.
    This command will transfer a Physical File from the current system to
    a remote system.  On the remote system, commands are executed under the
    QPGMR profile.
    :P.
    .*
    :XH3.Error messages for TFRPF
    :P.
    :P.:HP3.*ESCAPE Messages:EHP3.
    :P.:HP2.CPF0001     :EHP2.Object &1 in library &2 not found.
    :P.:HP2.CPF0001     :EHP2.Member &1 file &2 in library &3 not found.
    .*
    :EHELP.
    .*
    .*---------------------------------------------------------------------
    .*
    :HELP NAME='TFRPF/FROMFILE'.Physical File (FROMFILE) - Help
    :XH3.Physical File (FROMFILE)
    :P.Specifies the name and library of the Physical File being
    transferred.
    :P.
    This is a required parameter.
    :P.
    The possible library values are:
    :P.
    :HP3.*LIBL:EHP3.
    :P.:XMP.All libraries in the job's library list are searched until the
    first match is found.:EXMP.
    :P.
    :HP2.*CURLIB:EHP2.
    :P.:XMP.The current library for the job is used to locate the physical
    file.:EXMP.
    :P.
    :HP2.library-name:EHP2.
    :P.:XMP.Specify the library where the physical file is located.:EXMP.
    .*
    :EHELP.
    .*
    .*---------------------------------------------------------------------
    .*
    :HELP NAME='TFRPF/CREATEPF'.Create Physical (CREATEPF) - Help
    :XH3.Create Physical (CREATEPF)
    :P.Specifies that a CRTPF command is generated in the FTP script and
    executed on the remote system.  The transfer script will not remove the
    logical files present on the remote system (because it doesn't know
    about them), therefore do NOT use this option for physical files that
    have existing logical files on the remote system.
    :P.
    The possible single values are:
    :P.
    :HP3.N:EHP3.
    :P.:XMP.(N)o, do NOT create the Physical File.:EXMP.
    :P.
    :HP2.Y:EHP2.
    :P.:XMP.(Y)es, create the Physical File.:EXMP.
    :P.
    :XH2.Special Note:
    :P.:HP2. DDS source members for Physical Files that utilize "reference"
    fields/files may not work properly because the library where the
    reference file exists may not be in the remote jobs library list.:EHP2.
    .*
    :EHELP.
    .*
    .*---------------------------------------------------------------------
    .*
    :HELP NAME='TFRPF/CREATELF'.Create Logicals (CREATELF) - Help
    :XH3.Create Logicals (CREATELF)
    :P.Specifies that a DLTF -and- a CRTLF command are generated in the
    FTP script and executed on the remote system.
    :P.
    The possible single values are:
    :P.
    :HP3.Y:EHP3.
    :P.:XMP.(Y)es, create the Logical Files.:EXMP.
    :P.
    :HP2.N:EHP2.
    :P.:XMP.(N)o, do NOT create the Logical Files.:EXMP.
    .*
    :EHELP.
    .*
    .*---------------------------------------------------------------------
    .*
    :HELP NAME='TFRPF/MOVSRC'.Move Source (MOVSRC) - Help
    :XH3.Move Source (MOVSRC)
    :P.Specifies that the DDS source code is to be moved to the remote
    system.  The source file location is retrieved from the object, so
    you must ensure that the DDS source resides in the proper source file.
    :P.
    The possible single values are:
    :P.
    :HP3.N:EHP3.
    :P.:XMP.(N)o, do NOT move the DDS source code.:EXMP.
    :P.
    :HP2.Y:EHP2.
    :P.:XMP.(Y)es, move the DDS source code.:EXMP.
    :P.
    :XH2.Special Note:
    :P.:HP2. A CHGPFM command is generated within the FTP script but when
    the member text description contains an embedded single quote, the
    member type and text will not be updated correctly (the CHGPFM command
    will *fail* on the remote system).:EHP2.
    .*
    :EHELP.
    .*
    :EPNLGRP.
    Note that the "HELP NAME" keyword lines in the PNLGRP source identify the specific command keywords. You must also specify the help panel name when the command is created.

    Terry

    Comment


    • #3
      Re: Need help on creating the HELP panel for a command

      Google CRTCMDHLP

      It is a MC Press utility that generates the skeleton UIM source for a specified command.
      Denny

      If authority was mass, stupidity would be gravity.

      Comment


      • #4
        Re: Need help on creating the HELP panel for a command

        fwiw...
        I did this for ChangefIT* - when my boss saw this, insisted that I implement it at work** as well.

        I string the pgm name and the user language together, then just call a pgm that opens a PDF document. voila. Naturally can be done right down to field level.

        Now think how easy it is to maintain your (now multi-lingual) help text! Why fiddle with green screen help. "Ah" I hear you say, "what about those using dumb terminals?". "Tuff!" I say.

        * With ChangefIT, the help text path is requested at installation.
        ** At work, 'cos we don't use the Infor S21 Workspace server, there is no Help Function at all. So when we do a new pgm, or a major mod, we now have help text (path stored in INP15).
        Last edited by kitvb1; August 12, 2009, 01:57 PM.
        Regards

        Kit
        http://www.ecofitonline.com
        DeskfIT - ChangefIT - XrefIT
        ___________________________________
        There are only 3 kinds of people -
        Those that can count and those that can't.

        Comment

        Working...
        X