× 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.



Gene,

Ok, with CHAIN, blocking is not a factor. So there's something else going on.

As Joe mentioned, on of the benefits of Single Level Store is that the record only exists in one
place, when the record is written out, everybody sees the updated version according to the level of
commitment control in use. It doesn't appear that this program is using commitment control. What
about the program being used by the other user?

How are NEWMSTR and SAVMSTR defined?

Also, any chance the CHAIN is failing for some reason?

Charles

-----Original Message-----
From: rpg400-l-bounces+wiltc=cintas.com@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+wiltc=cintas.com@xxxxxxxxxxxx] On
Behalf Of Gene Burns
Sent: Friday, October 05, 2007 12:51 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: SQL update vs RPG/DDS update

CHAIN followed by UPDATE, but with an externally defined DS.



fhclmmas uf E K DISK


| d mstrDS e ds extname(hclmmas)


// get the current record from the file
chain (cmyrin: cmycin) clmmas; // loads mstrDS

// compare the current record in the file to the
original before
// making changes
if savmstr = mstrDS;
mstrDS = newmstr; // set fields to new values
clchgd = today;
clchgt = %time();
clchgu = userid;
update clmmas;
savmstr = mstrDS; // update saved DS to new values
origscreen = screenDS;
completed = *on;
else; // file has been changed by another user
unlock hclmmas;
completed = *off;
message = NoUpdMst + %trim(clchgu) + Retry;
wrkadj = *zero;
wrkadj2 = *zero;
wrkadj3 = *zero;
endif;
else;


When the file has been updated by someone else the DS are
different, HCLMMAS is unlocked, and the message is
(supposedly) set telling the user who updated the file. The
CLCHGU field is in the file, but is blank at this point in
the program. Checking the file shows that these fields have
been updated and CLCHGU is not blank.

Perhaps the addition of the DS is what is causing this problem?


Gene

On 10/5/07, Wilt, Charles <WiltC@xxxxxxxxxx> wrote:

Joe,

Actually, I read the original post as "update" = CHAIN/UPDATE also,
but the symptoms seemed to indicate that blocking might be
the issue;
which would mean Gene was going READ/UPDATE.

How about it Gene? Are you READing or CHAINing?

Charles

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx ] On Behalf Of Joe Pluta
Sent: Friday, October 05, 2007 11:54 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: SQL update vs RPG/DDS update

From: Wilt, Charles

I'm not sure what your problem is, Gene, but it is not that
dirty records are being hidden from users due to caching.
The beauty of the single level store is that there is no
such thing
as a dirty record. When you access a record, you are
accessing
address of the virtual memory location where it
resides and that
memory is the same for all users.

Not quite true Joe.

Sounds like RPG may be blocking the i/o of the file. In
which case,
while the program has done the WRITE, the data is still in
the program
buffers and has not yet been passed to the DB.

I though I was pretty clear about updates vs. writes, Charles.
While writes may be blocked, the random nature of the
CHAIN/UPDATE
pretty much precludes any blocking. I suppose you MIGHT see
blocking on an update primary file, but I haven't tried that in a
long time, and anyway that's not how I read the original
post. Gene
specifically used the word "update" which I took to mean
updating a
record, which in turn means CHAIN/UPDATE.

On the other hand I suppose it's possible that he was
talking about
locking the file and doing a bunch of writes. In that
case, you're
absolutely correct that the writes could be blocked (which I also
said), and I would definitely go with the FEOD strategy;
that's what
I use as opposed to the FRCRATIO.

Joe

--
This is the RPG programming on the AS400 / iSeries (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting,
please take
a moment to review the archives at
http://archive.midrange.com/rpg400-l.




This e-mail transmission contains information that is
intended to be
confidential and privileged. If you receive this e-mail
and you are
not a named addressee you are hereby notified that you are not
authorized to read, print, retain, copy or disseminate this
communication without the consent of the sender and that
doing so is
prohibited and may be unlawful. Please reply to the message
immediately by informing the sender that the message was
misdirected.
After replying, please delete and otherwise erase it and any
attachments from your computer system. Your assistance in
correcting this error is appreciated.

--
This is the RPG programming on the AS400 / iSeries
(RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting,
please take a
moment to review the archives at
http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the AS400 / iSeries (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




This e-mail transmission contains information that is intended to be confidential and privileged. If you receive this e-mail and you are not a named addressee you are hereby notified that you are not authorized to read, print, retain, copy or disseminate this communication without the consent of the sender and that doing so is prohibited and may be unlawful. Please reply to the message immediately by informing the sender that the message was misdirected. After replying, please delete and otherwise erase it and any attachments from your computer system. Your assistance in correcting this error is appreciated.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.