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



Hello Werner,

You wrote:
>I agree with your arguments. I never used QCAPCMD before and had now a
>look to IBM's API docu. One question to your example snippet: You
>specified for optCtlBlk a LIKE(Qca_PCMD_CPOP0100). What is this reference
>data structure?

It is the control structure that should be passed as this parameter.

>Is it standard or your own built? Where is it located? I didn't find it
>in other command descriptions.

There is an IBM one in QSYSINC but the IBM includes for RPG IV are really
crappy.  The prototype I posted is my own.  Here is the full include:

      /if defined(QCAPCMD_h)
      /eof
      /else
      /define QCAPCMD_h
      *** START HEADER FILE SPECIFICATIONS
************************************
      *
*
      * Header File Name  . . . . : QCAPCMD
*
      *
*
      * Descriptive Name  . . . . : Process Commands API.
*
      *
*
      * Copyright:
*
      *   (C) Copyright FlyByNight Software Pty. Ltd. 2000
*
      *       All rights reserved.
*
      *
*
      * Description . . . . . . . : Header file for QCAPCMD API which is
used *
      *                             to perform caommand analyzer
processing   *
      *                             on command strings.
*
      *
*
      * Header Files Included . . : *NONE
*
      *
*
      * Macros List . . . . . . . : *NONE
*
      *
*
      * Structure List  . . . . . : Qca_PCMD_CPOP0100_t
*
      *
*
      * Function Prototype List . : QCAPCMD
*
      *
*
      * Notes:
*
      *   Dependencies  . . . . . :
*
      *
*
      *   Restrictions  . . . . . :
*
      *
*
      *   Comments  . . . . . . . : Define the macro LONG_PROC_NAMES if
you   *
      *                               want meaningful procedure names.
*
      *
*
      * Change Activity:
*
      *               Rlse &
*
      * Flag Reason   Level  Date   Pgmr       Comments
*
      * ---- -------- ------ ------ ----------
------------------------------ *
      * $A0=          VRM310 010128 SHC        New include.
*
      *
*
      *
*
      *  Change activity detail:
*
      *
*
      *** END HEADER FILE SPECIFICATIONS
**************************************


*************************************************************************
      * Constants for QCAPCMD
*

*************************************************************************
      * -- Format constants
     D $CA_FMT_CPOP0100...
     D                 C                   CONST('CPOP0100')
      * -- Syntax constants
     D $CA_AS400_SYNTAX...
     D                 C                   CONST('0')
     D $CA_S38_SYNTAX...
     D                 C                   CONST('1')
      * -- DBCS constants
     D $CA_DBCS_IGNORE...
     D                 C                   CONST('0')
     D $CA_DBCS_RESPECT...
     D                 C                   CONST('1')
      * -- Prompter action constants
     D $CA_PROMPT_NO...
     D                 C                   CONST('0')
     D $CA_PROMPT_YES...
     D                 C                   CONST('1')
     D $CA_PROMPT_SLT...
     D                 C                   CONST('2')
     D $CA_SHW_HELP...
     D                 C                   CONST('3')
      * -- Processing type constants
     D $CA_RUN_CMD...
     D                 C                   CONST(0)
     D $CA_CHK_CMD...
     D                 C                   CONST(1)
     D $CA_RUN_CMD_LINE...
     D                 C                   CONST(2)
     D $CA_CHK_CMD_LINE...
     D                 C                   CONST(3)
     D $CA_CHK_CLP_CMD...
     D                 C                   CONST(4)
     D $CA_CHK_CL_JOB...
     D                 C                   CONST(5)
     D $CA_CHK_CDO...
     D                 C                   CONST(6)
     D $CA_CHK_BND_LNG...
     D                 C                   CONST(7)
     D $CA_CHK_USR_DEF_OPT...
     D                 C                   CONST(8)
     D $CA_CHK_CLLE_CMD...
     D                 C                   CONST(9)


*************************************************************************
      * Structure for CPOP0100
*

*************************************************************************
     D Qca_PCMD_CPOP0100...
     D                 DS
     D   Qca_Cmd_Process_Type...
     D                               10I 0
     D   Qca_DBCS_Data_Handling...
     D                                1
     D   Qca_Prompter_Action...
     D                                1
     D   Qca_Cmd_String_Syntax...
     D                                1
     D   Qca_Msg_Key                  4
     D   Qca_Rsvd                     9


*************************************************************************
      * Prototype for calling Command Analyzer API QCAPCMD
*

*************************************************************************
      /if defined(LONG_PROC_NAMES)
     D QcaProcessClCmd...
     D                 PR
      /else
     D QCAPCMD         PR
      /endif
     D                                     EXTPGM('QCAPCMD')
      *
      * Required parameter group:
      *                              Command string to process
     D  clCmd                     32702    CONST OPTIONS(*VARSIZE)
      *                              Length of command string
     D  cmdLen                       10I 0 CONST
      *                              Options control block
     D  optCtlBlk                          LIKE(Qca_PCMD_CPOP0100)
     D                                     CONST OPTIONS(*VARSIZE)
      *                              Length of options control block
     D  optCtlBlkLen                 10I 0 CONST
      *                              Format of options control block
     D  format                        8    CONST
      *                              Changed command string
     D  chgClCmd                  32767    OPTIONS(*VARSIZE:*OMIT)
      *                              Length provided for changed command
string
     D  chgClCmdLenProv...
     D                               10I 0 CONST
      *                              Length available for changed command
string
     D  chgClCmdLenAvail...
     D                               10I 0
      *                              Error code
     D  errorCode                  1024    OPTIONS(*VARSIZE)

      /endif



Regards,
Simon Coulter.
--------------------------------------------------------------------
   FlyByNight Software         AS/400 Technical Specialists
   http://www.flybynight.com.au/

   Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
   Fax:   +61 3 9419 0175   mailto: shc@flybynight.com.au   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------



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.