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



You have to pass the command string length to QCMDEXC.

Here's how I use QCMDEXC...

I have a copybook with the Prototype for the QCMDEXC procedure/program
defined like so:

DRun              PR                  ExtPgm('QCMDEXC')          
D CmdStr                      3000A   Const Options(*VarSize)    
D CmdLen                        15P 5 Const                      
D CmdDBCS                        3A   Const Options(*NoPass)     

Then in my code I can just do this:

/free
         cmd = 'RNM OBJ(''/pdf/2.pdf'') NEWOBJ(''test.pdf'')';
         Run(Cmd:%Len(%Trim(Cmd)));
/end-free

It's even better when you use a varying size field for the command
string
D Cmd                         3000A                  Varying

Then you can just do this:

/free
         cmd = 'RNM OBJ(''/pdf/2.pdf'') NEWOBJ(''test.pdf'')';
         Run(Cmd:%Len(Cmd);
/end-free

Thanks,
Tommy Holden


-----Original Message-----
From: rpg400-l-bounces+tommy.holden=hcahealthcare.com@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+tommy.holden=hcahealthcare.com@xxxxxxxxxxxx] On
Behalf Of Alan Shore
Sent: Wednesday, March 15, 2006 1:49 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Help with call command QCMDEXC


Is there already an object out there called test.pdf?



Alan Shore

NBTY, Inc
(631) 244-2000 ext. 5019
AShore@xxxxxxxx


 

             "Willie J. Moore"

             <WMoore@calfinewi

             re.com>
To 
             Sent by:                  <rpg400-l@xxxxxxxxxxxx>

             rpg400-l-bounces@
cc 
             midrange.com

 
Subject 
                                       Help with call command QCMDEXC

             03/15/2006 02:36

             PM

 

 

             Please respond to

              RPG programming

              on the AS400 /

                  iSeries

             <rpg400-l@midrang

                  e.com>

 

 





I have a program that I want to use the 'QCMDEXC' command.
When I try to call it I get the following error:
 "Cannot resolve to object qcmdexc. Type and Subtype X'0201' Authority
X'0000'."

Here is a copy of the program:
Dparms            DS
Dcmd                      1    255
 /free
       cmd = 'RNM OBJ(''/pdf/2.pdf'') NEWOBJ(''test.pdf'')';
 /end-free
C                   call      'qcmdexc'
C                   PARM                    cmd
C                   seton                                        lr

Any help or pointers would be appreciated.

William Moore....

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


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.