Re: Need to import non-relational data into a database, and produce reports based on it.
- From: LX-i <lxi0007@xxxxxxxxxxxx>
- Date: Thu, 01 Mar 2007 20:14:28 -0700
Pierre.Canuck@xxxxxxxxx wrote:
I do have one remaining question, in your experience, how often do you
encounter record definitions having incomplete keys--i.e. you need to
look at the previous record(s) to relate them together? Is this
something rare?
This type of this is somewhat common. It can be processed using a "control-break" type of structure. From looking at your original message, the algorithm would look something like the below...
The-Top.
Read a record
at eof go to The-Bottom
If Type = "AC"
Wrap up current account
Current Account = Value of this record
else
if type = "PA"
Wrap up current sub-account (if exists)
Current Sub-Account = value of this record
else
Store detail item for current account/sub-account
end-if
end-if.
go to The-Top.
The-Bottom.
Wrap up current account/sub-account.
The-End.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ / \ / ~ Live from Albuquerque, NM! ~
~ / \/ o ~ ~
~ / /\ - | ~ daniel@thebelowdomain ~
~ _____ / \ | ~ http://www.djs-consulting.com ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ ~
~ !O M-- V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e ~
~ h---- r+++ z++++ ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Who is more irrational? A man who believes in a God he doesn't see, or a man who's offended by a God he doesn't believe in?" - Brad Stine
.
- Prev by Date: Re: Help! GO TO and PERFORM THRU!
- Next by Date: Re: Help! GO TO and PERFORM THRU!
- Previous by thread: Samples for socket programming with COBOL on z/OS
- Next by thread: Re: OO as a Form of Modular Programming
- Index(es):
Relevant Pages
|