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



Try using multi occurance data structure.  This way you have two data
structures corresponding to the file that you are using.  As you say
that the fields have the same name and of the same type, use one file
for the data structure defination.  Clear both the data structures at
the beginning.  Occur one data structure and read or chain on the file
that you want.  Ones you find the record that you want to update with
the other file occur to the other data structure.  Chain or read the
other file and ones you find the record occur to the first data
structure and update the second file as the first data structure would
have the date of first file and you would be updating the second file
with out any move statements.
I hope I have not confused you and hope also that this would have helped
you a bit.
bye for now.    

Derick A. Lewis


-----Original Message-----
From: Torres, Wanda [mailto:WTorres@dresdner.com]
Sent: Thursday, February 11, 1999 2:49 AM
To: 'Midrange-L@midrange.com'
Subject: file Has same field names


Hi Everyone:

I have to fix a program the never updated its data because the field
names
in both files were the same. Ok, you say no big deal,  save fields, read
file , move fields back update file. There are 256 fields in the file. I
do
not wants to have all those moves.  Is there a way I can have one move
without internally  describing the file?  The original code is below:
(Not
written by me) . I will appreciate any suggestions.  I am brian dead
today
after fixing many bugs in different systems.

Thanks,

Wanda 

FMT FX
.....FFilenameIPEAF........L..I........Device+......KExit++Entry+A....U
0019.00      FBECFILEPIF  E           K        DISK

0020.00      F            BECRECP                           KRENAMEINPUT

0021.00      FBECFIL00IF  E           K        DISK
A

0022.00      F            BECRECP
KRENAMEOUTPUT

0023.00       *

0024.00      C           BECKEY    KLIST

0025.00      C                     KFLD           BKMKT

0026.00      C                     KFLD           BKTIN

0027.00      C                     KFLD           BKICC

0028.00      C                     KFLD           BKIC2

0029.00      C                     KFLD           BKIC3

0030.00      C                     KFLD           BKMDT

0031.00      C                     KFLD           BKCSP

0032.00      C                     KFLD           BKSFX

0033.00       *

0035.00      C           *IN99     DOUEQ'1'

0036.00      C                     READ INPUT                    99

0037.00      C           *IN99     IFEQ '0'

0038.00       *

0039.00      C           BECKEY    CHAINOUTPUT               97

0040.00      C           *IN97     IFEQ '0'

0041.00      C                     UPDATOUTPUT

0042.00      C                     ELSE

0043.00      C                     WRITEOUTPUT

0044.00      C                     ENDIF

0045.00      C                     ENDIF

0046.00      C                     ENDDO

0047.00       *

0048.00      C                     MOVE '1'       *INLR

0049.00       *

        ****************** End of data
****************************************
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to
MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.