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


  • Subject: RE: Help needed on QCMDEXEC.
  • From: rob@xxxxxxxxx
  • Date: Tue, 27 Mar 2001 17:23:55 -0500


That's interesting, but why wouldn't you want to bind?  It's done in an H
spec so there's nothing to remember at compile time.

Rob Berendt

==================
Remember the Cole!


                                                                                
                                       
                    jerickson@800.com                                           
                                       
                    Sent by:                 To:     RPG400-L@midrange.com      
                                       
                    owner-rpg400-l@mi        cc:                                
                                       
                    drange.com               Subject:     RE: Help needed on 
QCMDEXEC.                                 
                                                                                
                                       
                                                                                
                                       
                    03/27/01 12:54 PM                                           
                                       
                    Please respond to                                           
                                       
                    RPG400-L                                                    
                                       
                                                                                
                                       
                                                                                
                                       






You can also receive the messages without binding anything as follows:

dPsds            sds
d Ps_Proc_Name      *Proc
d Ps_Pgm_Status     *Status
d Ps_Routine        *Routine
d Ps_Parms          *Parms
d Ps_Excp_Msg_Id                 7    Overlay(Psds:40)
d  Ps_Excp_Type                  3    Overlay(Ps_Excp_Msg_Id)
d  Ps_Excp_Num                   4    Overlay(Ps_Excp_Msg_Id:3)

:
:
d Qcmdexc         pr                  Extpgm('QCMDEXC')
d  Cmd                                Like(Qcmd) Options(*Varsize) Const
d  Cmdlen                       15p 5 Const
d  CmdOpt                        3    Options(*NoPass) Const

d Qcmd            s           3000

:
:
c                   Eval      Qcmd = CrtDupP1 + %Trimr(DtaLib)
c                                  + CrtDupP2
c                   CallP(e)  Qcmdexc(Qcmd : %Len(%Trim(Qcmd)))
c                   If        %Error And
c                             Ps_Excp_Msg_Id = 'CPF2130'
c                   Eval      Qcmd = ClrPfmWk
c                   CallP     Qcmdexc(Qcmd : %Len(%Trim(Qcmd)))
c                   EndIf

HTH,

Regards,
Jon A. Erickson
Sr. Programmer Analyst
800.COM Inc.
1516 NW Thurman St
Portland, OR  97209-2517

Direct: 503.944.3613
Fax: 503.943.9313
Web: http://800.com




-----Original Message-----
From: rob@dekko.com [mailto:rob@dekko.com]
Sent: Tuesday, March 27, 2001 8:59 AM
To: RPG400-L@midrange.com
Subject: Re: Help needed on QCMDEXEC.


I would recommend the following instead.  This gives you a MONMSG for your
commands right in your RPG programs.

H Bnddir('QC2LE')
H ActGrp(*caller)
H DftActGrp(*NO)
 * Execute Command (system) Subprocedure Variables
D System          PR            10I 0 ExtProc('system')
D  CmdText                        *   Value Options(*String)

D ErrorCPF        S              7A   Import('_EXCP_MSGID')
D ErrorFlag       S             10I 0 Inz(0)
C                   Eval      ErrorCPF=Blanks
C
C                   Eval      ErrorFlag=system(cmd)
C                   If        ErrorFlag<>0
C                   Select
C                   When      ErrorCPF='CPF1111'
C*                  ...
C                   When      ErrorCPF='CPF2222'
C*                  ...
C                   Other
C*                  ...
C                   EndSL
C                   EndIf

Rob Berendt

==================
Remember the Cole!

                    Dan Miller
                    <DanM@HarkerInc.c        To:
"'RPG400-L@midrange.com'" <RPG400-L@midrange.com>
                    om>                      cc:
                    Sent by:                 Subject:     Help needed on
QCMDEXEC.
                    owner-rpg400-l@mi
                    drange.com
                    03/27/01 10:59 AM
                    Please respond to
                    RPG400-L



How about this one.

 D QCmdExc         PR                  ExtPgm('QCMDEXC')
 D                              256    Options(*Varsize) Const
 D                               15  5 Const

 C                   CallP     QCmdExc(Command:%len(Command))

Daniel R. Miller, VP T&E
Harker, Inc.
33 N. Wickliffe Cir.
Youngstown, OH 44515
(330) 792-0154
www.harkerinc.com

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---




+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-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 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.