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



> The API Retrieve Command Definition (QCDRCMDD) will return command
> parameter defaults.  The output is in UTF-8 (an encoding of Unicode) XML so
> you may want to first retrieve the definition to an Integrated File System
> stream file and then look at the results using EDTF before trying to parse
> through the results in RPG (so you know what you're getting into).

Hello Peter,

Here's a sample program you can place in debug and have a look at the API 
output:

     **-- API Error Data Structure:  -----------------------------------------**
     D ApiError        Ds
     D  AeBytPro                     10i 0 Inz(%Size(ApiError))
     D  AeBytAvl                     10i 0
     D                                1a
     D  AeExcpId                      7a
     D  AeExcpDta                   126a
     **-- Global variables:  -------------------------------------------------**
     D OutStrLenRt     s             10i 0
     D NotSup          s             10i 0
     D FB              s             10i 0 Dim( 3 )
     **-- Command return variable:  ------------------------------------------**
     D CdCmdd0100      Ds
     D  CdBytRtn                     10i 0
     D  CdBytAvl                     10i 0
     D  CdCmdXml                  10240a
     **-- Retrieve Command Text:  --------------------------------------------**
     D RtvCmdTxt       Pr                  ExtPgm( 'QCDRCMDD' )
     D  RcCmdNamQ                    20a   Const
     D  RcDst                        10i 0 Const
     D  RcDstFmt                      8a   Const
     D  RcRcvVar                  32767a         Options( *VarSize )
     D  RcRcvFmt                      8a   Const
     D  RcError                   32767a         Options( *VarSize )
     **-- Convert String: ----------------------------------------------------**
     D CvtString       Pr                  ExtPgm( 'QTQCVRT' )
     D  CsInpCcsId                   10i 0 Const
     D  CsInpStrTyp                  10i 0 Const
     D  CsInpStr                  32767a   Const Options( *VarSize )
     D  CsInpStrSiz                  10i 0 Const
     D  CsOutCcsId                   10i 0 Const
     D  CsOutStrTyp                  10i 0 Const
     D  CsOutCvtAlt                  10i 0 Const
     D  CsOutStrSiz                  10i 0 Const
     D  CsOutStr                  32767a         Options( *VarSize )
     D  CsOutStrLenRt                10i 0
     D  CsNotSup                     10i 0
     D  CsFB                         10i 0 Dim( 3 )
     **
     **-- Mainline:  ---------------------------------------------------------**
     **
     C                   CallP     RtvCmdTxt( 'WRKJOB    QSYS      '
     C                                      : %Size( CdCmdd0100 )
     C                                      : 'DEST0100'
     C                                      : CdCmdd0100
     C                                      : 'CMDD0100'
     C                                      : ApiError
     C                                      )
     **
     C                   CallP     CvtString( 1208
     C                                      : 0
     C                                      : CdCmdXml
     C                                      : CdBytRtn
     C                                      : 37
     C                                      : 0
     C                                      : 0
     C                                      : CdBytRtn
     C                                      : CdCmdXml
     C                                      : OutStrLenRt
     C                                      : NotSup
     C                                      : FB
     C                                      )
     **
     C                   Return
     **

Best regards,
Carsten Flensburg



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.