User defined command

25 pts.
Tags:
AS/400
DSPDTAARA
Hi, I want to create a command such that the user only needs to specify (say) a data area name and the command should be automatically fired and perform DSPDTAARA on the parameter specified. I'm not sure how and where to start this because I don't want the syntax to be - mycmd (data area name). I want it to be only - (data area name) after which if the user presses enter, DSPDTAARA is performed. Is this possible?

Software/Hardware used:
iseries/AS400

Answer Wiki

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

Discuss This Question: 4  Replies

 
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
    Is this just for learning? Why create a new command when DSPDTAARA already does the same thing? See the Defining and documenting commands topic in the Information Center. -- Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    BTW, if you only have one data area, you can create a command with the same name as the data area. If you ever need to display a second or third data area, you'll need a different command for each one. -- Tom
    125,585 pointsBadges:
    report
  • NeilD
    The only way I can think of achieving a "simple to enter" utility for the user is to create a screen with an input field in which the dtaara name is entered and then the controlling pgm (RPGLE or CLLE etc) call the dspdtaara and outputs the resultant content to the screen.Otherwise 'DSPDTAARA NAME' is the only way to go.
    450 pointsBadges:
    report
  • TomLiotta
    The only way I can think of achieving a “simple to enter” utility for the user...   The OP has a very specific format in mind. It can be done with just a CMD source statement plus two trivial PARM statements. It's not even necessary to create a CPP. No separate display file either.   But command creation is a big topic. By knowing where the topic documentation is found and getting some background from it, the reason the simplest method works at all should become much clearer.   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