JBA System21 Customer Inquiry (or should that be Enquiry)

  • Posted on: 3 November 2008
  • By: NickLitten

Prompting a list of all customers defined in Sales Ledger (or Account Receivable as its also known) is simple from within any JBA RPG program.

A call to SL016 - JBA Customer Inquiry - pops a window up, you select you customer using various subset, selection functions and it will be returned to the calling program via the *LDA

Sample RPGLE code could be:

L#CUSN is the returned customer code defined at:

D L#CUSN 482 489

And you can display the customer selection window like this:

// If customer prompt has been requested, do so.
// Note: oslsl* needs to be in *libl
   Out LDA;
   Call 'SL016'; // or whatever prototype you have created to call this RPG*PGM
   In LDA;
   CUSN?? = L#CUSN; //populate the return customer number

Obviously the Selected customer code is returned via *LDA variable L#CUSN (defined earlier) and in this case you can see that the window looks like this:

Will the Apple iphone work on Verizon? No but the new Blackberry Storm 95xx will! Hurrah!

  • Posted on: 15 October 2008
  • By: NickLitten

Will iPhone work on Verizon?

Can you modify the iPhone software to make it work?

Is it worth waiting for the iPhone 3G to see if that works on Verizon?

No. No and No!

Apparently this is because the iPhone uses GSM phone technology which is not compatible with the CDMA system used by Verizon. Bwaaah!

Well, that is most definitely not the answer that I was hoping for.

I sort of played around with the Apple iPhone a month or so ago and really liked it but ended up selecting Verizon as my Phone Provider because of the slightly better coverage in my home area. I opted for the Blackberry Curve - a most excellent phone that I am thoroughly impressed with: The Curve has a good keyboard, email and SMS messages work great and the neat features like VZ Navigator are excellent.

So, I've been happily playing with my Curve and am generally very happy with it.

BUT... it's not quite as gadgety as the iPhone! Which just kind of niggles me. I dont know why... Well... I do know exactly why - it's because I am a techno-geek.

/me hangs head in shame  ;)

RPG SQL: load all subfile has fixed size of 9999 records

  • Posted on: 10 October 2008
  • By: NickLitten

What is a load all subfile?

A load all subfile is one in which we generally specify the subfile size as 9999 in the record format itself. However, you may define the subfile size to be less than 9999 in the record format and still load all your subfile at a time. In that situation the records will not be placed at contiguous memory location.

So, conceptually a load all subfile is the one in which all records are loaded at one go before they are displayed. Also, they should occupy contiguous memory locations.

Load all subfiles are the easiest concept in subfile. That too when the subfile is display only! Let us now see the example of a load all subfile DDS.

how to define an expanding page size subfile using rpg on the as400

  • Posted on: 10 October 2008
  • By: NickLitten

Expandable subfiles in RPGLE

An expandable subfile is one in which ideally one page of records are loaded at a time. Subsequent pages are added to the subfile as per the user demand.

In the expandable subfile the subfile size must be at least one greater than the page size.

The ILE RPG program to process an expandable subfile has typically the following flow

1. Load the subfile: Initially the only the first one page of the subfile is loaded.

2. Display the subfile: The subfile screen is displayed to the user.

3. Rollup: Check if user pressed the rollup key. Many a times no rollup is defined and the next page is loaded with ENTER (RETURN) key only. If ROLLUP key has been pressed, load the next page and display it.

Note: In expandable subfiles, we do not need to handle ROLLDOWN. This is handled by the system itself. This is because we do not clear subfile before loading the next page. The next page records are simply added to already existing first page.

The following example illustrates how to process an expandable subfile (Some people like to call it extensible subfile because the subfile extends to accommodate the newly written records). Comments have been given at appropriate places to help you understand the flow of the program easily. Notice the ROLLUP function defined in the DDS here.

What is an RPG Copybook?

  • Posted on: 10 October 2008
  • By: NickLitten
rpg /copy used on as400 iseries and ibm-i systems

A copybook is a technique that us RPG PROGRAMMERS use to suck in piece of re-useable code without having to type it every time into lots of programs.

A typical use of a copybook might be something like this scenario:

  • Every program within an application uses the *LDA (Local Data Area) to store specific pieces of information.
  • Every program expects the *LDA to be defined in the same way.
  • Defining the *LDA takes 30 lines of code, which would be duplicated through the entire application in every single program source code.  
  • We define these 30 lines in a COPYBOOK member -- think of this as a 'chapter' of a book.
  • Then we add a simple 'import chapter 7 of the copybook' into every program -- so one line of code in every program that imports the same 30 lines from the copybook. This import takes place at compile time.

