× 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


I have problem with run this API

When I run this I have a message CPF0008 error
 (Value in option control block not valid.)

I don;t know what I can do with this.

This is a example of my source


Please Help me

Best Regards
Leszek Gruszczynski



Program:

C                   EVAL      CMDTXT = 'WRKNETF USER(' +
C                                        RUSRN +    ') ' +
C                                       'OUTPUT(*OUTFILE) ' +
C                                       'OUTFILE(' + %TRIMR(RLIBR) + '/' +
C                                       'NETFLST' +')'
 *
C                   EVAL      RERROR = RUNCMD(CMDTXT)
C     RERROR        DSPLY


Service program:

 *                               PROCESS COMMANDS API

 *****************************************

 * PROCESS COMMAND API CALL              *

 *****************************************

DAPIQCAPCMD       PR                  EXTPGM('QCAPCMD')

D PR_CMD                     32702A   CONST OPTIONS(*VARSIZE)
SOURCE COMMAND STRIN
D PR_CMDLEN                      9B 0 CONST
LENGTH COMMAND
D PR_OPTCRT                           LIKE(QCAP0100)
OPTIONS CONTROL BLK
D PR_OPTLEN                      9B 0 CONST
OPT CNT BLK LEN
D PR_OPTFMT                      8A   CONST
OPT CNT FMT NAME
D PR_CHGCMDS                    10A   CONST
CHG COMMAND STRING
D PR_CHGCMDL                     9B 0 CONST
CHG CMD LEN
D PR_RTNCMDL                     9B 0 CONST
RTN CHG CMD LEN
D PR_APIERR                           LIKE(QUSEC)
API ERROR

*****************

 *******************************************

 * RUN COMMAND                             *

 *******************************************

P RUNCMD          B                   EXPORT

D RUNCMD          PI             7A

D  PR_CMD2                   32702A   CONST OPTIONS(*VARSIZE)

 *

D P_CMDLEN        S              9B 0

D P_OPTLEN        S              9B 0 INZ(20)
OPT CNT BLK LEN
D P_CHGCMDS       S             10A   INZ
CHG COMMAND STRING
D P_CHGCMDL       S              9B 0 INZ
CHG CMD LEN
D P_RTNCMDL       S              9B 0 INZ
RTN CMD LEN
D P_OPTFMT        S              8A   INZ('CPOP0100')
OPT FORMAT NAME
*
C                   EVAL      QCACMDPT = 0
COMMAND PROCESS TYPE
C                   EVAL      QCABCSDH = '0'
DBCS DATA HANDLING
C                   EVAL      QCAPA    = '0'
PROMPTER ACTION
C                   EVAL      QCACMDSS = '0'
COMMAND STRING SYNTA
C                   EVAL      QCAMK    = *BLANKS
MESSAGE KEY
C                   EVAL      QCAERVED = X'0F'
RESERVED


 *

C                   EVAL      P_CMDLEN = %LEN(PR_CMD2)

 *

 *

C                   CALLP     APIQCAPCMD(PR_CMD2:P_CMDLEN:QCAP0100:

C                                        P_OPTLEN:P_OPTFMT:P_CHGCMDS:

C                                        P_CHGCMDL:P_RTNCMDL:QUSEC)

 *

C                   RETURN    QUSEI

 *

P  RUNCMD         E





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.