ever looked at PDM on the AS/, you have marveled at what a cool change a record on any page of the subfile, and process all changed records only. Example: A subfile with paging by IBM i and To view or download the PDF version of this document, select DDS Concepts (about KB). You can view or print any of the PDF files. v ADTS for AS/ Source Entry Utility, SC A subfile is nothing but just displaying records in tabular format on a display device. CHAIN, READC, UPDATE, or WRITE operation codes can be used for subfile record format to transfer data between the program and the subfile. READ, WRITE, or EXFMT operation codes cane be used for.

As400 Subfile Pdf

Language:English, Dutch, Hindi
Published (Last):09.06.2016
ePub File Size:20.39 MB
PDF File Size:12.47 MB
Distribution:Free* [*Registration needed]
Uploaded by: JEREMIAH

See more: subfile keywords in as, how to create a subfile in as, single page subfile code in rpgle, subfiles in rpg iv pdf, expandable subfile in as Subfiles in As/ for Programmers - Download as PDF File .pdf), Text File .txt) or read online. Subfiles in As/ for Programmers. Introduction to Subfiles - Download as PDF File .pdf), Text File .txt) or read As Uploaded by. Sandyraj_raj · RPG Course Material. Uploaded by.

Wednesday, January 2, Creating a screen with two side-by-side subfiles I have written about subfiles , and even a screen with two subfiles on it. When I was asked about a screen with two subfiles, side-by-side, I was intrigued how to do it. The first problem to overcome is that if I code two subfiles, one to occupy the left side of the screen and the other the right, whichever subfile's control record I write last will overlay the other.

After using Google I could find reference to an example of using DDS windows to contain the subfiles, but the links to the article only returned a "page not found".

With that hint I created the following. Let me start by saying that this display file is a "stripped down" version.

Subfiles in As/400 for Programmers

I have removed a lot of the things I put in display files so not to clutter this example. The first subfile and its control record format.

Lines 17 and This is a "load all" subfile of records, 16 will display on the screen at a time. Line 20 and This is the section of the code that defines the window. It starts on the fourth line in position 1 and ends at line 16 in position This keyword means that there is no restriction on where the cursor may be placed.

Line When creating and testing this display file I had this line commented out so I could see the borders of the window. This line replaces the window border with blanks, therefore, when display file is executed there is no border.

Lines 23 and I need to know which subfile record the user is on when they press the Enter key. I am not doing anything with it, therefore, I am not going to bother to describe what is used for. 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. Reset the RRN to zero Or one. This condition may be based on anything. Subsequent pages are added to the subfile as per the user demand.

Fixed format definitions

In the expandable subfile the subfile size must be atleast one greater than the page size. Load the subfile: Intitially the only the first one page of the subfile is loaded. Display the subfile: The subfile screen is displayed to the user. Rollup: Check if user pressed the rollup key.

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 simly added to already existing first page. The following example illustrates how to process an expandable subfile Some people like to call it extendible subfile because the subfile extends to accomodate the newly written records.

Comments have been given at appropriate places to help you understand the flow of the program easily. This count should not exceed the page size. In other words in a single page subfile all loaded records are displayed at a time.

We delete all previously loaded records from the subfile whenever we need to load the next page of the subfile.

Introduction to Subfiles

A single page subfile is characterized by equal number of subfile and page sizes. After learning the expandable subfile processing with ILE RPG in the previous chapter, a single page subfile should not be very difficult for you. Notice that the function key F5 to refresh the page Meaning reloading the subfile from beginning has not been implemented. You can try it as an excercise. Here, we are storing the last value only.

Here we are sutracting the page size from the last value. Now we will learn the subfiles which can accept user input and process it. Generally the following are the steps in which we can display and process an input capable subfile. Load the subfile: We populate the subfile records as in case of any display only subfile. If we do not have any records earlier we may write blank records to subfile.

User edits the subfile: User edits the displayed subfile by changing the field values and presses any function key. Read Subfile: Read the subfile for the changed value. Optionally validate the user input and process it.

However, there're a few differences between them. This can be accomplished by resizing the element horizontally or setting the width property manually in the Properties Window.

Setting the clear subfile indicator The grid component contains a number of properties that allow you to control it through server-side RPG coding.

One critical property is clear subfile, the equivalent of the CLRSFL keyword from traditional green-screen programming.

It is conventional to clear the subfile before loading it with data. To accomplish this, bind the clear subfile property to an indicator field. Then, in your RPG code, set the indicator and write the subfile control record to clear the subfile.

Setting record format names Before utilizing the grid in your RPG code, you must set record format names for the subfile and for the screen that contains the subfile, which is referred to as the subfile control record.Lines 9 — The indicator data structure, is qualified on line 9.

It is taken from the RPG program's data structure. Then, he moved into management. Lines 20 — I always display the user id, date, and time on all my display files. You can switch off or on this indicator as per your wish, but to associate an indicator's present value On or Off with any specific record, you need to UPDATE that subfile record.

Here we are sutracting the page size from the last value.