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



On 1/11/11 8:54 AM, CRPence wrote:
On 1/11/11 8:19 AM, David Gibbs wrote:

Does anyone know if there is an easy way to identify commands, based
on attributes, that actually execute programs vs. those that are
just used for CL programs?

Example:

PGM, ENDPGM, and DCL are programming only commands.
RTVJOBA, CRTPGM, DLTF are executable commands.


That a command is limited to only program-flow\statement versus at a
command line is determined by the "Where allowed to run" values of the
command; i.e. those with either or both, *IPGM and\or *BPGM, but with no
other allowed modes.

The CMDI0100 Format of the Retrieve Command Information (QCDRCMDI) API
returns the "Where allowed to run" information of a *CMD object.

To distinguish probably if an OS or LPP command, the CPP library would
be the QSYS or a product (option) library; the object "Licensed program"
information of the *CMD object could be used instead, or just to
corroborate the inference.


Hmmmm, I was thinking only CLP, and forgot to include ILE; i.e. some commands [e.g. CALLPRC, DCLPRCOPT] may have only *IMOD and\or *BMOD. Seems the documentation for the API that I referenced has not been updated to include those, thus helping in my lapse. Difficult to know if only the doc, or if also the API fail to provide that detail; report as defect if missing, or if they can be inferred, then open a eComment card on the doc to effect its correction to identify what was [easily] inferred.

While the typical RTVxxx commands may only be invoked in a program, they may or may not be the type being reviewed\of interest for the OP. Those commands would also be allowed in *IREXX and\or *BREXX; beyond CL module or CL program.

Note also, that some commands may have only *BATCH [e.g. DATA, BCHJOB] which are CL stream-flow\statement versus available at a command line.

Someone else suggested *EXEC. Looking for that plus either *INTERACT or *BATCH might be sufficiently indicative of "not just for program flow\statements"; esp. if as I recall, the *EXEC is required with either *INTERACT or *BATCH in order for a command to be used in request processing program like QCMD.

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.