IBM I Application Development Rational Developer

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

IBM Power Systems

IBM i Application Development


Strategy

Tim Rowe
Application Business Architect, Development Environments, IBM i Development

© 2011 IBM Corporation

IBM Power Systems

New Development Paradigms


 Graphical User Experiences
– Grown from GUIs to Experiences

 Agile Development
– Work in highly collaborative groups
– Time line is strict
– Small adaptive modules

 Framework Development
– Consistency in code creation
– Component based
– Model – View – Controller
– Agile

 Services Orientation
– Componentized code
– Business based
– Distributed function

2 © 2011 IBM Corporation

1
IBM Power Systems

Services Orientation - SOA


 Modular
 Reusable
 Loosely Coupled
 Standards based

y
ector
es Dir
Servic

3 © 2011 IBM Corporation

IBM Power Systems

Application Development in the Power Market

SOA

4 © 2011 IBM Corporation

2
IBM Power Systems

Application Development Strategy for IBM i

High performance compilers


reaching to new technologies
Compilers

Common developer desktop across


operating systems
and languages

Common development
infrastructure for Power and the
world around Power

Embrace Open Source Solutions and


Partners to Complete Application
Development Portfolio

5 © 2011 IBM Corporation

IBM Power Systems

Compilers for Optimized Performance

 Compilers tightly integrated with operating systems and POWER7 hardware


 Binary compatibility
– Applications will move to POWER7 with no recompile required
S/36 and S/38 environment applications also
 Rational Open Access: RPG Edition - new offering for RPG
– Long requested feature from customers and partners

6 © 2011 IBM Corporation

3
IBM Power Systems

i Architecture
Language Runtimes (RPG, COBOL, C, C++)

Optimizes underlying IBM i and hardware

Single Level Store Object Based Architecture

Automates & optimizes storage management Enables integrity, security, virus-resistance

Integration Work Management


... ...

Integrates business components, e.g. database Provides built-in application virtualization

Technology Independent Machine Interface


Ensures application compatibility across multiple technology generations

Multi-core
Multi-threads

7 © 2011 IBM Corporation

IBM Power Systems

Commitment to RPG and COBOL

Hayden Lindsey
Vice President and Distinguished Engineer
Enterprise Modernization, Modeling,
Construction and Compilers
IBM Rational

8 © 2011 IBM Corporation

4
IBM Power Systems

Compilers on IBM i

 Rational Development Studio


– RPG, COBOL, C, and C++ compilers for IBM i
– Previously called WDS: “WebSphere Development Studio for System i”
– Designed for creating modern business applications

WebSphere Development Rational Development Studio for i


Studio for IBM i 5770-WDS

New Enhancements Stabilized Stabilized


Feature: ILE Compilers Feature: Heritage Compilers Feature: ADTS
• ILE RPG • S/36 Compatible RPG II • PDM
• ILE RPG *PRV Compiler • S/38 Compatible RPG II • SEU
• ILE COBOL • RPG/400 (RPG III)_ • SDA
• ILE COBOL *PRV Compiler • S/36 Compatible COBOL • RLU
• ILE C • S/38 Compatible COBOL
• ILE C++ • OPM COBOL
• IXLC for C/C++

9 © 2011 IBM Corporation

IBM Power Systems

RPG IV Goals for the Language

Three main goals for RPG IV


– Interoperability
• Java
• XML
• SQL
– Readability
• Free form
• Blank lines
• Comments
– Functionality
• Procedures
• Data areas/data structures
• More data types
• Extended file support

10 © 2011 IBM Corporation

5
IBM Power Systems

Modern RPG
/FREE
read file; // Get next record
dow not %eof(file); // Keep looping while we have a record
if %error;
dsply ‘The read failed’;
leave;
else;
chain(n) name database data;
time = hours * num_employees
+ overtime_saved;
pos = %scan (‘,’ : name);
name = %xlate(upper : lower : name);
exsr handle_record;
read file;
endif;
enddo;
begsr handle_record;
eval(h) time = time + total_hours_array (empno);
temp_hours = total_hours - excess_hours;
record_transaction();
endsr;
/end-free
11 © 2011 IBM Corporation

IBM Power Systems

ILE RPG enhancements

 New and updated built-in functions %LEN, %SCANRPL,


