Professional Documents
Culture Documents
Paul Tuohy
ComCon
5, Oakton Court Ballybrack Co. Dublin Ireland
2001 ComCon
WEBCAST SCHEDULE
Todays event will run one-hour long. Here are the expected times for each segment of the webcast: :00 :05: Moderator introduces the speaker and discusses the details of the Webcast. :05- :35: Speaker delivers a PowerPoint presentation on the webcast topic. :35- :60: Moderator and speaker engage in a Q&A on the topic. You can submit questions to the speaker at any time during the event. Just click on the Ask a Question button at the bottom of the presentation screen.
TECHNICAL FAQs
Here are answers to the most common technical problems users encounter during a webcast: Q: Why cant I hear the audio part of the webcast? A: Try increasing the volume on your computer. Q: I just entered the webcast and do not see the slide that the speaker is referring to. What should I do? A: The slides are constantly be pushed to your screen. Youll should refresh (hit F5) to view the latest slide.
If your question is still not answered, please click the Ask a Question button at the bottom of your screen and submit your problem. A technical support person will respond immediately.
You can also visit the Broadcast Help page for more information or to test your browser compatibility: http://help.yahoo.com/help/bcst/
Paul Tuohy
ComCon
5, Oakton Court Ballybrack Co. Dublin Ireland
2001 ComCon
Agenda
Skills for what?
Why do you need to re-skill? What has changed?
Then What?
HTML, Javascript and CGI. Visualage RPG Java WebSphere whatever.
2001 ComCon
RPG IV
HTML/CGI
2001 ComCon
Premise
You are not using third-party tools
There are many Great third-party tools out there. I will mention some later. Maybe you should be using one of them!!!!
All You Have is WebSphere Development Toolset (V5R1) or WebSphere Development Studio Client (V5R1/V5R2)!
Application Development Toolset (ADTS). WebSphere Development Tools for iSeries.
Code/400
(Editor, Designer, Project Manager). Distributed Debugger WebSphere Studio WebFacing Tool VisualAge for RPG.
RPG,
2001 ComCon
Where to Start?
There are a few things you need to look into before you enhance your programming skills.
Become familiar with the IFS (Integrated File System) Become familiar with iSeries Navigator (Operations Navigator)
Especially
can do this from iSeries Navigator without Interactive SQL. SQL is slowly(?) replacing DDS.
2001 ComCon
2001 ComCon
2001 ComCon
Explore Databases
This is the new interface for Database functions
2001 ComCon
Creating a Table
This is not DDS!
2001 ComCon
Database Navigator
Database Navigator will give you a diagram of your Database!
2001 ComCon
SQL
Get to grips with SQL.
It is becoming the standard for maintaining the database. SQL is being developed - DDS is not.
2001 ComCon
Referential Integrity
Define relationships between tables (physical files) e.g. You cannot delete a customer if they have outstanding invoices When you delete the Order Header record, automatically delete all corresponding Order Details.
2001 ComCon
The Choices
Green Screen
Although everything is heading towards GUI, there is still a place for green screen within applications. Not everything lends itself to point and click.
GUI Application
Browser-based
The interface is in a browser. Fast becoming the most popular. Easiest to distribute to the Internet.
2001 ComCon
2001 ComCon
Code/400
Code/400 is
A customizable editor Reference manual as help Navigator Verifier Much, much more
2001 ComCon
Code/400 Editor
2001 ComCon
Code/400 Verifier
2001 ComCon
Code/400 Help
2001 ComCon
Code/400 Navigator
2001 ComCon
RPG IV
Get up to speed with RPG IV If you are still using RPG III - STOP NOW
You will start to see gains from RPG IV within a very short period of time.
/FREE D_PgmTxt = *Blank; D_Proc = SDSProcName; D_PgmTxt = 'Work with'; If Show_Paid and Show_Unpaid; D_PgmTxt = %trim(D_PgmTxt) + ' Paid and Unpaid'; EndIf; If Show_Paid and Not Show_Unpaid; D_PgmTxt = %trim(D_PgmTxt) + ' Paid'; EndIf; /END-FREE
2001 ComCon
Getting there
Getting there is easy! CVTRPGSRC
IBM supplied conversion tool. Performs basic syntax conversion. Convert, Compile, Relax.
Third-party Option
If you want more than basic syntax conversion. If you want code re-engineered to use new features. Check out the RPGToolBox from Linoma Software ( www.linoma.com)
2001 ComCon
RPG IV Highlights
Here you have it -- the brand new RPG!
10-character external names (files, format and field names). Allow mixed case. Allow blank lines. Introduction of new Definition (D) Specification. Elimination of Extension (E) and Line Counter (L) Specifications and the practical elimination of Input (I) Specifications. Re-definition of the Header (H), File (F) and Calculation (C) Specifications. More powerful array definition and processing. Prefixing externally defined files. Date processing and manipulation. Named Indicators
Introduction of new data types, especially integers and pointers. Introduction of Built-in Functions (e.g. %SUBST). Introduction of Subprocedures and other ILE-related features. Integration with Java. And, of course, free format. But perhaps the most important change is that the re-structuring has made RPG even easier to change in the future
2001 ComCon
Subprocedures
Subprocedures are the biggest change to RPG - EVER!
If (GetCustomerDept(Customer)) = 'A01';
2001 ComCon
Subprocedures
This is what the code looks like.......
B PI S S
1P 0 D D Inz(D'02/13/99') 1P 0
WorkDay = %Rem(%Diff(InpDate : ASaturday : *D): 7); If WorkDay < 1; WorkDay = WorkDay + 7; EndIf; Return WorkDay; /END-FREE P DayOfWeek E
2001 ComCon
ILE
Subprocedures lead to Service Programs.
Procedure Procedure
Procedure
*Module
Procedure Procedure
*Module *Pgm
Procedure Procedure
*Module Procedure Procedure
Procedure
*Module *SrvPgm
2001 ComCon
2001 ComCon
HTML
Learn the basics of HTML
Easy to learn Lots of good books. I liked "HTML for the World Wide Web" by Elizabeth Castro ISBN 0-201-35493-4 Code/400 is a HTML editor.
<TR><td ALIGN=CENTER VALIGN=TOP WIDTH="404" HEIGHT="186"><font face="Arial">To contact us: <p>Phone: +353 1 282 6230<br> Fax: +353 1 282 6230<br> Email:<a href="mailto:tuohyp@comconadvisor.com"> tuohyp@comconadvisor.com</a> <p>5, Oakton Court<br> Ballybrack<br> Co. Dublin<br> Ireland <p>© ComCon Computer Consultants 2002</font> </td></TR>
2001 ComCon
What is CGI ?
CGI stands for 'Common Gateway Interface'
Which then sends it out for display as it would any other page
2001 ComCon
2001 ComCon
WebOut = NewLine + '<tr align=right>' + '<td>' + ProdCd +'</td>' + '<td align=left>' + ProdDs +'</td>' + '<td>' + CatCod + '</td>' + '<td>' + %Char(LndCst) + '</td>' + '<td>' + %Char(SellPr) + '</td>' + '<td>' + PrLOrdA + '</td>' + '<td>' + NoDaysA +'</td></tr>' WriteWebData(WebData : WebDataLen : APIError)
2001 ComCon
writing such a generalized routine to process HTML text and perform text substitution is not a trivial task
And it is FREE !!
2001 ComCon
: : /$TableRow <TR ALIGN=RIGHT> <TD /%ProdCd%/</TD> <TD ALIGN=LEFT>/%ProdDs%/</TD> <TD>/%CatCod%/</TD> <TD>/%LndCst%/</TD> <TD>/%SellPr%/</TD> <TD>/%PrlOrdA%/</TD> <TD>/%NoDaysA%/</TD> </TR> : :
2001 ComCon
// Load substitution variables UpdHTMLVar('ProdCd':ProdCd) UpdHTMLVar('ProdDs':ProdDs) UpdHTMLVar('CatCod':CatCod) UpdHTMLVar('LndCst':%Char(LndCst)) UpdHTMLVar('SellPr':%Char(SellPr)) UpdHTMLVar('PrlOrdA':PrlOrdA) UpdHTMLVar('NoDaysA':NoDaysA) // And add row to table WrtSection('TableRow')
2001 ComCon
So Far......
If you learn
RPG IV Some ILE Some HTML
2001 ComCon
Javascript
Extend those HTML capabilities Javascript is NOT full blown Java by any means.
<HTML><HEAD><TITLE>Quote of the Day</TITLE> </HEAD><BODY><DIV ALIGN=CENTER><H1>Quote of the Day</H1> <HR><FONT COLOR="navy" SIZE="5"> <SCRIPT> <!-var quotes = new Array() quotes[0] = "Every time history repeats itself the price goes... quotes[1] = "The moment you think you understand a great work ...
.. .. .. ..
2001 ComCon
WebFacing
Time:8:05 date:Oct 22,2000
RPG Program
DOWProto P DayOfWeek B D PI D/Copy 1P0 D WorkDate D D AnySunday D WorkNum D WorkDay S S S D INZ(D'1995-04-02') 7 0 1P 0
C WorkDate SubDur AnySunday WorkNum:*D C WorkNum Div 7 WorkNum C MvR WorkDay C If WorkDay < 1 C Return WorkDay + 7 C Else C Return WorkDay C EndIf P DayOfWeek E
Workstation manager
Converts DDS to Servlets and JSPs There is NO change to the RPG Programs
2001 ComCon
WebSphere Studio
2001 ComCon
Web Browser
HTML
Application Server
Any Client, Any Browser
HTTP server JDBC RPG Cobol Etc.
Servlet Engine
Data base
EJB Client
TCP /IP
EJB Container
Admin Console
Administrative Server
2001 ComCon
Set Balance
Get Address
A Customer
2001 ComCon
Java
Java is an OO language
2001 ComCon
2001 ComCon
A Plan of Action
Must Do....... Should Do....... And then Any of.......
IFS
WebFacing
iSeries Navigator
2001 ComCon
T he Learning Curve
Code/400 RPG IV ILE Basic CGI CGIDEV T opics Basic W AS Basic W ebfacing W ebsphere Studio OO Java 0 10 20 30 40 50 W ork Days 60 70 80 90 100 Course Self T each Practice
2001 ComCon
Code/400 RPG IV ILE Basic CGI CGIDEV Basic WAS Webfacing Studio OO Java
2
4 2 1 2 3 2 2 3 8
5
10 10 5 5 10 5 5 10 20
7
10 80 25 15 20 15 10 100 30
2001 ComCon
Jump
VisualAge for RPG WebFacing OO and Java
2001 ComCon
Some References
"Who Knew You Could Do That With RPG IV?"
www-992.ibm.com
www.linoma.com
2001 ComCon
Questions?
Submit your questions now by clicking on the Ask A Question button in the left corner of your presentation screen. Paul will answer your questions shortly after the broadcast.