iSeries: Command that accepts object name as parameter

344995 pts.
Tags:
iSeries
Parameters
syntax
I've been trying (and trying) to create a new command on iSeries, where the parameter has the same file name using the LIBRARY/FILE MEMBER syntax. Something like this:
MYCMD FILE(MYLIB/MYFILE MYMEMBER)
Or this:
MYCMD FILE(MYLIB/MYFILE) MEMBER(MYMEMBER)
I've tried several things including:
  • Create a PARM statement using the FILE parameter with a *CHAR type
  • Create a special type using ELEM statements

I'm struggling to find out how to create a parameter that accepts a value that is a qualified object name. Can someone help me?

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: 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

    A *CMD accepts a qualified object name through use of the QUAL statement. The statement is linked to a particular QUAL definition through a TYPE() name:

                 PARM       KWD(DBF) TYPE(Q1) PROMPT('File name')
    
     Q1:         QUAL       TYPE(*NAME) LEN(10)
                 QUAL       TYPE(*NAME) LEN(10) DFT(*LIBL) +
                              SPCVAL((*CURLIB) (*LIBL)) PROMPT('Library')
    
                 PARM       KWD(MBR) TYPE(*NAME) LEN(10) DFT(*FIRST) +
                              SPCVAL((*FIRST) (*LAST) (*ALL)) +
                              EXPR(*YES) PROMPT('Database file +
                              member')

    You might need the QUAL definition more than once in a single *CMD, so you might place it at the end of all definition statements. Use the same TYPE() to reference it on a different PARM. This example simply has the QUAL immediately after the PARM.

    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