understanding how define affects field initialized from
temporary
Lorry Litman
LLitman@exchange.hsc.mb.ca
Mon, 13 Dec 2004 14:16:05 -0600
This is a multi-part message in MIME format.
--=_Part_7dcff8ba$5216$44a9$94ce$b99cd67bfc62
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Hi,
Thank-you all for your reply.
Let me try and clarify a few things.
If I call the screen in find mode (or enter F in the action field) and th=
en
enter A in the action field and I check in an input procedure "IF ENTRYMO=
DE"
the answer is true.
On update the record is written to the table, it's just that emp_no has a
value of 0 instead of t_emp_no that it was initialized from.
If I change the item initial statement
from=20
item emp_no of empfile initial t_emp_no if entrymode
to
item emp_no of empfile initial t_emp_no
the record gets written to the table with the correct emp_no value.
What I don't understand and am trying to get a better understanding of is
what might be going on in the background with the define statement.
It almost seems like there is some sort of "get file" which maybe changes
some buffer to do with the initialization of the emp_no field. I tried
checking the manuals that I have and couldn't find any information.
Thanx
Lorry
-----Original Message-----
This e-mail and/or any documents in this transmission is intended for the=
address(s) only and may contain legally privileged or confidential infor=
mation. Any unauthorized use, disclosure, distribution, copying or dissem=
ination is strictly prohibited. If you receive this transmission in error=
, please notify the sender immediately and return the original.
--=_Part_7dcff8ba$5216$44a9$94ce$b99cd67bfc62
Content-Type: message/rfc822
Content-Transfer-Encoding: 8bit
From: Joe Boyle [mailto:atla38@dsl.pipex.com]
Sent: Monday, December 13, 2004 1:08 PM
To: 'Lorry Litman'; 'PowerHouse listserver (E-mail)'
Subject: RE: understanding how define affects field initialized from
MIME-Version: 1.0
To add to JWP's comment ( just saw it ) I would try item syntax below,
item emp_no of empfile final t_emp_no if newrecord
Regards, Joe.
-----Original Message-----
--=_Part_7dcff8ba$5216$44a9$94ce$b99cd67bfc62
Content-Type: message/rfc822
Content-Transfer-Encoding: 8bit
From: Michael Lee [mailto:Michael.Lee@mclsystemsinc.com]
Sent: Monday, December 13, 2004 12:55 PM
To: Lorry Litman
Subject: Re: understanding how define affects field initialized from
MIME-Version: 1.0
Hi Lorry,
It is odd behavior and I can't see any obvious reason why it wouldn't
write the record. I would suggest however that you change your ITEM
statement on EMP_NO from...
item emp_no of empfile initial t_emp_no if entrymode
To
ITEM EMP_NO OF EMPFILE INITIAL t_EMP_NO FIXED
I'm not certain why you have the "if entrymode" on that statement as it
seems that you want it to find and add using the passed value under all
circumstances. I have a feeling that this will resolve your problem.
Regards,
Michael Lee
MCL Systems Inc.
-----Original Message-----
--=_Part_7dcff8ba$5216$44a9$94ce$b99cd67bfc62
Content-Type: message/rfc822
Content-Transfer-Encoding: 8bit
From: Pickering, John (NORBORD) [mailto:John.Pickering@norbord.com]
Sent: Monday, December 13, 2004 12:55 PM
To: 'Lorry Litman'; PowerHouse listserver (E-mail)
Subject: RE: understanding how define affects field initialized from
MIME-Version: 1.0
Lorry
Take the "if entrymode" off the item statement for emp_no of empfile.
When you're in find mode (even if using append) entrymode will not be true.
Regards,
JWP
-----Original Message-----
--=_Part_7dcff8ba$5216$44a9$94ce$b99cd67bfc62
Content-Type: message/rfc822
Content-Transfer-Encoding: 8bit
From: powerh-l-admin@lists.sowder.com
[mailto: powerh-l-admin@lists.sowder.com] On Behalf Of Lorry Litman
Sent: 13 December 2004 18:13
To: PowerHouse listserver (E-mail)
Subject: understanding how define affects field initialized from temporary
MIME-Version: 1.0
I'm trying to figure some weird screen behaviour which I'm trying to
understand what is going on.
vms 7.2-2, ph 7.10.g1, rdb 7.0-1
here is the jist of the screen and what it is doing or not
run screen empscrn passing t_emp_no mode f
screen empscrn receiving t_emp_no
temp t_emp_no zu size 9 reset at startup
file empfile primary occ 12
item emp_no of empfile initial t_emp_no if entrymode
access via emp_no using t_emp_no orderby emp_dt desc,emp_cd
def d_rpt_flag char * 6 = "o" if emp_rpt_flag of empfile = "n" &
else "es" if emp_rpt_flag of empfile = "y" &
else "nknown" if emp_rpt_flag of empfile = "u" &
else ""
cluster occurs with empfile
field emp_cd
field emp_rpt_flag
field d_rpt_flag
cluster
explanation:
as you can see there is no field statement for emp_no
first time entering the screen (no records exist) entering a record or group
of records emp_no is written to the table.
entering the screen after that, it displays the existing emp_no records, we
then
action append, enter field info, save & return.
record is written to the table, however, when going back into the screen the
record just saved is not found because the emp_no is recorded as 0 instead
of the t_emp_no.
the strange part is, if I remove the define statement or just make the
define statement = anything as opposed to checking the value of the field
everything works fine.
question:
is it possible that the define does some sort of file or record retrieval
and thus causes emp_no of empfile to lose its original initialization from
t_emp_no? I'm trying to understand what is happening in the background.
Thanx
Lorry
This e-mail and/or any documents in this transmission is intended for the
address(s) only and may contain legally privileged or confidential
information. Any unauthorized use, disclosure, distribution, copying or
dissemination is strictly prohibited. If you receive this transmission in
error, please notify the sender immediately and return the original.
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request@lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request@lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
--=_Part_7dcff8ba$5216$44a9$94ce$b99cd67bfc62--