Re updating relational file

GREG GREG cassinih at hotmail.com
Wed Aug 22 13:28:36 CDT 2012


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


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sowder.com/pipermail/powerh-l/attachments/20120822/f262ff16/attachment.html>


More information about the powerh-l mailing list