× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: simple questions-cannot find answers in common books
  • From: email@xxxxxxxxxxxxxxxxxxx (James W Kilgore)
  • Date: Sun, 20 Dec 1998 08:30:37 -0800
  • Organization: Progressive Data Systems, Inc.

Christopher,

Some of your books may be too new to bother covering #1 and #2 ;-)

christopher sagayam wrote:

> in rpg programming
>
> 1.in form type I what is the use of SEQUENCE  eg.AA etc

Back in the "old" days, especially when cards were king, if your file required a
header record with 'n' detail records for each logical group of entries, this 
was
a way to sequence check your input.  If a card was out of order, a halt would be
issued.

>
>
> 2.how are indicators U0-U9,MR used.

I've only heard of U1-U8, but I'll bet your book just says Ux indicators, anyway
these indicators (also referred to a "switches") were created again back in the
"old" days for inter program communication.  Program A could turn a switch 
off/on
so that when program B executed, some "state" or result of program A could be
determined.

Here's another example which also uses the MR (Matching Record), lets say you
have a master file that has a unique key (we'll call it "masterkey") and you 
have
two or more transaction files that contain the "masterkey" and some other
identifier.

In a report or other process, you allow the user to choose which transaction 
file
is to be processed.  Within the CL program that controls the process, you could
set on U1 for choice 1, and U2 for choice 2, etc.  Within the RPG program you
would have an 'F' specification for all of the transactions files, but the
specification would contain U1, U2, etc. in the conditional open field.

Now, for the MR part.  The master file would be process as "IP" (Input Primary)
and all of the transactions would be defined as "IS" (Input Secondary). Or
update, whatever.  In the 'I' specifications for the master file, you would use
indicator M1 next to field "masterkey" and you would use M1 for the 
corresponding
field in the transaction file.

The RPG cycle will turn on MR when the input buffer for BOTH the primary and
secondary files contain a value that matches.  Or more commonly, you would want
to know when your secondary file does NOT have a matching entry in the master
file so you can isolate "orphans".  Although the RPG cycle and MR processing are
not in flavor today, IMHO it's still one of the better ways to blast through
files.

>
>
> 3.is there any way i can try out RPG programs using internet ie
> downloading or etc.

Not that I've heard of.

>
>
> 4.can a subfile be used to access data from different physical files if
> so how can an update pgm work on different physical files.

Subfiles do not access data.  Subfiles receive data.  A HLL language would
process the physical files and write to the subfile.  When the program processes
any subfile changes, it must also determine and process the appropriate physical
files.

It's up to you, the programmer, to handle all of this.

Happy Holidays,
James W. Kilgore
email@James-W-Kilgore.com


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.