Declaring a copybook means declaring its location to the program that will be importing the code from the copybook.

IBM R.P.G. Programming - Source /COPY Copybooks

  • Posted on: 10 October 2008
  • By: NickLitten

What are RPG COPYBOOKS anyway?

Copybooks are a very simple way of reproducing the same code into many programs: a copybook is a source member containing a section of code that can be inserted/copied into any other source member at compilation time. The main idea behind RPG Copybooks is reusability.

Think of a copybook as a source member that contains a common re-usable code component that that you dont want to compile but want to include in the actual programs that use it at compile time.

Copybooks were frequently used back in the day as a fast alternative to having a common program that every other program called. A classic example may be definition for a system wide *LDA structure. Just think, all your programs in a given application will be defining certain parts of the *LDA, or program status data structure, or *PSSR routine or just about anything - all with the same field names, in every program written within that application.

COPYBOOKS make it simple to write a bit of code in a source member and then have all the other programs referencing it and sucking in that code at compile time.

For example - Here is a copybook of a PSDS

The IBM AS400 eServer

  • Posted on: 27 September 2008
  • By: NickLitten


The IBM AS/400 is a midrange system which has proven itself as the premier choice for businesses requiring a computer system capable of handling diverse business requirements ranging from Data Warehousing through to e-Commerce.

When compared to any other midrange system it offers unsurpassed reliability, minimal downtime, low maintenance costs and the flexibility to take advantage of emerging technology. The IBM AS/400 is the most widely used Midrange Business System in the world.

The AS400 was renamed the iSERIES and came in a range of models: dynamic e-business environment demands a more powerful, scalable, and flexible IT infrastructure than ever before. The IBM iSeries Models 270, 820, 830, 840 and the new 890 meet these demands by delivering industry-leading innovative technology in a cost-effective and easily managed server platform with intuitive enterprise-class systems management tools.

The iSeries delivers flexible capacity management to provide uninterrupted performance growth, with new Capacity Upgrade on Demand options for most iSeries Model 830, 840, and 890 servers (4-way and above).

A brief overview of the IBM AS/400

  • Posted on: 26 September 2008
  • By: NickLitten

System Security

img_lock.gif (2375 bytes)AS/400 security features are second to none, it is no exaggeration to say that the AS/400 is one of the most secure platforms available today. Security is integrated into AS/400 architecture and protects your e-business from hackers and viruses. AS/400e is a recognized leader in security.

"There has never been a recorded virus on the AS/400 in its entire history." Can any other machine make this claim?



"Born to be Java" might be the AS/400 theme song. AS/400 architecture, with an independent machine interface that separates software from the underlying hardware, perfectly matches Java architecture, with a Java virtual machine that gives it platform independence. With AS/400e, you get the full 100% pure Java benefit of platform independence plus the added benefit of AS/400 optimization for high performance and enterprise-strength capability.



Firefox 3 Beta Release Candidate download is finally here for free

  • Posted on: 23 September 2008
  • By: NickLitten

Firefox Version three, the best browser around, is finally ready for release to the great unwashed cyber-public... well... nearly anyway! Grab the latest version here

This new release candidate of Firefox3 is clearly the best so far:

After years of hard work the Gecko rendering engine has been integrated, and the development team is feeling ready to share its project with the world.

Version 3 has improved security features to combat phishing and communicate with anti-virus software, as well as respecting parental-control settings such as those used by Windows Vista. Better zooming and tab controls, and tweaks such as offering to save tabs on closing and use of the Mac OS X spellchecker, are also included.

The Beta/RC is marked for testing purposes only, but when installed will overwrite any existing Firefox installation (unless you're doing something clever with virtualisation or similar).

From the Mozilla's dudes mouths:

More Secure

Improve Google Search Engine Ranking

  • Posted on: 22 September 2008
  • By: NickLitten

Every website needs a good ranking on the search engines. If your website is listed way down at the bottom of the heap, or worse still not listed at all, then how will your friends, colleagues or customers find you?

So you know that your site should be listed but which search engine do most people use?

You probably know the answer. It's Google.

Google has simply taken the Internet search engine world by storm. It now reportedly handles over half the worlds Internet searches. Obviously, this means that getting a high ranking on Google is hugely important to business people and private web designers alike.

Google is used as the homepage for many Internet users. It's built into the browser through which I am typing this story. It's the King of Search engines. With others using the DMOZ (Yahoo, Lycos, Excite, Overture, etc..) and microsoft's LIVE search services in competition, Google still remains head and shoulders above the competition. It's relevance to what it returns is amazing, not to mention the speed in which it returns the results... that's pigeon power for you!