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



Shucks.

Thanks for the info.  I found this little ditty in the RPG users guide, but 
only after I sent out my question:

>When you update or add a record to a file by relative record number, the 
>record must already have a place >in the member.  
>For an update, that place can be a valid existing record; 
>for a new record, that place can be a deleted record.

Technically, I could do a INZPFM with type *DLT, but what a waste.  It's much 
more trouble than it's worth.

Regards,
Rich

============================================
Rich Duzenbury
http://rich.dyn.ml.org
http://vpsolutions.com
============================================

> -----Original Message-----
> From: owner-midrange-l@midrange.com
> [mailto:owner-midrange-l@midrange.com]On Behalf Of Larry Ackerman
> Sent: Tuesday, November 24, 1998 11:42 PM
> To: MIDRANGE-L@midrange.com
> Subject: Re: Writing by Record number
> 
> 
> you can only write to the end of a file.  but it should be 
> possible to keep
> track of skips (deleted records) by using the record number from the file
> information data structue, write a bogus record, read previous and delete
> it to keep the positioning the same.
> 
> the output file would need to be update/add reusedlt(*no), the input file
> should be seqonly(*yes 1) to insure the file information data structure
> gets updated by each read not at block end, read the file non-keyed.
> 
> hth
> 
> larry
> ----------
> > From: Rich Duzenbury <rduz@aros.net>
> > To: 'Midrange-L@Midrange.Com' <midrange-l@midrange.com>
> > Subject: Writing by Record number
> > Date: Tuesday, November 24, 1998 4:25 PM
> > 
> > Is it possible to control the record number assigned to a record?  
> > 
> > I have to convert some records to a new format and the record numbers
> need to be preserved, regardless of whether deleted records are in the
> files.  Reorganizing the files prior to conversion is not an option.
> > 
> > Here is the code I have tried as a test.  (V3R2M0)
> > 1.00      FWMPJRTS O   E                    DISK               
>           
>   
> > 2.00      F                                              
> KRECNO $RRN     
>   
> > 2.08      C*                                                   
>           
>   
> > 3.00      C           1         DO   10        I      100      
>           
>   
> > 4.00      C           I         MULT 5         $RRN   100      
>           
>   
> > 5.00      C                     Z-ADD$RRN      SRRN            
>           
>   
> > 6.00      C                     WRITEWMPJRTSA                  
>           
>   
> > 7.00      C                     END                            
>           
>   
> > 8.00      C*                                                   
>           
>   
> > 9.00      C                     SETON                     LR   
>           
>   
> > 
> > Which fails miserably on statement 6 (the write) with a 
> CPF5006 - 'Record
> not found in file'.  The file WMPJRTS is a test file with one 
> field called
> SRRN, and no keys.  
> > 
> > What I can't understand is why CPF5006 would be issued for an 
> output only
> file.  Also, if line 2 is commented out, the program runs, but the record
> numbers are assigned 1-10, not 5,10,15,20 as I would like.
> > 
> > Any and all advice is greatly appreciated.
> > 
> > Regards,
> > Rich
> > 
> > ============================================
> > Rich Duzenbury
> > http://rich.dyn.ml.org
> > http://vpsolutions.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
> > +---
> +---
> | 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 ...

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.