IBM I tutorial: IBM Java Toolbox for I use PCML remote Invoke RPG

Source: Internet
Author: User
Tags web services

Compared with the traditional green screen IBM I applications, many modern IBM I applications are based on web technology, that is, the front-end uses a web-based graphical user interface, back-end reuse of traditional RPG and COBOL business programs. How to realize software reuse is an important goal of IBM I application modernization. On the one hand, the IBM integrated Web Services for I server based on Web service technology can publish traditional RPG and COBOL applications as Web service to realize software reuse; On the other hand, as IBM Java application programming interface, IBM Java Toolbox for I can invoke RPG and COBOL through the relevant programming interface, also achieve the goal of software reuse. Programme call Markup Language (PCML), the XML Description language for IBM I server-side program parameters, greatly simplifies the client programming model for Web service and IBM Java Toolbox for I. The main goal of this article is to instruct readers how to reuse traditional RPG and COBOL business programs using the IBM Java Toolbox for I programming model combined with the PCML language. Web service and its related technologies are not covered in this article. For a basic knowledge of IBM Java Toolbox for I, see another technical document "Toolbox for Java and Jtopen."

From the content, this article mainly divides into 3 parts. The first part mainly introduces PCML related basic knowledge, including PCML concept, grammar, use method and so on. In the second section, we will surround the IBM Java Toolbox for I-related PCML class, and combine the sample to invoke the RPG program to achieve the goal of software reuse. Performance optimization is also one of the key elements in this section. The last part is the summary.

As a sample, ' User ID ' RPG program rtvsts. PGM's business logic is to query the database based on the user ID number entered, and return the corresponding identity information.

PCML

As an xml-based markup language, PCML's design goal is to describe the input and output parameters of IBM I server-side programs, and to reduce the code that is invoked by client programs.

As an example, listing 1 describes the input and output parameters corresponding to the ' User Identity query ' RPG program. The input parameter CustID represents the user's query ID, and the output parameter status represents the return result of the identity information query.

Listing 1. PCML Sample-Describe user identity information

<pcml>

<program name= "rtvsts" path= "/QSYS.LIB/DEMO.LIB/RTVSTS.PGM" >

<data name= "CustID" usage= "input" type= "int" >

<data name= "status" usage= "Output" type= "char" length= ">"

</program>

</pcml>

From a grammatical point of view, the root tag of the PCML is <pcml> The following 3 kinds of tags are nested:

<program> label describes IBM I program. For more information on <program> labels and related properties, see the IBM I Information Center PCML program Tag section.

The <data> tag describes the parameters of the IBM I program, and the corresponding parameter is the underlying type. For a detailed description of <data> tags and related properties, see the IBM I Information Center PCML the data Tag section.

The <struct> label describes the parameters of the IBM I program, and the corresponding parameter type is the structure. For a detailed description of <struct> tags and related properties, see the IBM I Information Center PCML struct Tag section.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.