|
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 +---
As an Amazon Associate we earn from qualifying purchases.
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.