%PARMNUM
 Implicit unicode conversion for parameters
 Sort and search data structures
 Sort Ascend or descend
 Performance when returning large values
 Optional prototypes
 Support for ALIAS names in externally-described data structures
 New options for XML-INTO (also available with a PTF for 6.1)
 Support for Open Access RPG Edition (also available with a PTF
for 6.1)

12 IBM
© 2011 IBM Corporation
Confidenti
al

6
IBM Power Systems

Rational Open Access: RPG Edition

Extending RPG to reach new


interfaces

<?xml?>
Custom
Devices
XML
Future
Interfaces
Devices

Rich
RPG IV Mobile
Clients
+ Open Browsers

Access
SOA
Interface Databases
Web
Browsers

13 © 2011 IBM Corporation13

IBM Power Systems

Rational Open Access: RPG Edition


*DSPF example 5250 Screens

RPG Application

WRITE record program 5250 datastream


I/O buffer Display file
object
* DSPF
Other information:
•state
•names
•pointers

RPG Runtime Display Manager

IBM i
14 © 2011 IBM Corporation

7
IBM Power Systems

Rational Open Access: RPG Edition


*DSPF example
?
RPG Application
Handler code to manage building the
interface and proprietary information

Handler Defined
program
I/O buffer
WRITE record

Other information:
•state
•names
•pointers

RPG Runtime Display Manager

IBM i
15 © 2011 IBM Corporation

IBM Power Systems

IBM i Open Source Strategy

 Encourage Open Source vendors to port to IBM i (PASE)


 Encourage Open Source vendors to provide support
 PHP and MySQL run on IBM i
 IBM i PASE Development Team is testing other Open Source products

16 © 2011 IBM Corporation

8
IBM Power Systems

Over one-third of the Web runs on PHP

17 © 2011 IBM Corporation


17

IBM Power Systems

Open Source Solutions for i

 Zend Server Community Edition for i


– Preloaded with IBM i 7.1, 6.1, 5.4
 Zend Server for i
– Provides advanced functions
– Available from IBM with advanced support
offerings
 Zend Studio for i
– Eclipse-based development environment
– Available with one year of Silver support from
Zend for no additional charge
 Other Open Source Products:

DB2
Community
Edition

18 © 2011 IBM Corporation

9
IBM Power Systems

Modernization on IBM i with PHP

Leverage Existing Infrastructure to Develop &


Run Dynamic Web Applications Easily

Expose part of New/Packaged Web


RPG Application Application on IBM i

Access DB2/400 Access RPG Programs


Data via Browser & Data as Web Services

19 © |2011
22-Sep-11 | 19
IBM Corporation
19 Modernizing IBM I legacy applications with PHP

IBM Power Systems

New Application Development Support


Web
Service
 Web Services
– New client support – WSDL2RPG - Delivered 12/10
Call Web Services natively from RPG Native calls!
WSDL converted to native RPG to encapsulate Web Service call

 Zend PHP
– New IBM i PHP Toolkit – GA EOY 2011
Call *PGM, *SVRPGM, *CMD, PASE utilities
– Enhanced Database support – May 2011
Local DB support for MySQL, DB2
Remote DB support for MsSQL, Oracle

DB2
DB2
Oracle
Oracle
Remote DB Connection

IBM/Zend MsSQL

MsSQL
PHP Toolkit MySQL
MySQL
20 © 2011 IBM Corporation

10
IBM Power Systems

PHP Integration with i - ToolKit

Easy access to IBM i data and resources from PHP


(similar to IBM ToolBox for Java)
–DB2 for i – SQL and Native
–Program call
–Procedure call
–Data Area
–Data Queue
–Message Queue
–Commands
–System values
–Spool files

http://174.79.32.155/wiki/XMLService/XMLService

21 © 2011 IBM Corporation

IBM Power Systems

XMLSERVICE RAW XML PHP Interfaces

 The basic idea of XMLSERVICE is to allow any scripting language to use XML input/output
documents to drive XMLSERVICE job(s) calling PGMs, SRVPGMS, CMDs, PASE shells.

 Call ILE or shell scripts from local PHP OR remote PHP environment
 XML based

22 © 2011 IBM Corporation

11
IBM Power Systems

Leveraging Open Source Application Portfolio

Customer Relationship Management Help Desk


Portal

Portal
Portal

Course Management System


e-Commerce

Wiki

Bulletin Board
Content Management System

23 © 2011 IBM Corporation

IBM Power Systems

Rational Developer for Power Systems Software

