×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Simon,

thank you very much. This will save me much time.

Kind regards,
GEFIS Gesellschaft für
Individual-Software mbH
Werner Noll

-----Ursprüngliche Nachricht-----
Von: Simon Coulter [mailto:shc@flybynight.com.au]
Gesendet: Dienstag, 6. August 2002 15:34
An: rpg400-l@midrange.com
Betreff: Re: Additional Error Specs from C-Proc. 'system'



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  / \
--------------------------------------------------------------------

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
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-2026 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.