You many want to take a quick look at the Display Command Line Window (QUSCMDLN) API documented here. Using it you should be able to provide a command key (like F=9) to present a command entry line (with many of the features of the line taken care of for you).
I am familiar with QCMD but if I call it I’ll call it as a program.
QCMD won’t be involved in your programming. You won’t call it.
You will, however, call QCAPCMD or QCMDEXC depending in how you want details such as Limited Capabilities users to be handled and others.
In any case, you will call an API to process the command and you will call the API as a program call. That’s how it’s done.
Your best choice is to call the Execute Command (QCMDEXC) API.
There are better choices, but QCMDEXC will give you enough for now.
There are a number of alternatives, including QCMD. However, you need to start with what is both easy and common.
As with your earlier question, if you also want all of the features of a “normal command line (for example, retrieving previous commands with <F9>), you will do the programming for those features by yourself. The input field that you define is just an input field. Your programming is what makes it act like a “normal command line”. Calling the API is the only thing that helps make things seem like a “normal command line”, and the only thing the API does is process the command that you pass to it as a parm.