|
You have to be careful with the size of the output from that API, as it can be rather large. The API will run any choice programs specified on the parameters and return the results as part of the string. I've had it return well over 32K for some commands. I ended up supporting up to 600k in my utility wrapper for that API just to be sure it wouldn't fail. Unlike other APIs, if you don't provide enough room for the entire string, it won't return anything.
The version of Dave's RTVCMDSRC that I have that came from NEWS400 in 1996. It uses MI to pull the command definition directly from the command object, which means that it requires system state on security level 40 or above.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Vern Hamberg
Sent: Thursday, July 19, 2012 12:22
To: Midrange Systems Technical Discussion
Subject: Re: How To Create A Command With Different Options
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 -
As an Amazon Associate we earn from qualifying purchases.
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.