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



>I am calling QCDRCMDD using pcml and I retrieve the XML command data into
a
>variable in Java (Not a XML file)(Destination format DEST0100).

>I am able to call the command and it completes without error but I am not
>able to convert the xml string to a usable character representation.

>From a recent Club Tech iSeries Programming Tips Newsletter:
"APIs BY EXAMPLE: RETRIEVE COMMAND INFORMATION
Occasionally, I see that somebody has a need to retrieve some detail about
a
command. For example, the default value for a command parameter is one
popular
area. With API QCDRCmdD (Retrieve Command Definition), you can retrieve
information used in creating commands, such as default parameter values.
The API
returns information in XML format that you can parse for the details that
interest you. The API returns the information in UTF-8 (CCSID 1208), which
you
can convert to human-readable form using API QTQCvrt (Convert a Graphic
Character String). You can look in the Document Type Definition (DTD) in
/QIBM/XML/DTD/ QcdCLCmd.dtd for details of the XML tags returned by the
API."

      *
-----------------------------------------------------------------
      *    - CvtGraphicCharStr -  Convert character graphic string
-
      *                           (QTQCvrt API)
-
      *    -
-
      *    - Parameters:   Usage   Description
-
      *    -
-
      *    -               Input   CCSID of data being converted
-
      *    -               Input   Input string type
-
      *    -               Input   Data to convert
-
      *    -               Input   Length of data to convert
-
      *    -               Input   CCSID of converted data
-
      *    -               Input   Output string type
-
      *    -               Input   Conversion alternative
-
      *    -               Input   Length allocated for converted data
-
      *    -               Output  Converted data
-
      *    -               Output  Converted data length
-
      *    -               Output  Unsupported parameter
-
      *    -               Output  Feedback codes
-
      *
-----------------------------------------------------------------

     D CvtGraphicCharStr...
     D                 Pr                  ExtPgm( 'QTQCVRT' )
     D  ParameterIn                  10I 0 Const
     D  ParameterIn                  10I 0 Const
     D  ParameterIn               32000    Const
     D                                     Options( *VarSize )
     D  ParameterIn                  10I 0 Const
     D  ParameterIn                  10I 0 Const
     D  ParameterIn                  10I 0 Const
     D  ParameterIn                  10I 0 Const
     D  ParameterIn                  10I 0 Const
     D  ParameterOut              32000    Options( *VarSize )
     D  ParameterOut                 10I 0
     D  ParameterOut                 10I 0
     D  ParameterOut                 10I 0 Dim( 3 )

- - - - - -

       //
=================================================================
       //  = Convert retrieved command information to human-readable form
=
       //
=================================================================

           CvtGraphicCharStr
           (
             1208                :
             0                   :
             CmdCrtInfo          :
             CmdCrtInfo.BytesRtn :
             37                  :
             0                   :
             0                   :
             CmdCrtInfo.BytesRtn :
             CmdCrtInfo          :
             OutputStrLen        :
             UnsupportedParm     :
             Feedback
           ) ;

Regards,

Stefan Tageson
Intentia Consulting Sverige AB
Propellergatan 1, SE-211 19 Malmö, Sweden
Phone: +46 (0)40 691 35 00
Cell: +46 (0)733 913 813
Fax: +46 (0)40 691 3900
E-mail: stefan.tageson@intentia.se




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.