|
For further information about creating commands check out: http://publib.boulder.ibm.com/pubs/html/as400/v4r5/ic2924/info/RBAM6COMDEFSTATE.HTM Commands are the fastest screen developer around. For example the following command source: CMD PROMPT('This is a test') PARM KWD(MESSAGE) TYPE(*CHAR) LEN(200) REL(*NE ' + ') MIN(1) CHOICE('Please type in + message') PROMPT('Message') PARM KWD(USER) TYPE(*CHAR) LEN(10) RSTD(*YES) + VALUES(PAUL BRENDA) MIN(1) PROMPT('User') Compiled with the CRTCMD command, will generate the following screen: -------------------------------------------------------------------------------- This is a test (TEST) Type choices, press Enter. Message . . . . . . . . . . . . ____________________________________________ ________________________________________________________________________________ ________________________________________________________________________________ ____________________________________________________ User . . . . . . . . . . . . . . __________ PAUL, BRENDA Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys -------------------------------------------------------------------------------- Complete with another prompt screen for User which will display the possible values for User. And 15 screen fulls of help! Not bad for 3 lines of code, eh? You can get fancier with custom prompting programs, context help and what not, if needed. Now, if only the prototype support for ILE languages were this powerful! Rob Berendt ================== Remember the Cole! "James W. Kilgore" <eMail@James-W-Kilg To: MIDRANGE-L@midrange.com ore.com> cc: Sent by: Subject: Re: where did those zeros come from? owner-midrange-l@mi drange.com 03/22/01 01:59 PM Please respond to MIDRANGE-L Ray, I know that's it a matter of personal preference, but IMHO, the command route is cleaner. In file QCMDSRC create the following member: (Now, I like to call my commands the same as the CPP (Command processing Program) but it's not necessary.) *************** Beginning of data ************************************* CMD PROMPT('Wrapper for program PRR50130') PARM KWD(P01) TYPE(*CHAR) LEN(30) ALWVAR(*YES) + PROMPT('Parameter #1') PARM KWD(P02) TYPE(*CHAR) LEN(90) ALWVAR(*YES) + PROMPT('Parameter #2') PARM KWD(P03) TYPE(*CHAR) LEN(9) ALWVAR(*YES) + PROMPT('Parameter #3') PARM KWD(P04) TYPE(*CHAR) LEN(8) ALWVAR(*YES) + PROMPT('Parameter #4') PARM KWD(P05) TYPE(*CHAR) LEN(8) ALWVAR(*YES) + PROMPT('Parameter #5') ****************** End of data **************************************** Then compile (CRTCMD) with: Create Command (CRTCMD) Type choices, press Enter. Command . . . . . . . . . . . . CMD > PRR50130 Library . . . . . . . . . . . > MYLIB Program to process command . . . PGM > PRR50130 Library . . . . . . . . . . . > *LIBL Source file . . . . . . . . . . SRCFILE > QCMDSRC Library . . . . . . . . . . . > MYLIB Source member . . . . . . . . . SRCMBR > PRR50130 Text 'description' . . . . . . . TEXT *SRCMBRTXT Additional Parameters Replace command . . . . . . . . REPLACE > *YES The end result is that in your CL program that you have been having problems with, the SBMJOB would look like this: ********* Beginning of data *************************************** SBMJOB CMD(PRR50130 P01(&P01) P02(&P02) + P03(&P03) P04(&P04) P05(&P05)) + JOB(PRR50130XX) JOBQ(QPGMR2) HTH "Ray, Adam" wrote: > > Thanks Scott. I used solution number 2, only because I am clueless as to how > to do number 1. I would love to learn though. > +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.