I have an RPGLE program that I am using to call a command with 1 parameter. The parameter is a container number, 11 positions alphanumeric.
I want to be able to run my RPGLE program, execute the command via QCMDEXC and receive/process that parameter within the same RPGLE.
Is this possible? How can I do this?
Here's the CMD source:
PARM KWD(CONTAINER) TYPE(*CHAR) LEN(11) MIN(1) +
MAX(1) PROMPT('CONTAINER NUMBER')
For my learning and testing purposes, this is my RPGLE source:
d cmdContainer# s 9a inz('?CNTNRSTS')
d getContainer# pr extpgm('QCMDEXC')
d cmdString 32702a const OPTIONS(*VARSIZE)
d cmdLength 15p 5 const
d dbcsFlag 3a const OPTIONS(*NOPASS)
*inlr = *on;
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!