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



Tim, At 04:35 PM 10/8/97 -0400, you wrote:

>Hello all,
>Look at this program:
>For all you smart people just FFW to the MAIN QUESTION AREA below.
>F***************************************************************** 
>F*                                                                 
>F*   PROGRAM NAME: TESTFUPD3                                       
>F*   DESCRIPTION:  UPDATE JOB                                      
>F*   PROGRAMMER:   TIM TRUAX                                       
>F*   DATE CREATED: 10/08/1997                                      
>F*                                                                 
>F*   COMMENT:  TAKE LOW CASE ITEMS AND CONVERT TO UPPER CASE.      
>F*                                                                 
>F***************************************************************** 
>FUSSRCHM IP  E                    DISK                             
>FUXSRCHM UF  E                    DISK                             
>F            SRCHM                             KRENAMESRCX         
>
>Here are the salient points:
>1) Writing program to update (WITHOUT LOCKING) this major file.(USSRCHM)
>2) USSRCHM is an actual externally defined file, used heavily during
>day.
>3) I am only going to be updating about 1000 of the 500,000 records in
>this file, therefore I want to only READ every record in the file as
>though it was just input.  Then I qualify the record that was only
>inputted to determine if it requires updating, then I will use the
>trickery of using file named UXSRCHM as my Update/Full file, I will
>chain out to this update file (which is really my input file) and only
>risk locking 1000 records instead of all 500,000 records.
>
>MAIN QUESTION AREA:
>
>In order to get this program to compile I had to CRTDUPOBJ DUPDATA(*NO)
>the USSRCHM file into my library as UXSRCHM, then place an OVRDBF for
>UXSRCHM to point to actual USSRCHM file.  Is creating an empty file
>object considered proper to getting the program to compile?

It's definitely OK to create empty files in order to get a compile working.
An example would be format files that are used for OPNQRYF. Here, though,
do you need to create the second file? Seems the OVRDBF should be enough,
since that worked when you had created the UX... file. The override made
the compiler look at the original file anyway, so your copy didn't even
come into the picture.

You're on the right track as far as locking is concerned. A common
technique is to use a logical for input. Then use the RRN of records you
want to change to chain into the (unkeyed) physical to perform the update.

BTW, aren't you able to put an 'N' in the half-adjust column, to specify no
lock on a file opened for update? Then I think you'd need only the update
file. You'd read (chain) with 'N' until you find the one you want, then
reread (chain) without the 'N' and do the update.

Cheers

Vernon Hamberg
Systems Software Programmer
Old Republic National Title Insurance Company
400 Second Avenue South
Minneapolis, MN  55401-2499
(612) 371-1111 x480


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MAJORDOMO@midrange.com
|    and specify 'unsubscribe MIDRANGE-L' in the body of your message.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.