× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



>  Does anyone have a UIM help panel source
> and a corresponding command definition they'd
> be willing to share?

I have an example of a home grown RUNSQLSTM that I can share.  QCMDSRC,
RUNSQLSTM:

             CMD        PROMPT('Run a SQL statement')

             PARM       KWD(SQLSTM) TYPE(*CHAR) LEN(1280) MIN(1) +
                          EXPR(*YES) PROMPT('SQL statement')
             PARM       KWD(OUTPUT) TYPE(*CHAR) LEN(8) RSTD(*YES) +
                          DFT(*) VALUES(* *PRINT *OUTFILE) +
                          EXPR(*YES) PROMPT('Output')

             PARM       KWD(OUTFILE) TYPE(OUTFILE) PMTCTL(FILE) +
                          PROMPT('File to receive output')
             PARM       KWD(OUTMBR) TYPE(*NAME) LEN(10) DFT(*FIRST) +
                          SPCVAL((*FIRST)) EXPR(*YES) +
                          PMTCTL(FILE) PROMPT('Member')
             PARM       KWD(MBROPT) TYPE(*CHAR) LEN(8) RSTD(*YES) +
                          DFT(*REPLACE) VALUES(*REPLACE *ADD) +
                          EXPR(*YES) PMTCTL(FILE) PROMPT('Replace +
                          or add records')

             PARM       KWD(PAGESIZE) TYPE(PAGESIZE) PMTCTL(PRINT) +
                          PROMPT('Page size:')
             PARM       KWD(LPI) TYPE(*DEC) LEN(1 0) RSTD(*YES) +
                          DFT(6) VALUES(6 8) EXPR(*YES) +
                          PMTCTL(PRINT) PROMPT('Lines per inch')
             PARM       KWD(CPI) TYPE(*DEC) LEN(3 0) RSTD(*YES) +
                          DFT(10) VALUES(10 12 15) EXPR(*YES) +
                          PMTCTL(PRINT) PROMPT('Characters per inch')
             PARM       KWD(OVRFLW) TYPE(*DEC) LEN(3 0) +
                          DFT(*PAGESIZE) RANGE(1 255) +
                          SPCVAL((*PAGESIZE 999)) EXPR(*YES) +
                          PMTCTL(PRINT) PROMPT('Overflow line number')
             PARM       KWD(PRTSTM) TYPE(*CHAR) LEN(4) RSTD(*YES) +
                          DFT(*YES) VALUES(*YES *NO) EXPR(*YES) +
                          PMTCTL(PRINT) PROMPT('Print SQL statement')

             PARM       KWD(RDB) TYPE(*CHAR) LEN(15) DFT(*NONE) +
                          SPCVAL((*NONE *CURRENT)) EXPR(*YES) +
                          PMTCTL(*PMTRQS) PROMPT('Relational database')
             PARM       KWD(QMFORM) TYPE(QMFORM) DFT(*SYSDFT) +
                          SNGVAL((*SYSDFT)) PMTCTL(*PMTRQS) +
                          PROMPT('Form to use to format output')
             PARM       KWD(NAMING) TYPE(*CHAR) LEN(11) RSTD(*YES) +
                          DFT(*SYS) VALUES(*SAA *SYS) EXPR(*YES) +
                          PMTCTL(*PMTRQS) PROMPT('Naming convention')

 FILE:       PMTCTL     CTL(OUTPUT) COND((*EQ *OUTFILE))
 PRINT:      PMTCTL     CTL(OUTPUT) COND((*EQ *PRINT))

 OUTFILE:    QUAL       TYPE(*NAME) LEN(10) DFT(SQLOUT) EXPR(*YES)
             QUAL       TYPE(*NAME) LEN(10) DFT(QTEMP) +
                          SPCVAL((*CURLIB) (*LIBL)) EXPR(*YES) +
                          PROMPT('Library')
 QMFORM:     QUAL       TYPE(*NAME) LEN(10) EXPR(*YES)
             QUAL       TYPE(*NAME) LEN(10) DFT(*LIBL) +
                          SPCVAL((*CURLIB) (*LIBL)) EXPR(*YES) +
                          PROMPT('Library')

 PAGESIZE:   ELEM       TYPE(*CHAR) LEN(3) DFT('066') RANGE('001' +
                          '255') FULL(*YES) EXPR(*YES) +
                          PROMPT('Length--lines per page')
             ELEM       TYPE(*CHAR) LEN(3) DFT('132') RANGE('001' +
                          '198') FULL(*YES) EXPR(*YES) +
                          PROMPT('Width--positions per line')


And here's some of QPNLSRC.  I'm including the bits which bring the whole
command help together at the top, one of the 're-using IBM help' sections,
and one of my custom written sections.  Also included are references to my
custom search index.

.* Help panel for RUNSQLSTM
.*
:PNLGRP.
.* ====================================================================
.* Use help from IBM's CPYF
.*
:IMPORT PNLGRP=QHCLMST1 NAME='CPYF/MBROPT'.
.* Use help from IBM's STRQMQRY
.*
:IMPORT PNLGRP=QHQXCMD NAME='STRQMQRY/NAMING'.
:IMPORT PNLGRP=QHQXCMD NAME='STRQMQRY/OUTPUT'.
:IMPORT PNLGRP=QHQXCMD NAME='STRQMQRY/OUTFILE'.
:IMPORT PNLGRP=QHQXCMD NAME='STRQMQRY/OUTMBR'.
:IMPORT PNLGRP=QHQXCMD NAME='STRQMQRY/QMFORM'.
:IMPORT PNLGRP=QHQXCMD NAME='STRQMQRY/RDB'.
.* Use help from IBM's OVRPRTF
.*
:IMPORT PNLGRP=QHCLMST1 NAME='OVRPRTF/CPI'.
:IMPORT PNLGRP=QHCLMST1 NAME='OVRPRTF/LPI'.
:IMPORT PNLGRP=QHCLMST1 NAME='OVRPRTF/PAGESIZE'.
:IMPORT PNLGRP=QHCLMST1 NAME='OVRPRTF/OVRFLW'.
.* Use help from Buck's index search
.*
:IMPORT PNLGRP=SCHHLP NAME='SQL'.
:IMPORT PNLGRP=SCHHLP NAME='SQL_select'.
:IMPORT PNLGRP=SCHHLP NAME='SQL_update'.
:IMPORT PNLGRP=SCHHLP NAME='SQL_delete'.
:IMPORT PNLGRP=SCHHLP NAME='SQL_insert'.
.* ====================================================================
.* Bring all the parms together for the search index
.*
:HELP NAME='RUNSQLSTM/ALL'.
:IMHELP NAME='RUNSQLSTM'.
:IMHELP NAME='RUNSQLSTM/SQLSTM'.
:IMHELP NAME='RUNSQLSTM/OUTPUT'.
:IMHELP NAME='RUNSQLSTM/OUTFILE'.
:IMHELP NAME='RUNSQLSTM/OUTMBR'.
:IMHELP NAME='RUNSQLSTM/MBROPT'.
:IMHELP NAME='RUNSQLSTM/PAGESIZE'.
:IMHELP NAME='RUNSQLSTM/LPI'.
:IMHELP NAME='RUNSQLSTM/CPI'.
:IMHELP NAME='RUNSQLSTM/OVRFLW'.
:IMHELP NAME='RUNSQLSTM/PRTSTM'.
:IMHELP NAME='RUNSQLSTM/RDB'.
:IMHELP NAME='RUNSQLSTM/QMFORM'.
:IMHELP NAME='RUNSQLSTM/NAMING'.
:EHELP.
.* ====================================================================
.* Extended help
.*
:HELP NAME='RUNSQLSTM'.
Run a SQL statement
:P.
This command executes a single SQL statement.
:IMHELP NAME='SQL'.
:P.
The following SQL data definition statements are allowed:
:UL COMPACT.
:LI.COMMENT ON
:LI.CREATE COLLECTION
:LI.CREATE INDEX
:LI.CREATE TABLE
:LI.CREATE VIEW
:LI.DROP COLLECTION
:LI.DROP INDEX
:LI.DROP TABLE
:LI.DROP VIEW
:LI.GRANT
:LI.LABEL ON TABLE
:LI.LABEL ON COLUMN
:LI.LABEL ON VIEW
:LI.LOCK TABLE
:LI.REVOKE
:EUL.
:P.
For help on data definition statements, see an appropriate SQL
reference book.  I've included minimal help here; sorry!
:P.
The following SQL data manipulation statements are allowed:
:UL COMPACT.
:LI.:LINK PERFORM='DSPHELP SQL_select'.SELECT:ELINK.
:LI.:LINK PERFORM='DSPHELP SQL_update'.UPDATE:ELINK.
:LI.:LINK PERFORM='DSPHELP SQL_delete'.DELETE:ELINK.
:LI.:LINK PERFORM='DSPHELP SQL_insert'.INSERT INTO:ELINK.
:EUL.
:EHELP.
.* ====================================================================
.* SQLSTM
.*
:HELP NAME='RUNSQLSTM/SQLSTM'.
:HP1.SQL statement (SQLSTM) - Help:EHP1.
:XH3.SQL statement (SQLSTM)
:P.Specify the SQL statement you want to execute here.
:UL COMPACT.
:LI.:LINK PERFORM='DSPHELP SQL_select'.SELECT:ELINK.
- Extract records from a file.  Records may be displayed,
printed or placed in a file.
:LI.:LINK PERFORM='DSPHELP SQL_update'.UPDATE:ELINK.
- Update records in a file.
:LI.:LINK PERFORM='DSPHELP SQL_delete'.DELETE:ELINK.
- Delete records from a file.
:LI.:LINK PERFORM='DSPHELP SQL_insert'.INSERT INTO:ELINK.
- Insert records into a file.
:EUL.
:EHELP.
.* ====================================================================
.* OUTPUT
.*    Use IBM's help
.*
:HELP NAME='RUNSQLSTM/OUTPUT'.
:IMHELP NAME='STRQMQRY/OUTPUT'.
:EHELP.
.*
:EPNLGRP.

I hope this helps.  You can see how the unqualified HELP name relates to the
extended help, and the qualified parts relate to the individual command
parameters.
  --buck




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.