Rational Developer for Power V8.0


•RPG and COBOL for IBM i
•COBOL for AIX  IBM XL C/C++ for AIX and Linux V11.1
•C/C++ for AIX  IBM XL Fortran for AIX and Linux V13.1
•C/C++ for Linux on Power  IBM COBOL for AIX V4.1
•C/C++ Development Studio for AIX
 IBM PL/I for AIX V2
•COBOL Development Studio for AIX
•Power Tools for AIX  IBM Rational Development Studio V7.1
•Power Tools for IBM i  IBM i compilers
•Power Tools for Linux on Power  Rational Open Access: RPG Edition V1.1
•Linux Desktop Support
24 © 2011 IBM Corporation
24

12
IBM Power Systems

Rational Developer for Power: RPG and COBOL


Remote System Explorer (RSE)

 Perspective for access to


remote IBM i servers
 Reusable actions, dialogs,
widgets, APIs
 Editor for traditional IBM i
application code
– RPG, COBOL, C,
C++, Java & DDS
 Interface to the compilers
 Debugger
– Multi-language

25 © 2011 IBM Corporation

IBM Power Systems

Productivity & Innovation – why its important

Productivity: The measure of output from a process, such as output per labor-hour.

Higher More
Higher Cost
More Application
Profit Output
Profit Effectiveness
Output Modernization

Job Accelerate 20% Boost


Growth Growth
Satisfaction Innovation In developer
Productivity1

¹ Based on IBM customer study, “Making a Business Case for IBM Rational Developer for i”

26 © 2011 IBM Corporation

13
IBM Power Systems

Why RD Power? Developer View (the fun stuff!)


Modern, Eclipse-based, development tools for IBM i
Visual editors, outline views, content assist, integrated language help
Integrated file management, search, edit, compile/build, debug capabilities
Analysis tools (application diagram, call hierarchies, type hierarchies)
Easily debug batch, interactive, and Web applications and Web services with a common
visual debugger
Visual DDS design tools: Screen and Report Designer
Integration with Rational Team Concert

27 © 2011 IBM Corporation

IBM Power Systems

Show me the features

Remote Systems LPEX Editor

28 © Copyright 2011 IBM Corporation © 2011 IBM Corporation


28

14
IBM Power Systems

From this…

PDM & SEU – the editor…

29 © Copyright 2011 IBM Corporation © 2011 IBM Corporation


29

IBM Power Systems

To this… Best of Both Worlds

 SEU look and feel


– Prefix commands
– Format bar
 Modern look and feel
– Colors!
– Modern editor features

Shortcut to open a
member, Ctrl + Shift +
A
30 © Copyright 2011 IBM Corporation © 2011 IBM Corporation
30

15
IBM Power Systems

Undo / Redo * means editor has Number of changes


unsaved changes made since last save.

 Unlimited undo / redo inside of LPEX editor


– Undo changes right back to when member was originally opened
– Even if editor was saved during the editing period
– Edit > Undo | Redo or use more common keyboard shortcuts Ctrl + Z | Ctrl + Y

31 © Copyright 2011 IBM Corporation © 2011 IBM Corporation


31

IBM Power Systems

Copy and Paste

Block copy / paste

Prefix commands for


copy / paste Stream based copy / paste
(typical of Workstation software)
Uses Windows Clipboard, paste
into another editor, email, or
document editor.
32 © Copyright 2011 IBM Corporation © 2011 IBM Corporation
32

16
IBM Power Systems

Outline View and Content Assist

Cross reference
information

Content assist helps jog


your memory (opcodes,
BIFs, fields)

Templates provide a quick way


to insert common code patterns
(free form and SQL). Predefined
33 or ©define
Copyrightyour own!
2011 IBM Corporation © 2011 IBM Corporation
33

IBM Power Systems

From this…

Compile Errors

34 © Copyright 2011 IBM Corporation © 2011 IBM Corporation


34

17
IBM Power Systems

…To This
Launch compiles
directly from editor or
pop-up menu.

Compile errors
automatically downloaded
and shown in Error List

Double clicking on an error opens editor and


35
positions to the line © 2011 IBM Corporation
© Copyright 2011 IBM Corporation 35

IBM Power Systems

From this…

Application Diagram ???

36 © Copyright 2011 IBM Corporation © 2011 IBM Corporation


36

18
IBM Power Systems

Application Diagram
Subroutine ChgOrder calls
something inside the
ROUTINES member

ORDENTR
ORDENTRmembermember
expanded
expandedtotoview
viewaa
call
callgraph
graph

Subroutine RqsPart calls


subroutine Process

Subroutine WrtDtaQ calls


program QSNDDTAQ

37 © Copyright 2011 IBM Corporation © 2011 IBM Corporation


37

IBM Power Systems

Application Diagram

 Application Diagram
– Provides developers with a graphical overview of the structure of their native i5/OS
applications
Call graph showing subroutine, procedure, and program calls
ILE program and service program bindings
– Currently supports ILE RPG, ILE COBOL, CL, programs and service programs

38 © Copyright 2011 IBM Corporation © 2011 IBM Corporation


38

19
IBM Power Systems

From this…

Build DDM Screens

39 © Copyright 2011 IBM Corporation © 2011 IBM Corporation


39

IBM Power Systems


Report Designer & Screen Designer

Screen controls allow you Outline view for


to specify which records navigating in the editor
should be visualized and selecting the file,
together in the design area. records and fields.

Palette: drag and drop


parts from the palette
to the design area.
Design, source and
Design area
preview modes

Use properties view to


modify attributes and
keywords for the file,
records and fields.

40 © Copyright 2011 IBM Corporation © 2011 IBM Corporation


40

20
IBM Power Systems

From this…

Integrated Debugger

41 © Copyright 2011 IBM Corporation © 2011 IBM Corporation


41

IBM Power Systems

Debug View controls


Work with breakpoints Real time monitoring
the debugger
(enable / disable, remove, of the field values
add, conditional)

Breakpoint (set / remove


by double clicking)

42 © Copyright 2011 IBM Corporation © 2011 IBM Corporation


42

21
IBM Power Systems

Launching the Debugger Attach to a job


One Click Actions (STRSRVJOB)

Always use Service Entry


Points to debug any ILE
program / service program!

Single click debug for batch


(don’t use for interactive – use
service entry points or debug
job)
43 © Copyright 2011 IBM Corporation © 2011 IBM Corporation
43

IBM Power Systems

JVM Improves Java Performance


V5R4 GA V6R1 GA

1400
Transactions per Second

+68% +78%
1200
1000
800
600
400
200
0
Native JDBC Toolbox JDBC

 IBM 32-bit & 64-bit Java™ Virtual Machine


– Shared technology with AIX & Linux improves performance & portability
 Exceptional Java environment and performance. Built by IBM for Power
– Fully compatible with other industry standard Java applications
– Can be called by APIs or directly from RPG
 IBM Java ToolBox
– Pre-coded Java classes to access native IBM i artifacts – files, data queues, etc

44 © 2011 IBM Corporation

22
IBM Power Systems

IBM Rational Application Developer (RAD)


• Eclipse-based Java development environment
• Full support for J2EE, web, web services, etc

45 © 2011 IBM Corporation

IBM Power Systems

Rational Application Developer Standard Edition

 Java Web Development tool


 Use RAD SE to build rich Java internet
applications
– improve online user experience
– increase customer satisfaction
 Visual development for Web 2.0
– significant productivity benefits
 Award winning! – 2009 Evans Data Users Choice:
Software Development

46 © 2011 IBM Corporation

23
IBM Power Systems

New RPG stuff for IBM i 7.1


the Details…..

47 IBM
© 2011 IBM Corporation
Confidenti
al

IBM Power Systems

RPG: %LEN(varying : *MAX)


Problem solved by %LEN(*MAX):
Starting in V6R1, calculations involving the size of the varying-length prefix
became error-prone because the size might be either 2 or 4.
In V6R1, %ADDR was enhanced with %ADDR(*DATA) to simplify getting the
address of the data part. Previously, programmers added 2 to %ADDR.
%LEN(*MAX) simplifies getting the maximum length of the data part.
Previously, programmers subtracted 2 from %SIZE, and then divided by 2 for
UCS-2 and DBCS.

Get the maximum number of characters for a varying field.


D char_varying S 5000A VARYING
/free
// Pass address and length of the data
conv (%addr(char_varying : *data)
: %len(char_varying : *max));

48 IBM
© 2011 IBM Corporation
Confidenti
al

24
IBM Power Systems

RPG: New built-in function %SCANRPL

Problem solved by %SCANRPL:


 Hand-written versions of scan-and-replace tend to be large, error prone,
and difficult to maintain.
 The %SCANRPL built-in function replaces all occurrences a string with
another string.

fileErr = ’File &1 not found. Please create &1.’;


msg = %scanrpl (’&1’ : filename : fileErr);

// msg = ’File MYFILE not found. Please create MYFILE.’

49 IBM
© 2011 IBM Corporation
Confidenti
al

IBM Power Systems

RPG: New built-in function %PARMNUM

Problem solved by %PARMNUM:


Parameter-information APIs such as CEEDOD or CEETSTA
require a parameter’s number.
The %PARMNUM built-in function returns a parameter’s
position in the parameter list.
Soft-coding the parameter’s number makes the code easier to
read and maintain.

D myProc pi 10A OPDESC


D company 25A OPTIONS(*VARSIZE)
D city 25A OPTIONS(*VARSIZE)

CEEDOD (2 : more parms); // hard to understand


CEEDOD (%PARMNUM(city) : more parms); // better

50 IBM
© 2011 IBM Corporation
Confidenti
al

25
IBM Power Systems

RPG: Implicit CCSID conversion - parms


 Implicit CCSID conversion is now supported for prototyped parameters passed by VALUE
and by read-only reference (CONST)
 This reduces the number of code changes that have to be made when a database field is
changed from alphanumeric or DBCS to Unicode (UCS-2 or UTF-16).
 Prior to this change, if the type (A, C or G) of a passed parameter was not the same as the
prototype, the compiler would issue a diagnostic. With this change, the compiler will
implicitly convert the passed parameter to the type of the prototype.

In the example below, there is only one “makeTitle” procedure with a UCS-2 parameter and return
value. If the passed parameter is alpha or DBCS, it will be converted to UCS-2 on the call. The
procedure will work with the UCS-2 parameter and return a UCS-2 value. This returned value can
then be converted on assignment to alpha or DBCS, if necessary.

// makeTitle() upper-cases the parameter


// and centers it within the provided length
alphaTitle = makeTitle(alphaValue : 50);
ucs2Title = makeTitle(ucs2Value : 50);
dbcsTitle = makeTitle(dbcsValue : 50);

51 © 2011 IBM Corporation IBM


Confidenti
al

IBM Power Systems

Sort & Search

SORT AND SEARCH DATA STRUCTURE ARRAYS:


To sort or search a data structure array, one subfield is identified as the
"key" for the array, using the syntax ARRAY(*).KEYSUBFIELD.

Example: Sort the INFO array by the SALARY subfield and search for the
name. Note that 'Jack' in the NAME subfield of the INFO array.
Sort a data structure array using one subfield as a key
// sort by name
SORTA info(*).name;

// sort by due date


SORTA info(*).dueDate;

Search a data structure array using one subfield as a key


// search for a name
pos = %LOOKUP(‘Jack’ : info(*).name);

// search for today’s date


pos = %LOOKUP(%date() : info(*).dueDate);

52 © 2011 IBM Corporation

26
IBM Power Systems

RPG: Sort and search data structure arrays

 The (*) index identifies the array to be sorted. Any other arrays in the expression
must have a numeric index.
 The subfields preceding the (*) index indicate the array to be sorted. The subfields
following the (*) array represent the key to be searched or sorted.

// sort family array by age of first child


SORTA family(*).child(1).age;
// sort child array in each family by age
for i = 1 to numFamily;
SORTA family(i).child(*).age;
endfor;

53 IBM
© 2011 IBM Corporation
Confidenti
al

IBM Power Systems

RPG: Sort ascending or descending

Non-sequenced arrays can be sorted either ascending or descending.

Extender indicates a descending sort.


Extender indicates ascending (default).

D meetings S D DIM(100)
/free
// sort descending, with the
// most recent date first
sorta(d) meetings;

54 IBM
© 2011 IBM Corporation
Confidenti
al

27
IBM Power Systems

RPG: Performance returning large values

RTNPARM keyword greatly improves performance when a procedure


returns a large value
The speed of using a parameter with the convenience of using a return
value
Especially noticeable when the prototyped return value is a large
varying
length value

D center pr 100000a varying


D rtnparm
D text 50000a const varying
D len 10i 0 value
D title s 100a varying
/free
title = center ('Chapter 1' : 60);

55 IBM
© 2011 IBM Corporation
Confidenti
al

IBM Power Systems

RPG: Optional prototypes

If a program or procedure is not called by another


RPG module, it is optional to specify the prototype.

These are some of the programs and procedures that


do not require an RPG prototype
An exit program, or the command-processing
program for a command
A program or procedure that is never intended to be
called from RPG
A procedure that is not exported from the module

56 IBM
© 2011 IBM Corporation
Confidenti
al

28
IBM Power Systems

RPG: Optional prototypes

Here is an RPG module with a main procedure and a subprocedure.


No prototypes are necessary.
H main(hello)
P hello b
D pi
extpgm('HELLO')
D name 10a const
/free
sayHello();
...
P sayHello b
/free
dsply ('Hello ' + name);
...

57 © 2011 IBM Corporation57

IBM Power Systems

RPG: Support for ALIAS names


Background
 Fields in externally described files can have a standard name up to 10 characters and an alternate (ALIAS) name up to 128
characters.
 RPG III only allowed 6 characters, so many customers have files with cryptic names like CUSNAM, CUSADR. The files often
have alternate names such as CUSTOMER_NAME and CUSTOMER_ADDRESS, that can be used in SQL queries.
 RPG programmers would like to use the alternate names in their RPG programs.

New ALIAS keyword for RPG


 When ALIAS is specified, RPG will use the alternate name instead of the 10-character standard name.
 Supported on F specs for any file that will not have Input or Output specs generated. Used for LIKEREC data structures.
 Supported on D specs for any externally-described data structure.

A R CUSTREC
A CUSTNM 25A ALIAS(CUSTOMER_NAME)
A CUSTAD 25A ALIAS(CUSTOMER_ADDRESS)
A ID 10P 0

D custDs e ds ALIAS
D QUALIFIED EXTNAME(custFile)
/free
custDs.customer_name = 'John Smith';
custDs.customer_address = '123 Mockingbird Lane';
custDs.id = 12345;

58 IBM
© 2011 IBM Corporation
Confidenti
al

29
IBM Power Systems

RPG XML-INTO: new option datasubf


The new datasubf option enables XML-INTO to support XML elements in this form
<emp type=“regular” id=“13573”>John Smith</emp>

Problem solved by datasubf:


 When an XML element has attributes or child elements, the XML element (emp)
itself matches an RPG data structure and the attributes (type, id) match the
subfields. (Child elements would also match subfields.) If there is text data for the
data structure (“John Smith”), there is no XML name available for subfield
matching.
 Without the datasubf option, two XML-INTO operations would be needed to get
the data from that XML element.
– One XML-INTO would get the type and id values
– One XML-INTO would get the value “John Smith”
– The allowextra=yes option would be needed for both XML-INTOs

59 IBM
© 2011 IBM Corporation
Confidenti
al

IBM Power Systems

RPG XML-INTO: datasubf example

<emp type=“regular” id=“13573”>John Smith</emp>


RPG coding to get the information with one XML-INTO operation:
D emp ds
D id 7p 0
D type 10a
D value 100a
/free
XML-INTO emp %xml(‘emp.xml’ :
: ‘datasubf=value doc=file’);
// emp.id = 13573
// emp.type = ‘regular’
// emp.value = ‘John Smith’

60 IBM
© 2011 IBM Corporation
Confidenti
al

30
IBM Power Systems

RPG XML-INTO: new option countprefix

The new countprefix option enables RPG programmers to get more information about an
XML document using XML-INTO.

Problem solved by countprefix:


 When an XML element has a variable number repeating elements, it matches an RPG
array. The RPG programmer has to code the maximum elements for the RPG array, but
the XML document will usually have fewer elements.
 Without the countprefix option,
– The allowmissing=yes option would be required, also allowing other necessary data to
be missing
– The RPG programmer would have to figure out how many XML elements there were
by looking for some default value.

61 IBM
© 2011 IBM Corporation
Confidenti
al

IBM Power Systems

RPG XML-INTO: countprefix

The countprefix option gives the prefix for the subfields to receive the count of the number of
XML elements used to fill the RPG array.
<team>
<manager>Jack Spratt</manager>
<emp>John Smith</emp>
<emp>Mary Jones</emp>
</team>
The RPG data structure.
D team DS
D manager 25A
D emp 25A dim(100)
D numemp 10i 0

No "numemp" tag in the XML for subfield "numemp".

62 IBM
© 2011 IBM Corporation
Confidenti
al

31

You might also like