Showing posts with label XML-SAX. Show all posts
Showing posts with label XML-SAX. Show all posts

Thursday, June 7, 2012

Two more weeks to go.....

We are almost done with implementing Midretail, I have been extremely busy coding and testing. The SQL works beautifully and is absolutely amazing. Learning embedded SQL and RPG Free has been exciting and challenging. I would have never been able to pull this off without the help of Google and all the wonderful people posting hints, tricks and code examples. I hope to find time to pay it forward and post more snip-its of code I created for interfacing the systems.

Special thanks to -
www.scottklement.com/
www.itjungle.com
www.iprodeveloper.com
www.code400.com
www.rpg-xml.com
www.bmeyers.net
www.ilerpgprogramming.com
www.winautomation.com


and many more....

I am starting to look forward to my new position as EDI Lead/Developer at a large retailer here in Jacksonville. I am hopeful for a long term relationship with challenging opportunities to work with different hardware / software platforms in a fast paced environment.

~Richard

A handful of patience is worth more than a bushel of brains.  ~Dutch Proverb



Monday, March 5, 2012

RPGLE Special XML characters...

Had a good meeting Friday afternoon. Got the go ahead for the SQL, procedure and /copy RPGLE programs I have been working on. The two managers seemed please and joked about turning an operations guy into a programmer. I am having a good time programming and liking all the cool things I have accomplished in such a short time. II have picked up a lot over the past 20 years and it is all falling into place. Thank god for all the posts and articles that are filling in the blanks.

Hit the ground running this morning. Finished off the daily sales summaries program and verified the XML document's looked good.

We resolved the QNTC connection issue with the test environment Friday. I finished up setting up the job description and creating the necessary folders on the server. I also completed adjusting the configuration settings of MidRetail.

At this point I am ready to move all the source and create new objects from my library to the newly created Midretail library. I am moving over one by one and loading the Midretail application with the generated XML documents.

I was quickly reminded that there are special characters that XML does not like. Ampersand being one of them. That threw a monkey wrench in to the mix.

Now I am off to create an external procedure and create a binding directory to hold the reusable code. Found this article and modifying it for my use. I am going with BigKat’s solution.

If anyone can think of a better way please pass it on.

~Richard  

Programming is like sex.  One mistake and you have to support it for the rest of your life.  ~Michael Sinz

Saturday, February 25, 2012

Fast and successful week...

It was a really good week, it went by very fast and I have managed to get ahead of schedule. I hoped to finish off the week with a home run but best I could do was lay the foundation for a good start next week. ;)

I am unable to see the recently setup MidRetail test server from the test LPAR. So I spent the morning verifying the iSeries TCP and NetServer configuration and testing the QNTC file system. I took my findings to the IT Manager and he reached the same conclusion, there is a DNS problem. Come to find out, the MS DNS server for the test network recently died and new server had to be reconfigured manually. Unfortunately the iSeries entries were missed. I do not have access to the server so have to wait until Monday to have the network guys figure it out.

The iSeries QNTC file system is part of the iSeries Netserver and allows the iSeries programs output stream files, STMF, directly to a Microsoft Windows share. Very cool stuff, easy to setup and really handy when you need to feed your back end data to a PC application.

I have been using MidRetail on the the production server since the iSeries test LPAR is on a different Domain and unable to directly communicate. While waiting on the Microsoft Application test server to be setup I have been moving documents between systems manually to test my XML output. Once we get the connection issues resolved I will be able to install the MidRetail application on the test server and be able to start daily full cycle testing of the completed interface programs.

I finished polishing the Store interface program and moved on to the Sales History interface program. Each program grows in complexity as I work through the project. This interface requires that store sales be summed to Date, Store, Style, Color and Date, Store, Style, Color, Size daily and  Date, Store, Style, Color weekly. The input data is from a file that is populated nightly from sales of over 300 stores. This is looking like a good fit for my first embedded SQL, whoopee!

I may break the task into two programs, daily and weekly, that creates three XML documents. Some consideration will be needed on handling missed Stores and how to process them once data is retrieved.

I have been writing and learning RPGLE Free and now ready for trying my hand at some embedded SQL. I have seen working examples but have never actually coded myself. I do use SQL Explorer on a regular basis to write Select queries to verify data and find it extremely useful. I have a day or two to work out the techniques but if it looks like it will take me too long to figure out I will just fall back to RPGLE.

After a couple of hours with the IT Manager I have enough information to start analyzing data and putting together a plan. I ran a few SQL queries over the file and have a good feeling for what needs to be done.  

~Richard



Three things are certain:
Death, taxes, and lost data.
Guess which has occurred.
~David Dixon, 1998, winning entry of the Haiku Error Messages 21st Challenge by Charlie Varon and Jim Rosenau, sponsored by Salon.com

Sunday, February 19, 2012

XML to DB2 Exciting and Mind Numbing....

The past two weeks have been an exciting and mind numbing. My current task is to create interface programs that create and decompose pipe delimited text and XML documents between an iSeries @ V6R1 and a MS Windows 2008 application server application.  I will be using  the iSeries IFS /QNTC directory which is a share on the Microsoft 2008 application server to move documents between systems.

The iSeries data is created and used by an old unsupported version of Island Pacific ERP (IP). The MS application is Mid-Retail (MR). MR is providing the API’s to access their data.

After two weeks I was able to come up with an idea of how long it will take to get MR in the users hands. I have created some programs that can read and write XML based on the requirements. I spent the past couple of days putting my spreadsheets and documentation together to create a PowerPoint presentation. Friday the Project Lead (PL) and I presented our plan to the Director of Application Programming. After two hours we received the go ahead and approved my contract to the end of March. :)

The director did catch me a little off guard. In going over the possibilities for XML transformation I mentioned DB2 to XML Extender and RPGLE OAR. He showed great interest in using RPGLE OAR. After discussing the option further it was decided that was the direction we want to take.

I believe the right way to accomplish this goal is to
use RPGLE OAR and write the Handler program. Unfortunately I have never created a handler and my programming skills may not be enough to create one in the time frame needed. I have already created programs that create and read XML using RPGLE XML-SAX, IFS API, External Data Structures, Procedures/Sub Procedures and Copy source files and I am comfortable with the current time frame for the project.

I explained my concerns about my current skills and the deadline for the project. They had no problem and are willing to let me spend some time getting up to speed. I am impressed that they are willing to help me increase my skill set and are comfortable with me proceeding with the project.

After my last employer spent a year destroying my self confidence I am finely returning to normal. I have increased my skills with every step in my career and turned negative into positive. What has made me successful is, while I may not know the details of everything I know how to find and learn what I need to accomplish any task at hand.

I have never really wanted to be a full time programmer and I get a bigger sense of accomplishment being in operations helping users, managers, customers with day to day technology and data issues. But I may be changing my mind, figuring out the XML to DB2 is a big challenge and so far is fulfilling my appetite for accomplishment.

All that I needed is available on the Internet. Below are a few of the sites I gleaned information from:

The Ins and outs of XML and DB2 for i5/OS
RGPLE XML Parser example code
Working with the IFS RPG IV
IBM Rational Open Access: RPG Edtion V1.1
IBM Systems Magazine - Getting a Handle on RPG Open Access
iSeries read IFS file
DB2 XML Extender Hints and Tips

A special thanks to the following people, without them there would be no Milk Bones for the dogs.


~Richard