|
Hi Elvis,
What you're looking for is called "Prompt Control".... Here's my source for
a SNDEMAIL command, which was originally written by Dave Leland and
published in one of the 'zines. I've modified this to accept additional
parms, some of which are optional...
See the ATTACHMNT field, FILENAME, and DB2NAME parms for the implementation.
Also of interest are the compound parm items, like Adressee, where it
prompts for sub-elements as a group of parms. DB2NAME is defined this way,
so that it prompts for library and file as seperate parm values..
CMD PROMPT('Send an E-mail Message')
PARM KWD(EMAILTYPE) TYPE(*CHAR) LEN(10) +
RSTD(*YES) DFT(*REGULAR) VALUES(*REGULAR +
*HTML) EXPR(*YES) PROMPT('E-mail type' 1)
PARM KWD(ADDRESSEE) TYPE(ELEM1) MIN(1) MAX(15) +
CHOICE(*NONE) PROMPT('Recipient(s)' 2)
PARM KWD(SUBJECT) TYPE(*CHAR) LEN(256) DFT(*NONE) +
SPCVAL((*NONE '')) EXPR(*YES) +
PROMPT('Subject' 4)
PARM KWD(ATTACHMNT) TYPE(*CHAR) LEN(5) RSTD(*YES) +
DFT(*NONE) VALUES(*STMF *DB2 *CSV *NONE) +
PROMPT('Attachment' 7)
PARM KWD(FILENAME) TYPE(*PNAME) LEN(256) +
DFT(*NONE) SNGVAL((*NONE)) MAX(30) +
EXPR(*YES) PMTCTL(PC1) PROMPT('Path to +
stream file')
PARM KWD(DB2NAME) TYPE(ELEM3) MAX(30) PMTCTL(PC2) +
PROMPT('DB2/400 File name')
PARM KWD(MESSAGE) TYPE(*CHAR) LEN(2048) +
DFT(*NONE) SPCVAL((*NONE '')) EXPR(*YES) +
PROMPT('Message' 5)
PARM KWD(SENDER) TYPE(ELEM2) PROMPT('Sender' 3)
PARM KWD(ADDTRAILER) TYPE(*CHAR) LEN(4) +
RSTD(*YES) DFT(*NO) VALUES(*YES *NO) +
EXPR(*YES) PROMPT('Add standard trailer to +
e-mail' 6)
PC1: PMTCTL CTL(ATTACHMNT) COND((*EQ *STMF))
PC2: PMTCTL CTL(ATTACHMNT) COND((*EQ *DB2) (*EQ *CSV)) +
NBRTRUE(*GE 1)
ELEM1: ELEM TYPE(*PNAME) LEN(256) MIN(1) EXPR(*YES) +
PROMPT('E-mail address of recipient')
ELEM TYPE(*CHAR) LEN(256) DFT(*NONE) +
SPCVAL((*NONE '')) EXPR(*YES) +
PROMPT('Name of e-mail recipient')
ELEM TYPE(*CHAR) LEN(1) DFT(*PRI) SPCVAL((*PRI +
'0') (*CC '1') (*BCC '2')) EXPR(*YES) +
PROMPT('Recipient type')
ELEM2: ELEM TYPE(*PNAME) LEN(256) +
DFT(MIS@xxxxxxx) EXPR(*YES) +
PROMPT('E-mail address of sender')
ELEM TYPE(*CHAR) LEN(256) DFT(BSG) EXPR(*YES) +
PROMPT('Name of e-mail sender')
ELEM3: ELEM TYPE(QUAL1) MIN(1) +
PROMPT('File')
ELEM TYPE(*CHAR) LEN(10) DFT(*FIRST) +
SPCVAL((*FIRST) (*LAST)) EXPR(*YES) +
PROMPT('Member')
ELEM TYPE(*CHAR) LEN(20) DFT(*DFT) EXPR(*YES) +
PROMPT('Attachment Name')
QUAL1: QUAL TYPE(*NAME) LEN(10) MIN(1) EXPR(*YES)
QUAL TYPE(*NAME) LEN(10) DFT(*LIBL) +
SPCVAL((*LIBL) (*CURLIB)) EXPR(*YES) +
PROMPT('Library')
Eric DeLong
Sally Beauty Company
MIS-Project Manager (BSG)
940-898-7863 or ext. 1863
-----Original Message-----
From: Elvis Budimlic [mailto:ebudimlic@xxxxxxxxxxxxxxxxxxxxxxxxx]
Sent: Monday, December 06, 2004 3:58 PM
To: 'Midrange Systems Technical Discussion'
Subject: command definition
Group,
I'd like to create a command that requires user to enter one of 5 special
values (categories), i.e.:
Enter category . . . . . _______________ CAT1, CAT2, CAT3, CAT4, CAT5
Based on the category selected, additional required parameters would be
displayed underneath the first parameter, i.e.:
Enter category . . . . . *CAT1___________ CAT1, CAT2, CAT3, CAT4, CAT5
Enter subparm1 . . . __________________
Enter subparm2 . . . __________________
These parameters would be unique per category and would vary in number
depending on the category selected, so for *CAT2 selection they would see
something like this:
Enter category . . . . . *CAT2___________ CAT1, CAT2, CAT3, CAT4, CAT5
Enter subparm3 . . . __________________
Enter subparm4 . . . __________________
Enter subparm5 . . . __________________
Enter subparm6 . . . __________________
Ideally, I would not like other parameters to show even if F9 was hit.
Is it possible to do this in a single command source? How would you go
about it?
Thanks for any pointers.
Elvis
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.