|
CMFile is the Input Primary file. It does not have nor need any reads or chains to read to it. It is read using the RPG cycle, the way the majority of S36 RPG II programs were designed. The error actually occurs when RPG II is attempting to read the next record based on the index file, and the record does not exist. Regards, Jim Langston booth@martinvt.com wrote: > Jim, if the reports are all OK perhaps the easiest fix is to go into > program CM1540 and look for the CHAINs and READs to file CMFILE? Look at > the right-side indicators. The indicators turn on/off depending on the > success of the read. The next section of code could be conditioned by the > found/not-found status of the record. That way if the record isn't found > then CM1540 will just jump past the error-causing condition? > _______________________ > Booth Martin > Booth@MartinVT.com > http://www.MartinVT.com > _______________________ > > Jim Langston <jlangston@conexfreight.com> > Sent by: owner-rpg400-l@midrange.com > 06/30/2000 03:01 PM > Please respond to RPG400-L > > > To: "RPG400-L@midrange.com" <RPG400-L@midrange.com> > cc: > Subject: S36 Index Sort and Record Not Found > > We still have a number of S/36 reports on our system that are going to die > a natural death. > This use the indexed sort for an RPG program, and we commonly get an RPG > error stating > the record is not found. It is a big pain to keep typing I for ignore to > get these things to continue. > > So, my questions are, what is wrong and how do I fix it? > > Sort cryteria: > // LOAD #GSORT > // FILE NAME-INPUT,LABEL-CMFILE,DISP-SHR > // FILE NAME-OUTPUT,LABEL-ASCM1540,RECORDS-00040196,RETAIN-J > // RUN > HSORTA 25A 3X N > > Output according to Job Cryteira > 34031 records read and 30009 records selected from CMFILE in library > QS36F > mbr CMFILE. > 34031 total records read, and 30009 total records selected. > 30009 RA entries placed in output file ASCM1540 in library QTEMP mbr > M000629. > REQUEST SUCCESSFUL 06/29/00 14:42:51. > > Then we run a S/36 RPG program: > // LOAD CM1540 > // FILE NAME-ASCM1540,DISP-SHR > // FILE NAME-CUSMAS,DISP-SHR > // FILE NAME-EQPMST,DISP-SHR > // FILE NAME-CMFILE,DISP-SHR > // RUN > > It opens the files: > 0020.00 0020 FCMFILE IP F4480 448R16II 1 DISK 300 > 0021.00 0021 FASCM1540IR 300 3 3IT EDISK > 0022.00 0022 FCUSMAS IC F 180 180R 5AI 1 DISK 80 > 0023.00 0023 FEQPMST IC F 80 80R11AI 1 DISK 100 > 0024.00 0024 FPRINTER O 132 132 OF PRINTER > 0025.00 0025 FPRINTER2O 132 132 OA PRINTER > 0026.00 0026 E ASCM1540CMFILE > > I uses the RPG cycle as you can see. When the program runs sometimes (if > not all the time) we > get errors we have to answer: > > Message ID . . . . . . : SSP0352 > Date sent . . . . . . : 06/30/00 Time sent . . . . . . : > 11:47:49 > > Message . . . . : RPG9035 Options ( 123F) > No record was found on read operation for file CMFILE. > > Cause . . . . . : The RPG program CM1540 in library CNXY2K at statement > 00000000 is trying to read a record that does not exist. For an > indexed > file, there is no record containing the key value specified. For a > direct > file or file processed by address output file, the relative record > number is > in the file, but it is a deleted record. > > We just had the sort procedure sort the address output file, so it > shouldn't contain > deleted records, correct? > > Does anyone have a clue? We have to keep selecting reply 1 over and over > and over > to get these things to finish. > > P.S. I just re-read this note before I sent it and noticed the line: > // FILE NAME-OUTPUT,LABEL-ASCM1540,RECORDS-00040196,RETAIN-J > > That RECORDS-00040196: Does that tell the sort to create the output file > with 40,196 records, > and since there's only 30,009 that over 10,000 records contain blank info? > I doubt it, as I know > we have to reply 1 a lot of times, but surely not 10,000 times! > > Regards, > > Jim Langston > > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to RPG400-L@midrange.com. > | To subscribe to this list send email to RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: > david@midrange.com > +--- > > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to RPG400-L@midrange.com. > | To subscribe to this list send email to RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: david@midrange.com > +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-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.