|
Tom, Try this link. If you have trouble let me know and I can post it again. http://archive.midrange.com/rpg400-l/200401/msg00005.html Rick -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Tom Jedrzejewicz Sent: Thursday, November 11, 2004 1:08 PM To: RPG programming on the AS400 / iSeries Subject: Re: QCMDEXC Care to post the code for the module? On Thu, 11 Nov 2004 08:55:40 -0600, rick.chevalier@xxxxxxxxxxxxxxx <rick.chevalier@xxxxxxxxxxxxxxx> wrote: > There is also a third option. The QCAPCMD API is a more robust version of > QCMDEXC. I prefer it over QCMDEXC because it returns error information as > well as having command prompting and validation options. I have actually > wrapped it into a module that I call from my other RPG programs. > > You can find more information about it at this link > http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm. > > Rick > > > > -----Original Message----- > From: rpg400-l-bounces@xxxxxxxxxxxx > [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Bruce Odum > Sent: Thursday, November 11, 2004 6:22 AM > To: RPG programming on the AS400 / iSeries > Subject: RE: QCMDEXC > > You have two options here they are > > In this example you have to build the cmdstr and use callp > If you want to send and receive values you need to do it this way > * Run Procedure > D Run PR ExtPgm('QCMDEXC') > D Cmdstr 3000A Options(*VarSize) > D Cmdlen 15P 5 Const > D CmdDbcs 3A Const Options(*NOPASS) > *--------------------------------------------------------------- > C Callp Run ( cmdstr : %Size(Cmdstr) ) > > If you don't need to receive a value back you can use this > > H Bnddir( 'USXEMAIL' : 'QC2LE' ) > * Prototype for 'system' > d System PR 10I 0 ExtProc('system') > d CmdText * Value Options(*String) > d EF S 10I 0 Inz(0) > /free > > command = 'CPYTOIMPF FROMFILE(' + %TRIM(P_FILE) + ' ' + > %TRIM(P_MEMBER) + ') TOSTMF(''' + %TRIM(T_DOC) + ''')' + > ' STMFCODPAG(*PCASCII) RCDDLM(*CR) DTAFMT(*FIXED)'; > > EF = system(command); > /endfree > > -- > 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. > > -- Tom Jedrzejewicz tomjedrz@xxxxxxxxx -- 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.