On Fri, Sep 16, 2016 at 2:02 PM, Jack Tucky <jacktucky@xxxxxxxxx> wrote:

RTVCMD isn't standard os stuff I think.



Standard OS API QCDRCMDD can be used to retrieve the info you want, in the
form of an XML document.

Here's a REXX program as an example of using the API, followed by an sample
of the output. Just paste it (the REXX program) into a source file and run
it with STRREXPRC.

For easy reading open the doc in an XML editor that can format it for you.
The one included in RDi works very nicely.




< -- The REXX program ---------- >





/* Retrieve command definition to a stream file */

arg aCmd.lib"/"aCmd.name aStmf

if aCmd.lib = '' then do
say ""
say ""
parse source . . sm sf sl
say sl"/"sf"("sm")"
say ""
say "Usage:"
say ""
say " STRREXPRC PARM('library-name|special-value/command-name
xml-file-path')"
say ""
say "o Special values allowed for library-name"
say "o xml-file-path can be relative or absolute"
say ""
end

cmdobj = left( aCmd.name, 10 ) || left( aCmd.lib, 10 )


path.ccsid = copies( "00"x , 4 ) /* *JOB */
path.Country = copies( "00"x , 2 ) /* *JOB */
path.Language = copies( "00"x , 3 ) /* *JOB */
path.Reserved1 = copies( "00"x , 3 )
path.type = copies( "00"x , 4 ) /* String, 1-char delimiter */
path.delimiter = left( "/" , 2 )
path.Reserved2 = copies( "00"x , 10 )

path.name = strip( aStmf )
path.Length = d2c( length( path.name ) , 4 )

pathName = path.ccsid || ,
path.Country || ,
path.Language || ,
path.Reserved1 || ,
path.type || ,
path.Length || ,
path.delimiter || ,
path.Reserved2 || ,
path.name

errc = copies( "00"x , 8 )

"call QCDRCMDD ( &cmdobj &pathName 'DEST0200' ' ' 'CMDD0200' &errc )"

if RC = 0 then
"dspf &path.name"
else
exit -1




< -- Sample output ------------ >




<QcdCLCmd DTDVersion="2.0">
<Cmd CmdName="CHGJOB" CmdLib="__LIBL" CCSID="37" HlpPnlGrp="QHWTCMD1"
HlpPnlGrpLib="__LIBL" HlpID="CHGJOB" MaxPos="1" Prompt="Change Job"
PromptMsgID="TXT0022" PmtOvrPgm="QWCSXTJR" PmtOvrLib="QSYS"
MsgF="QCPFMSG" MsgFLib="__LIBL" PmtFile="QCPFPMT" PmtFileLib="*LIBL"
PmtFileMsg="DYNAMIC" ExecBatch="YES" ChgCmdExit="NO"
RtvCmdExit="NO">
<Parm Kwd="JOB" PosNbr="1" KeyParm="YES" ListDspl="INT2"
RtnVal="NO" PassVal="NUL" Type="QUAL" Min="0" Max="1"
Prompt="Job name" PromptMsgID="TXT0537" Rstd="NO" Dft="*"
AlwUnprt="YES" AlwVar="YES" Expr="YES" Full="NO" DspInput="YES"
IsDtaAra="NO" IsFile="NO" IsPgm="NO" Choice="*">
<SngVal>
<Value Val="*" MapTo="*" />
</SngVal>
<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" InlPmtLen="10"
Choice="Name"></Qual>
<Qual Type="NAME" Min="0" Max="1" Prompt="User"
PromptMsgID="TXT0919" Len="10" Rstd="NO" AlwUnprt="YES"
AlwVar="YES" Expr="YES" Full="NO" DspInput="YES" Vary="NO"
PassAtr="NO" InlPmtLen="10" Choice="Name"></Qual>
<Qual Type="CHAR" Min="0" Max="1" Prompt="Number"
PromptMsgID="TXT0920" Len="6" Rstd="NO" RangeMinVal="000000"
RangeMaxVal="999999" AlwUnprt="YES" AlwVar="YES" Expr="YES"
Full="YES" DspInput="YES" Vary="NO" PassAtr="NO"
Choice="000000-999999"></Qual>
</Parm>







As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.