× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks for the information. I have recorded it for posterity.
Jack

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Bruce Odum
Sent: Thursday, November 11, 2004 7: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

-----Original Message-----
From: Jack Derham [mailto:derhamj@xxxxxxxxxxxxx] 
Sent: Wednesday, November 10, 2004 10:56 PM
To: RPG400-L@xxxxxxxxxxxx
Subject: QCMDEXC

How do you best integrate the use of this API into the ILE environment.
Do
you bind in the module that is going to be executed or what?

Jack Derham

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


--
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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.