understanding how define affects field initialized from temporary
Joe Boyle
atla38@dsl.pipex.com
Mon, 13 Dec 2004 19:08:11 -0000
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.
This e-mail and all information contained in it is confidential and may be
legally privileged. If you are not the intended recipient, your access to
this e-mail is unauthorized. Any use, dissemination, distribution,
publication or copying by you of this e-mail or any of the information
contained within it is prohibited and may be unlawful. Do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so. The content of this e-mail and any
attachments sent with it may have been altered without the consent or
knowledge of the author.
-----Original Message-----
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
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.