Here below is a little program to retrieve help text - in this case, for
the MBROPT parameter of CPYF - yes, I know it IS in CL!
This QUHRHLPT API puts XHTML into a variable - this program uses a
pointer to a user space - somewhere it says to use an extensible user
space - left as an exercise for the reader.
I found a post from a few years ago, where I said that the results
didn't seem all that helpful - I've changed my mind.
Default parameter values ARE marked in the XHTML - here is the pertinent
line or 2 to show this -
Note the <u></u> in the first line - this is the default value -
underlined, as it has always been in help text.
I'm sure there are some other things to be careful of, but this one is
wrapped in a <dt></dt> tag, too, so that might be enough to narrow
Here's the source - enjoy!!
DCL &USPTR *PTR ADDRESS(*NULL)
DCL &RCVVAR *CHAR 5000
DCL &RCVVARLEN *INT 4 5000
DCL &FMTNAM *CHAR 8 'RHLP0100'
DCL &HLPIDS *CHAR 80
DCL &HLPID *CHAR 32 STG(*DEFINED) DEFVAR(&HLPIDS 1)
DCL &HLPOBJ *CHAR 10 STG(*DEFINED) DEFVAR(&HLPIDS 33)
DCL &HLPLIB *CHAR 10 STG(*DEFINED) DEFVAR(&HLPIDS 43)
DCL &HLPTYP *CHAR 10 STG(*DEFINED) DEFVAR(&HLPIDS 53)
DCL &HLPIDCNT *INT 4 1
DCL &HLPTXT *CHAR 5000 STG(*BASED) BASPTR(&USPTR)
DCL &HLPTXTLEN *INT 4 5000
DCL &EC *CHAR 8 X'0000000000000000'
DCL &USNAME *CHAR 20 'HELPTEXT QTEMP '
DCL &USSIZE *INT 4 5000
DCL &USINIT *CHAR 1 X'00'
CHGVAR &HLPID 'CPYF/MBROPT'
CHGVAR &HLPOBJ 'QHCPCMD1'
CHGVAR &HLPLIB '*LIBL'
CHGVAR &HLPTYP '*PNLGRP'
CALL QUSCRTUS (&USNAME 'HELPTEXT' &USSIZE &USINIT '*ALL' ' ' '*YES' +
CALL QUSPTRUS (&USNAME &USPTR &EC)
CALL QUHRHLPT (&RCVVAR &RCVVARLEN &FMTNAM &HLPIDS &HLPIDCNT &HLPTXT +
On 2/25/2014 2:39 AM, Flensburg, Carsten wrote:
There's an example of the QCDRCMDD part of the equation to be found here:
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Vernon Hamberg
Sent: 25. februar 2014 00:23
To: Midrange Systems Technical Discussion
Subject: Re: Printing cmddft's
As Chuck mentions, there is the QCDRCMDD - Retrieve Command Description
- API. This can give you either an XML file or a variable with XML of the various "elements" in the source used to create the command.
And it does give the default as it is - not as delivered or not as the source may specify.
Now if you are talking about IBM commands, you COULD use a roundabout way to get to the default of the original - get the help text, which always shows the original default as an underlined value.
I dug around, and there is an API - Retrieve Help Text (QUHRHLPT) API - this puts out an XML with what the help looks like - it might give you whether something is a default and would not be affected by CHGCMDDFT.
I also see there is a Java class (CommandHelpRetriever) that can be called in QShell - it uses these 2 APIs, apparently - and it's from IBM.
On 2/24/2014 3:58 PM, fbocch2595@xxxxxxx wrote:
How is that done? Wouldn't dspcmddft be a good thing to have so you know what dft's have been changed...like wrksysval?--
From: rob <rob@xxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Sent: Mon, Feb 24, 2014 4:55 pm
Subject: Re: Printing cmddft's
It is possible to list all IBM commands that have had CHGCMDDFT ran on
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
This communication is intended only for use by the addressee.It may contain confidential or privilegedinformation.
If you receive this communication unintentionally, please inform us immediately and delete this e-mail and any attachments.
Warning: Although we have taken reasonable precautions to ensure no viruses are present in this email, we cannot accept
responsibility for any loss or damage arising from the use of this email or attachments.
This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact