+ All Categories
Home > Documents > What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i...

What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i...

Date post: 06-May-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
111
© 2014 Trevor Perry "What Can i do?” An IBM i Developer’s Introduction to Everything! Trevor Perry – Chief Architect. Angus Thinks! March 2014
Transcript
Page 1: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?” An IBM i Developer’s Introduction to Everything!

Trevor Perry – Chief Architect. Angus Thinks! March 2014

Page 2: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

2

Abstract

§ Many IBM i developers have not stepped out of their PDM comfort zone. They may code well in RPGIV, use ILE correctly, and build amazing applications. IBM, however, have moved on, delivering modern integrated development tools, enhancements to our core languages, and much more capability in our IBM i operating system and database. The IBM i community is beginning to take advantage of all these new capabilities, although it requires research and learning.

§ While there is no quick fix to get us all up to speed, this session is intended to touch on a wide swath of relevant topics while increasing the confidence level of the IBM i developer. If you are wondering where to start, this event will show you how. It covers a range of available tools, languages, technologies, and more, that are available on IBM i. Attendees will learn how to access the resources needed to get started with each.

Page 3: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

You and i – Steve Will

§ http://ibmsystemsmag.blogs.com/you_and_i/

Page 4: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Announcing IBM i 7.1 TR7 - 10/08/2013 § It’s announce day again, so it’s time for a blog about the latest capabilities we’re announcing related to IBM i.

§ Once again, there are a number of different areas being enhanced.

§ I can’t even touch on all of them, but here are highlights in four key areas.

– DB2 – Ruby – ARE – RPG

Page 5: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Announcing IBM i 7.1 TR7 - 10/08/2013 § It’s announce day again, so it’s time for a blog about the latest capabilities we’re announcing related to IBM i.

§ Once again, there are a number of different areas being enhanced.

§ I can’t even touch on all of them, but here are highlights in four key areas.

– DB2 – Ruby – ARE – Application Runtime Expert – RPG

Page 6: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Wait! What?

Ruby § Those of you who have been interested in having IBM i adopt the Ruby programming language more closely will be interested to hear about PowerRuby (Check out Tim Rowe’s blog.)

Page 7: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Modern-i-zation § http://iprodeveloper.com/blog/modern-i-zation

Page 8: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

IBM i 7.1 Technology Refresh 7 Highlights: Application Development § For information about the other new features included in TR7, please look at the IBM i zone in developerWorks.

§ Now, on to the good stuff! – Free-Form RPG – Java – Ruby

Page 9: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Wait! What?

Free-Form RPG § The most exciting new feature in TR7 for the application development crowd is a major change to the RPG language. In previous releases, we've been focused on making RPG "a modern business language.”

§ This statement has been a driving force behind many of the new updates and advancements we've made to RPG.

§ But inTR7, we've taken this to a whole new level.

Page 10: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Can we come back to that?

§ I want to hear more about Ruby!

Page 11: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Can we come back to that?

§ I want to hear more about Ruby!

§ Er… what is Ruby? § Why would I want Ruby?

Page 12: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Can we come back to that?

§ I want to hear more about Ruby!

§ Er… what is Ruby? § Why would I want Ruby?

§ Can we get back to Free Form RPG?

Page 13: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Can we come back to that?

§ I want to hear more about Ruby!

§ Er… what is Ruby? § Why would I want Ruby?

§ Can we get back to Free Form RPG?

§ NO! § Ruby!

Page 14: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

IBM i 7.1 TR7 Highlights

Page 15: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

§ Nope, I didn't mistype that: § We're delivering Ruby and Rails specifically for IBM i. § We've partnered with a group called PowerRuby to deliver this exciting new development ecosystem on IBM i.

§ We've been working to get all the Ruby and Rails support compiled so that it can be quickly and easily delivered on IBM i.

Page 16: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

§ In addition, we've written an IBM i DB2 "gem" that gives you native IBM i database access from Ruby leveraging the normal Ruby methodologies.

§ We've also been updating the XML service support to ensure that it works when you're accessing your native IBM i artifacts (programs, data areas, data queues, system values, and many more).

§ The Ruby and Rails support will be available for Beta by the end of October.

§ Follow the PowerRuby.com home page for details…

Page 17: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Page 18: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Page 19: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Page 20: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Rails

§ Rails is a web application development framework written in the Ruby language. Rails focuses on the concepts of Convention over Configuration (CoC) and Don’t Repeat Yourself (DRY)—making programming web applications easier by making assumptions about what every developer needs to get started and writing less code while accomplishing more than many other languages and frameworks.

§ Experienced Rails developers also report that it makes web application development more fun.

Page 21: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Ruby (programming language)

§ Not to be confused with Ruby on Rails. § OS: Cross-platform § Website: www.ruby-lang.org § Ruby is a dynamic, reflective, object-oriented, general-purpose programming language. It was designed and developed in the mid-1990s by Yukihiro "Matz" Matsumoto in Japan.

Page 22: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

High Productivity and Reduced Development Time § At the feature level, Ruby on Rails doesn't offer anything new. Existing web application frameworks have done it all before.

Page 23: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

High Productivity and Reduced Development Time § At the feature level, Ruby on Rails doesn't offer anything new. Existing web application frameworks have done it all before.

§ What's the big deal, then?

Page 24: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

High Productivity and Reduced Development Time § At the feature level, Ruby on Rails doesn't offer anything new. Existing web application frameworks have done it all before.

§ What's the big deal, then? § The difference lies in how Ruby on Rails does it. § When you can finish simple web apps in days instead of weeks and more complicated web apps in weeks instead of months, people notice!

Page 25: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

James Duncan Davidson 2005

§ “Rails is the most well thought-out web development framework I've ever used. And that's in a decade of doing web applications for a living. I've built my own frameworks, helped develop the Servlet API, and have created more than a few web servers from scratch. Nobody has done it like this before. That's not to say they got it all right. It's by no means "perfect". I've got more than a few nits and picks about how things are put together. But "perfect" isn't the point. The point is that it gets you up and going fast and has plenty of depth to keep you going. And Rails does that very well.”

Page 26: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Who uses Ruby on Rails?

Page 27: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Resources

§ http://www.powerruby.com

§ http://rubyonrails.org § https://www.ruby-lang.org

Page 28: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Ruby in twenty minutes § https://www.ruby-lang.org/en/documentation/quickstart/

Page 29: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Ruby – in summary

§ Open source development framework – “A dynamic, open source programming language with a focus on

simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.”

§ High development productivity § Strong community

– Resources growing

§ Now: – running on IBM i – connected to IBM i DB2

Page 30: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Can we get back to Free Form RPG?

dcl-ds employeeDS; firstName char(16) Inz('James');

lastname char(30) Inz('Joyce');

salary packed(7:2) Inz(12500);

end-ds;

Page 31: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

iSight – Alison Butterill

§ http://ibmsystemsmag.blogs.com/isight

Page 32: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

RPG and DB2 for i Headline IBM i 7.1 TR7 Announcement § IBM i 7.1 TR7 includes some major updates to the RPG language.

§ There is a new syntax that allows programmers to do away with the fixed, columnar format, making the code easier to read and certainly easier to learn.

§ For many years, IBM has heard from our advisory councils, clients and partners that RPG programmers are hard to find.

Page 33: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

RPG and DB2 for i Headline IBM i 7.1 TR7 Announcement § Three key ingredients

– Making the syntax easier. – Provide education about the new language.

•  RPG is just another language that is easy to learn – Arcad’s Transform RPG product

•  Move existing traditional-style RPG code into the new free form syntax

§ Landing page for Refresh Updates: – http://www.ibm.com/developerworks/ibmi/techupdates

Page 34: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

iDevelop – Jon Paris and Susan Gantner

§ http://ibmsystemsmag.blogs.com/idevelop

Page 35: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

iDevelop – totally free

§ http://ibmsystemsmag.blogs.com/idevelop/2013/10/as-you-may-have-already-heard-there-was-a-major-technology-refresh-tr-announcement-yesterday-check-out-fellow-blogger-st.html

§ We'll be writing more about this new totally free RPG in EXTRA this month. We'll post a link to it in the comments when it's available. Until then, what do you think?

Page 36: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

iDevelop – Free Format RPG program ctl-opt option(*srcstmt) dftactgrp(*No); dcl-ds employeeDS;

firstName char(16) Inz('James');

lastname char(30) Inz('Joyce');

salary packed(7:2) Inz(12500);

end-ds;

// Define printer file and associated DS

dcl-f qprint printer(80);

dcl-ds prtDs len(80) end-ds; // Also write out details to the printer file

prtDs = 'The name of our new employee is ' +

%TrimR(firstName) + ' ' + %TrimR(lastName) +

' his salary is $' + %Char(salary);

write qprint prtds;

*InLR = *On;

Page 37: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Other Resources

§ RPG Café blog – https://www.ibm.com/developerworks/community/blogs/

b542d3ac-0785-4b6f-8e53-f72051460822/

§ IBM i 7.1 Programming IBM Rational Development Studio for i ILE RPG Reference

– http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/books/sc092508a.pdf

Page 38: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Can I take IBM i to the Web?

§ IBM software § Third party tools

Page 39: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

IBM i to the web - IBM Software

§ IBM i Access for web § Integrated Web Application Server for IBM i § Integrated Web Services for IBM i § Navigator for i

§ IBM DB2 Web Query § Rational Host Access Transformation Services (HATS)

– Refacing – Web services

Page 40: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

IBM i Access for web

§ Is system based; there is no code running on the desktop. § Is implemented using Java Servlet technology. § Uses industry standard protocols - HTTP, HTTPS and HTML. § Is lightweight, requiring only a browser on the client. § Runs batch commands, provides access to database, integrated file system, printers, printer output, and messages, and a 5250 interface.

§ IBM web site – http://www-03.ibm.com/systems/power/software/i/access/web.html

Page 41: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Wait! What?

§ Runs batch commands § Provides access to

– Database – Integrated file system – Printers – Printer output – Messages – A 5250 interface

§ Documentation – http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rzamm/rzamm.pdf

Page 42: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

IBM i Access for web

Page 43: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Navigator for i

§ IBM Navigator for i is the integrated, web-based console that consolidates IBM i systems management tasks in one place.

§ Available on IBM i systems since V6R1, IBM Navigator for I is considerably enhanced in v7.1.

§ It continues to be the strategic tool for IBM i management. § It also works in concert with IBM Systems Director to enable heterogeneous, cross-system management.

Page 44: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Navigator for i

§ Accessing it is as easy as pointing your web browser at: http://{system}:2001

§ The IBM Systems Director Navigator for i console allows you to easily manage an IBM i partition without having to purchase or install anything.

§ Everything is included in the IBM i 7.1 operating system. § Just ensure the HTTP Admin Server is running on your system (STRTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN)), enter the above URL, and away you go!

Page 45: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Navigator for i

Page 46: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Navigator for i

Page 47: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Navigator for i

Page 48: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Navigator for i

Page 49: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

IBM i to the web – third party tools

§ Vendor modernization space is crowded – Sort through the vendor noise – Find a vendor that suits your skill set

§ Zend PHP

Page 50: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

PHP

§ PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language.

§ PHP code is interpreted by a web server with a PHP processor module, which generates the resulting web page

Page 51: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Zend Server for IBM i

Page 52: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Zend Server for IBM i

Page 53: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Zend Server for IBM i

Page 54: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

PHP code

<!DOCTYPE html>

<meta charset="utf-8"> <title>PHP Test</title>

<?php

echo 'Hello World';

?>

Page 55: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Wait! What?

§ Isn’t that HTML?

<!DOCTYPE html>

<meta charset="utf-8"> <title>PHP Test</title>

<?php

echo 'Hello World';

?>

Page 56: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

HTML, CSS, Javascript

§ All browser applications § Language of the web

§ HTML – Markup Language

§ CSS – Style Sheets

§ Javascript – Client side scripting

Page 57: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

HTML

<!DOCTYPE html>

<html> <head>

<title>My First Page</title>

</head>

<body>

<h1>My First Heading</h1> <p>My first paragraph.</p>

</body>

</html>

Page 58: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

HTML

<!DOCTYPE html>

<html> <head>

<title>My First Page</title>

</head>

<body>

<h1>My First Heading</h1> <p>My first paragraph.</p>

</body>

</html>

Page 59: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

HTML

<!DOCTYPE html>

<html> <head>

<title>My First Page</title>

</head>

<body>

<h1>My First Heading</h1> <p>My first paragraph.</p>

</body>

</html>

Page 60: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

HTML

<!DOCTYPE html>

<html> <head>

<title>My First Page</title>

</head>

<body>

<h1>My First Heading</h1> <p>My first paragraph.</p>

</body>

</html>

Page 61: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

CSS

body {

background-color:#d0e4fe; }

h1 {

color:orange;

text-align:center;

} p {

font-family:"Times New Roman";

font-size:20px;

}

Page 62: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

CSS

body {

background-color:#d0e4fe; }

h1 {

color:orange;

text-align:center;

} p {

font-family:"Times New Roman";

font-size:20px;

}

Page 63: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Javascript <!DOCTYPE html> <html>

<body>

<h1>My First JavaScript</h1>

<p id="demo">This is a paragraph.</p>

<button type="button" onclick="displayDate()">

Display Date

</button>

</body> </html>

Page 64: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Javascript <!DOCTYPE html> <html>

<head>

<script>

function displayDate()

{

document.getElementById("demo").innerHTML=Date();

}

</script> </head>

<body>

...

</body>

Page 65: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

HTML DOM Tree

Page 66: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

HTML DOM Tree

Page 67: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Now, back to PHP

<!DOCTYPE html>

<html> <body>

<h1>My first PHP page</h1>

<?php

echo "Hello World!";

?> </body>

</html>

Page 68: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

PHP writes HTML

<?php

$txt1="Learn PHP"; $txt2="W3Schools.com";

$cars=array("Volvo","BMW","Toyota");

echo $txt1;

echo "<br>"; echo "Study PHP at $txt2";

echo "My car is a {$cars[0]}";

?>

Page 69: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

HTML Table

<?php

$rows = 10; // define number of rows $cols = 4;// define number of columns

echo "<table border='1'>";

for($tr=1;$tr<=$rows;$tr++){

echo "<tr>";

for($td=1;$td<=$cols;$td++){ echo "<td>row: ".$tr." column: ".$td."</td>";

}

echo "</tr>";

}

echo "</table>"; ?>

Page 70: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Wait! What?

§ PHP for($td=1;$td<=$cols;$td++){

echo "<td>row: ".$tr." column: ".$td."</td>";

}

§ Javascript for(td=1;td<=cols;td++){

document.write("<td>row: "+tr+" column: "+td+"</td>”);

}

Page 71: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Wait! What?

§ PHP for($td=1;$td<=$cols;$td++){

echo "<td>row: ".$tr." column: ".$td."</td>";

}

§ RPG td = 1;

DOW td < cols;

htmlfield = "<td>row: “+tr+" column: ”+td+"</td>”; write outfmt;

count += 1;

ENDDO;

Page 72: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

That’s better!

§ PHP for($td=1;$td<=$cols;$td++){

echo "<td>row: ".$tr." column: ".$td."</td>";

}

§ RPG FOR td = 1 by 1 to cols;

htmlfield = "<td>row: “+tr+" column: ”+td+"</td>”;

write outfmt; ENDFOR;

Page 73: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

But it all looks the same!

§ Scripting languages are similar – Syntax is similar – Different enough to be confusing – Comes with practice

§ Where does it run? – PHP: Server side – Javascript: Client side

§ Use the right editor

Page 74: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Taking RPG to the web

§ Common Gateway Interface (CGI)

Page 75: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Taking RPG to the web

§ Common Gateway Interface (CGI) § Is a standard method used to generate dynamic content on web pages and web applications.

§ CGI, when implemented on a web server provides an interface between the web server and programs that generate the web content.

§ These programs are known as CGI scripts or simply CGIs; they are usually written in a scripting language.

Page 76: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

CGI on IBM i

§ Means of calling an RPG program from a browser § RPG program then responds to the browser

– In the language of the browser: HTML

§ CGIDEV2 and CGICBLDEV2

– IBM i CGI toolset – http://www.easy400.net/

Page 77: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Roll your own

§ One example – http://www-03.ibm.com/systems/i/software/http/examples/samplerpg/

rpg_demo.html

– HTML page – RPG program

•  Using BNDSRVPGM(qhttpsvr/qzhbcgi) – HTTP Server

•  Configured to support CGI

Page 78: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

http://server:port/rpgcgi.html

Page 79: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

http://server:port/rpgcgi.html

79

Page 80: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

http://server:port/rpgcgi.html

80

Page 81: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

RPG CGI program

* Compile-time array for HTML output.

DARRSIZE C 23 DHTML S 80 DIM(ARRSIZE)

PERRCD(1) CTDATA

DBREAK C '<br>'

C BUFOUT CAT HTML(I):0 BUFOUT

C BUFOUT CAT BREAK:0 BUFOUT

Page 82: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

RPG CGI program

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

**** Send BufOut to standard output. *******************************************************

C CALLB APISTDOUT

C PARM BUFOUT

C PARM BUFOUTLN

C PARM QUSEC

Page 83: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

RPG CGI program

**CTDATA HTML

CONTENT-TYPE: TEXT/HTML <html>

<head>

<TITLE>Sample IBM i RPG program executed by HTTP server as a CGI</title>

</HEAD>

<body> <H1>SAMPLE IBM i RPG PROGRAM.</H1>

<br><br>

Page 84: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

RPG CGI program

<P>THIS IS SAMPLE OUTPUT UsING IBM i HTTP SERVER CGI APIS FROM AN RPGPROGRAM. THIS PROGRAM READS THE INPUT DATA FROM QUERY_STRING ENVIRONMENT VARIABLE WHEN THE REQUEST_METHOD IS GET AND READS STANDARD INPUT WHEN THE REQUEST_METHOD IS POST.

<P>SERVER INPUT:<BR> <P>ENVIRONMENT VARIABLE - REQUEST_METHOD:

<P>ENVIRONMENT VARIABLE - SERVER_SOFTWARE:

</BODY>

</HTML>

Page 85: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

http://server:port/rpgcgi.html

85

Page 86: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Serving RPG or SQL to the web

§ Integrated Web Application Server for IBM i § Integrated Web Services for IBM i

§ Web Services – *PGM – *SRVPGM

Page 87: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Navigator for i

Page 88: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Page 89: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

89

Page 90: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

90

Page 91: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

91

Page 92: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

92

Page 93: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Serving RPG or SQL to the web

§ Integrated Web Application Server for IBM i § Integrated Web Services for IBM i

§ Web Services – *PGM – *SRVPGM

§ PCML

Page 94: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

One more trick!

§ 5250 converted to HTML § Now using RPG Open Access to HTML

§ Unique grid scrolling challenge § Solved with Javascript and JQuery

Page 95: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Page 96: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Page 97: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Page 98: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Page 99: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Page 100: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Page 101: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Javascript + JQuery function FreezeGridHeader() {

// Check for the page up button to be missing

if ($('.look-subfile-pageup').length == 0) {

// Find all the necessary elements

var table = $('.look-datagrid > div > div > div > table');

var tableParent = $('.look-datagrid > div > div > div');

var tableParentHeight = tableParent.height(); var tableHeaderRow = $('.look-datagrid > div > div > div > table > tbody :first');

var tableHeaderRowHeight = tableHeaderRow.height();

Page 102: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Javascript + JQuery // Remove the existing scroll from the table tableParent.removeStyleProperty('-ms-overflow-y');

// Build the table header & move the header row to it

var theadHTML = "<thead id='tableHeader'></thead>";

table.append(theadHTML);

$('#tableHeader').append(tableHeaderRow);

// Scroll the table var tableScrollHeight=tableParentHeight-tableHeaderRowHeight;

table.tableScroll({height:tableScrollHeight});

}

}

Page 103: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Two lines of code that matter // Remove the existing scroll from the table tableParent.removeStyleProperty('-ms-overflow-y');

// Build the table header & move the header row to it

var theadHTML = "<thead id='tableHeader'></thead>";

table.append(theadHTML);

$('#tableHeader').append(tableHeaderRow);

// Scroll the table var tableScrollHeight=tableParentHeight-tableHeaderRowHeight;

table.tableScroll({height:tableScrollHeight});

}

}

Page 104: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Page 105: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Page 106: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Now you know!

§ Javascript rules!

Page 107: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

Now you know!

§ Javascript rules!

§ Imagine where you can inject a script to manipulate the user interface

– RPG CGI – PHP – ?

Page 108: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

But, seriously…

§ This is the tip of a very big iceberg!

Page 109: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

What can i do?

§ Research your options – Some older techniques apply – More and more modern tools

§ Most of these tools and technologies are quite simple – Learning curve is small – You may already have the tools/editors – You can start today

§ Commonalities across languages and platforms – Learn once, re-use many

Page 110: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?" An IBM i Developer's Introduction to Everything!

What can i do?

§ What do you want it to do?

Page 111: What Can i do?” An IBM i Developer’s Introduction to Everything! · 2014-03-21 · "What Can i do?" An IBM i Developer's Introduction to Everything! Announcing IBM i 7.1 TR7 -

© 2014 Trevor Perry

"What Can i do?” An IBM i Developer's Introduction to Everything!

Trevor Perry – Chief Architect. Angus Thinks! March 2014


Recommended