Command line screens

275 pts.
Tags:
Command line
Command Line Processor
QCMDSRC
Hello, Sorry about putting my question wrong. 1. Run backup. 2. Show Data groups. 3. Start EOD ==> ---------------------------------------------------------- ------------------------------------------------------ Now I have created this screen but I just want Command line also visible. I am familiar with QCMD but if I call it I'll call it as a program. I just want to see a command line. can I call it so it will be shown at the bottom. Regards M Khan

Software/Hardware used:
Software

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Bruce Vining

———————————————————————————————————————–

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.

Tom

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Bruce's mention of the QUSCMDLN API can be useful. It is essentially what happens when you press <F21=System command> in SEU and a few other places. For many developers or administrators, setting your attention-program to QSYS/QUSCMDLN can be very handy. Using it in an application will make a "normal command line" simply appear on your screen when you call the API. You don't need to create an input field; there won't be anything that looks like a command line when your display file is active. You would only have a new function key (<F9=Command line>) as one of your F-keys in your display file. The command line window would appear when your program called QSYS/QUSCMDLN after you received the <F9> signal. As with any command processing API, be aware of how adopted authority is used in your program. You probably don't want the authority of the owner of your program to be passed into the API. You can see it work simply by running CALL QUSCMDLN from an existing command line. Or you can try it by having CALL QUSCMDLN in a small CL program and calling that program. It's not exactly what you asked for since no command line will show as part of your display file, but it can be an improvement in many cases. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following