updating relational file
GREG GREG
cassinih at hotmail.com
Wed Aug 22 15:56:57 CDT 2012
Hi ken.langendock
Your idea worked with the NEED ALL etc however the "Leave the preupdate and update procedures out." didn't. So by including the UPDATE procedure
every thing went through perfectly. All four cluster records updated simultaneously. Thanks a million.
Do you always want to write out the oracle record?If you do, put a NEED ALL on the file statement. Your preupdate is initializing the fields but not on a FOR loop, so only the first record is being altered and written. Try this instead SCREEN MYSCREEN RECEIVING FILE1 ON LINE 10 FOR 14 LINES
FILE FILE1 MASTER ; INDEXED
FILE FILE2 OCCURS 8 ;INDEXED
FILE FILE3 IN MY_ORACLE & ALIAS MY_OR SECONDARY & NOITEMS & OCCURS WITH FILE2 & NEED ALL ACCESS VIA EMPLOYER,DATE &
USING EMPLOYER OF FILE2,DATE OF FILE2
ITEM EMPLOYER OF MY_OR SECONDARY INITIAL EMPLOYER OF FILE2 FIXED ITEM DATE OF MY_OR SECONDARY INITIAL DATE OF FILE2
Leave the preupdate and update procedures out.
From: powerh-l-bounces+ken.langendock=rogers.com at lists.sowder.com [mailto:powerh-l-bounces+ken.langendock=rogers.com at lists.sowder.com] On Behalf Of GREG GREG
Sent: Wednesday, August 22, 2012 2:29 PM
To: powerh-l at lists.sowder.com
Subject: [Bulk] Re updating relational file Hi,
I am trying to update a relational file via an Indexed file , but only the first record is being updated in the relational file if two or more records are updated at once.
I have to updare the screen twice for the second record to be updated. Probably because the PUT verb updates one record at a time The Indexed file
contains an OCCURS 10 . Can anyone assists me. Thanks in advance.
eg:
SCREEN MYSCREEN RECEIVING FILE1 ON LINE 10 FOR 14 LINES
FILE FILE1 MASTER ; INDEXED
FILE FILE2 OCCURS 8 ;INDEXED
FILE FILE3 IN MY_ORACLE ALIAS MY_OR SECONDARY NOITEMS OCCURS WITH FILE2 ;MY_OR is the relational file
ACCESS VIA EMPLOYER,DATE &
USING EMPLOYER OF FILE2,DATE OF FILE2
PROCEDURE PREUPDATE
BEGIN
LET EMPLOYER OF MY_OR = EMPLOYER OF FILE2
LET DATE OF MY_OR = DATE OF FILE2
END
PROCEDURE UPDATE
BEGIN
Put FILE1
For FILE2
Begin
Put FILE2
Put FILE1
PUT MY_OR
End
End
--
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: 'subscribe' in message body to powerh-l-request at lists.sowder.com
Unsubscribe: 'unsubscribe <password>' in message body to powerh-l-request at 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.
Add 'site:lists.sowder.com powerh-l' to your search terms to search the list archive at Google.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sowder.com/pipermail/powerh-l/attachments/20120822/ccfe6661/attachment-0001.htm>
More information about the powerh-l
mailing list