ca.portal.admin

Re: Record and set changes

Discussion created by ca.portal.admin on Jan 10, 2007
Hi Bill,

I must admit I know very little to nothing about assembler. The
fields will get initialized with values based on other data values so
I am afraid it must be updated via program. At least my programming
skills will get used again. :-)

Thanks for your help,
Petra

At 01:05 PM 1/10/2007, you wrote:
Hello Petra:

If you know assembler language you don't need a program to initialize
the
fields, you can just modify the output of the Schema Compare and change
the
statements to the proper format for your new fields.

I'll look around for an example that I might have.

Bill Allen

In a message dated 1/10/2007 2:27:36 P.M. Eastern Standard Time,
lafresep@U.ARIZONA.EDU writes:

I thought it might be the case. My program that initializes the data
would then cause the set to be updated and put in the proper order.

Thanks for your help.
Petra



At 12:10 PM 1/10/2007, you wrote:
I think the restructure puts the expanded records in the
new sequence in=0D=
=0Athe set=2E I always thought of restructure handling the
logical=0D=0Aorg=
anization of the database and unload/reload the physical org=2E I
dont=0D=
=0Athink you need to run an unload/reload unless you're also
changing
the=
=0D=0Apage size or cleaning up
fragmentation=2E=0D=0A=0D=0ALutz Petzold=0D=

=0A=0D=0A=0D=0A=0D=0A=0D=0A-----------------------------------------=0D
=0AT
=
his e-mail may contain confidential or privileged information=2E
If=0D=0Ayo=
u think you have received this e-mail in error, please advise
the=0D=0Asend=
er by reply e-mail and then delete this
e-mail immediately=2E=0D=0AThank yo=
u=2E Aetna=0D=0A
"
IDMS Public Discussion Forum
IDMS-L@LISTSERV.IUASSN.COM
SMTP
IDMS-L@LISTSERV.IUASSN.COM
IDMS-L@LISTSERV.IUASSN.COM
SMTP








Normal

Normal
Re: Record and set changes
"In my last note I forgot to mention that you must alter the value of the
sort key when you do the modify.
IDMS actually recognizes if the key did not change, so it doesn't have to
check prior and next.

The safest approach is to leave the additional field as blanks, as that
preserves the current sort order and then run a program to change the sort
key.
Be careful not to lose currency in your set when you do it. If you are
changing the blank to a non-blank you will always get a higher value.
Do obtain last in set, accept prior dbkey, modify current, obtain using the
accepted dbkey.... repeat until prior dbkey points to the owner.

On a large database this could run forever.
You may want to run an unload/reload first, with a page reserve added for
the reload, this will reserve space on each page for the expansion.
Page reserve = (pagesize / recordlength) * expansionsize

Tommy Petersen
110 Cokesbury Rd
Room 542H
Lebanon, NJ 08833

Phone:
Internal 200 - 3699
External (908) 236-3699
Fax: (908) 236-3692




Petra LaFrese
<lafresep@U.ARIZO
NA.EDU> To
Sent by: IDMS IDMS-L@LISTSERV.IUASSN.COM
Public Discussion cc
Forum
<IDMS-L@LISTSERV. Subject
IUASSN.COM> Record and set changes


01/10/2007 01:51
PM


Please respond to
IDMS Public
Discussion Forum
<IDMS-L@LISTSERV.
IUASSN.COM>






I have a procedural question.

I am planning on expanding a record and changing the order of a set
that uses the record from last to sorted. I know I need to run a
restructure segment to add new fields to the record. I also need to
run a program to initialize the new fields with data (It may not be
the same for every record). Then I plan to do an unload/load.My
question is this: Since I am doing the unload/load, do I have to
worry about the new sort order of the index? Won't the load put it in
the proper sort order? Or is this something I need to handle in my
initialization program? Some of the new fields that I will be
populating will be used as sort keys for the set.

Thanks for your help.

Petra
"
IDMS Public Discussion Forum
IDMS-L@LISTSERV.IUASSN.COM
SMTP
IDMS-L@LISTSERV.IUASSN.COM
IDMS-L@LISTSERV.IUASSN.COM
SMTP








Normal

Normal
Re: Record and set changes
"Petra,

Yes...What Alex said...The restructure will not reorder the set.

Here is a two-pass process that should work. It's a bit of work but should
run very quickly, especially if the records are stored via the owner.

This assumes that you are leaving the set as is and not changing it to a
user-owned index set during the restructure/unload/reload. (To the group:
can the set type be changed easily without writing a program? If so, the
order would be set up when the index is created.)

Do your restructure to add the fields and populate them as needed. Don't
worry about sort order on the set, yet.

Backup the database.

Create a test schema by cloning the production schema. Change the set so it
is it is optional manual. VERY IMPORTANT--Make sure the prefix assignments
do not change through this entire process.

Pass 1- Sweep the records writing the owner dbkey, record dbkey and the
logical key to a sequential file. Then disconnect each record. They will
be reconnected in pass 2.

Change the set in the test schema to a sorted set using the same logical key
you wrote to the file, still optional manual.

Sort the file by the owner's dbkey and logical key. Sort the logical key in
descending order if the set is ascending and vice versa. While IDMS will
put them in the correct order during the connect, this will allow it to be
done very efficiently.

Pass 2 - Read each record from the sorted file, clear currencies, find the
owner using the owner's dbkey, find the record using its dbkey and issue a
connect. This should hook them up, in order, very efficiently.

Change your production schema to specify the sorted set using the logical
key.

Tom Hebert
ObjEx, Inc.

Outcomes