|
How about something like this? /title Prompt command and return command string P svv041_chk b export D svv041_chk pi 7 D qp_cmd_str 2000 D q_cmd_str s 2000 D qcapcmd pr extpgm('QCAPCMD') D qp_cmd_str 2000 Command string D qp_len 10i 0 const Command string lengt D qp_ocb like(q_opt_ctl_blk) Options control bloc D qp_ocb_len 10i 0 const Control block length D qp_format 8 const Format ID D qp_new_str 2000 Generated command st D qp_chg_len_i 10i 0 Size of receiver fie D qp_chg_len_o 10i 0 Bytes returned D qp_err_ds like(q_err_ds) Error data structure D q_opt_ctl_blk ds D q_cmd_type 10i 0 Type of processing D q_DBCS_data 1 inz('0') DBCS translation D q_prompter 1 "Always prompt" D q_syntax 1 inz('0') "library/object" D q_msgkey 4 inz(*blanks) Message key D q_reserved 9 inz(*loval) Must be hexadecimal D q_err_ds ds D q_err_bp 10i 0 inz(%size(q_err_ds)) D q_err_ba 10i 0 inz D q_err_msgid 7 inz D q_err_resv 1 inz D q_err_data 200 inz D q_chg_str s 2000 inz D q_chg_str_len s 10i 0 inz(%size(q_chg_str)) D q_chg_len_out s 10i 0 inz /free q_cmd_str = qp_cmd_str; q_cmd_type = 9; //Type of processing q_prompter = '1'; //Always prompt callp qcapcmd( q_cmd_str: //Command string %len(%trimr(q_cmd_str)): //Command string length q_opt_ctl_blk: //Option control block %len(q_opt_ctl_blk): //Length of option control block 'CPOP0100': //Output format q_chg_str: //Output command string q_chg_str_len: //Output command string size q_chg_len_out: //Output command string provided q_err_ds); //Error data structure if q_err_msgid = ''; qp_cmd_str = q_chg_str; return ''; else; return q_err_msgid; endif; /end-free P e I tried to include a GOTO just for old times' sake but couldn't figure out where. -reeve On Tue, 11 Jan 2005 14:46:45 -0500, Tom Smith <tss_inc@xxxxxxxxxxxxx> wrote: > I am writing a scheduler system which executes CL commands. Is there an API > or such what would allow me to prompt and fill in the command parms, and it > would return the resulting string back to me. Much line SEU uses. > > Thanks in advance. > > > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > > >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.