× 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.



I think I have that one - it uses the QCDRCMDD (Retrieve command definition) API. It generates XML with all the keywords and settings from the source. There's a DTD file that is on everyone's system that defines the tag language - it's at /QIBM/XML/DTD/QcdCLCmd.dtd

I think Dave did some transform to make a nice display of the parameters - it is not complete, or it wasn't the last I looked.

The XML can be viewed in any browser, and it's a tree that is readable enough to see what you need to see.

It's really useful to use the second output format - CMDD0200 - this will include hidden fields, etc. IBM commands use those a lot, and it can be a surprise to try to duplicate the command structure of IBM commands and get a real surprise with hidden parameters.

Anyway, it's pretty easy to use - you can put the output in a stream file or a receiver variable - here is the result for DSPPFM -

<QcdCLCmd DTDVersion="2.0"><Cmd CmdName="DSPPFM" CmdLib="__LIBL" CCSID="37" Prompt="Display Physical File Member" PromptMsgID="TXT3842" HlpPnlGrp="QHNFCMD1" HlpPnlGrpLib="__LIBL" HlpID="DSPPFM" MaxPos="2" MsgF="QCPFMSG" MsgFLib="__LIBL" PmtFile="QCPFPMT" PmtFileLib="QDEVELOP" ExecBatch="NO" ChgCmdExit="NO" RtvCmdExit="NO"><Parm Kwd="WHERE" KeyParm="NO" Type="CHAR" Min="1" Len="2" Vary="NO" PassAtr="NO" Constant="DB" ></Parm><Parm Kwd="FILE" PosNbr="1" KeyParm="NO" ListDspl="INT2" RtnVal="NO" PassVal="DFT" Type="QUAL" Min="1" Max="1" Prompt="File" PromptMsgID="TXT0463" Rstd="NO" AlwUnprt="YES" AlwVar="YES" Expr="YES" Full="NO" DspInput="YES" IsDtaAra="NO" IsFile="IN" IsPgm="NO" ><Qual Type="NAME" Min="1" Max="1" Len="10" Rstd="NO" AlwUnprt="YES" AlwVar="YES" Expr="YES" Full="NO" DspInput="YES" Vary="NO" PassAtr="NO" Case="MONO" InlPmtLen="10" Choice="Name" ></Qual><Qual Type="NAME" Min="0" Max="1" Prompt="Library" PromptMsgID="TXT0909" Len="10" Rstd="NO" Dft="*LIBL" AlwUnprt="YES" AlwVar="YES" Expr="YES" Full="NO" DspInput="YES" Vary="NO" PassAtr="NO" Case="MONO" InlPmtLen="10" Choice="Name, *LIBL, *CURLIB" ><SpcVal><Value Val="*LIBL" MapTo="*LIBL"/><Value Val="*CURLIB" MapTo="*CURLIB "/></SpcVal></Qual></Parm><Parm Kwd="MBR" PosNbr="2" KeyParm="NO" RtnVal="NO" PassVal="DFT" Type="NAME" Min="0" Max="1" Prompt="Member" PromptMsgID="TXT0594" Len="10" Rstd="NO" Dft="*FIRST" AlwUnprt="YES" AlwVar="YES" Expr="YES" Full="NO" DspInput="YES" Vary="NO" PassAtr="NO" Case="MONO" InlPmtLen="10" IsDtaAra="NO" IsFile="NO" IsPgm="NO" Choice="Name, *FIRST, *LAST" ><SpcVal><Value Val="*FIRST" MapTo="*FIRST"/><Value Val="*LAST" MapTo="*LAST"/></SpcVal></Parm><Parm Kwd="FROMRCD" PosNbr="3" KeyParm="NO" RtnVal="NO" PassVal="DFT" Type="UINT4" Min="0" Max="1" Prompt="From record" PromptMsgID="TXT6191" Rstd="NO" Dft="1" Rel="GT" RelVal="0" AlwUnprt="YES" AlwVar="YES" Expr="YES" Full="NO" DspInput="YES" Vary="NO" PassAtr="NO" Case="MONO" IsDtaAra="NO" IsFile="NO" IsPgm="NO" Choice="Number, *END, *ALLDATA" ><SpcVal><Value Val="*END" MapTo="4294967295"/><Value Val="*ALLDATA" MapTo="4294967294"/></SpcVal></Parm></Cmd></QcdCLCmd>

Paste that into a text editor, save it with an XML extension, then open it in Firefox or IE.

HTH
Vern

On 7/19/2012 10:06 AM, sjl wrote:
Dave McKenzie wrote an excellent RTVCMDSRC utility which can retrieve the
command source for any user-written or IBM command, so that you can see the
source code for any existing command on your system.

At one time it was available for download from the System iNetwork site (now
www.iprodeveloper.com), but I cannot seem to find it now.

- sjl



"w 4038" wrote in message
news:mailman.10386.1342670632.2513.midrange-l@xxxxxxxxxxxx...








Hi

How would you create a command that has different options?

For example, consider the SAVOBJ command. If *SAVF is entered in the Device
option, then the "Save File" option is displayed when you press ENTER.

I want to create a command that has 2 choices in an "Activity" option. The
user can enter either DELETE or UPDATE in the "Activity" option. When ENTER
is pressed, the command should display different options.

The DELETE option would display an option requesting a password.
The UPDATE option would display options related to the columns/fields to
update.

Thank you
=



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.