GETNEXT and End of file error trapping
Larry Dannenberg
LarryD at BUTLERMRDD.ORG
Thu Jul 28 05:03:15 PDT 2005
I am getting an end-of-file error that I can't seem to trap for. I tried to
use the hint in the "Developer's Reference", 4th Ed, Page 266 (line 94 in
the example) but it didn't work for me.
When I enter a box number less that the last box number in the data set, it
works fine. (See partial listing of records in the data set).
How can I avoid the error when I am on the last record in the data set and
the next line has a "GETNEXT" in it?
Error Message
*** A filePro Error Has Occurred ***
On File: /u/appl/filepro/IMstore/prc.chooser
Input Processing
Line Number: 35
j=j+"1";getnext tre;nc=tre(10);goto loop3
^
Field not found.
Lookup has not been performed.
Partial Listing of Records in the Data Set (L Name, F Name, Box #, Division,
Location, Description)
XXXXX RACHIT 324126222 EC IM MAIN FILE, MED MAIN FILE
XXXXX KRISTO 324126222 EC IM MAIN FILE, MED MAIN FILE
XXXXX NANOKO 324126222 EC IM MAIN FILE, MED MAIN FILE
XXXXX KYLE 324126222 EC IM MAIN FILE, MED MAIN FILE
XXXXX JASON 324126223 EC IM MAIN FILE, MED MAIN FILE
XXXXX CHRIST 324126223 EC IM MAIN FILE, MED MAIN FILE
XXXXX DEVIN 324126223 EC IM MAIN FILE, MED MAIN FILE
XXXXX JANICE 888888888 AD DD TEST BOX TEST OF OUTPUT
XXXXX JANICE 999999999 AS FD TEST INFORMATI CHECK OF OUTPUT
***** END OF FILE *****
Partial listing of the Processing Table (sb=box# entered by the user,
defined in automatic)
. If: '***********************************************************
.
Then: '***** SUBROUTINES
.
21 ------- - - - - - - - - - - - - - - - -
fillbox. If: 'ppx=people and box data from IMpeople; pnx=box#
.
Then: dim ppx[20](65,allup);dim pnx[20](10,allup)
.
22 ------- - - - - - - - - - - - - - - - -
. If: 'j=counter;nc=last box#
.
Then: j(3,.0)="1";nc(10,allup)="1"
.
23 ------- - - - - - - - - - - - - - - - -
. If:
.
Then: lookup tre = IMstore k=sb i=E -ng
.
24 ------- - - - - - - - - - - - - - - - -
. If: @SK eq "BRKY"
.
Then: exit
.
25 ------- - - - - - - - - - - - - - - - -
loop3 . If: not tre
.
Then: close tre;return
.
26 ------- - - - - - - - - - - - - - - - -
. If: 'get the box number
.
Then: nb(10,allup)=tre(10)
.
27 ------- - - - - - - - - - - - - - - - -
. If: nb eq nc 'skip box#s that are the same
.
Then: getnext tre;goto loop3
.
28 ------- - - - - - - - - - - - - - - - -
. If: nb lt sb 'disregard any box# less that the one
entered .
Then: close tre;return
.
29 ------- - - - - - - - - - - - - - - - -
. If: 'fixed field listbox vars
.
Then:
xn(10,allup)=tre(10);xd(2,allup)=tre(7);xp(8,mdy/)=tre(8);xc(30,allup)=tre(9
)
30 ------- - - - - - - - - - - - - - - - -
. If: 'Box#,Originating Dept, Date Packed, Box Contents
.
Then: ppx[j]=xn<xd<xp<xc
.
31 ------- - - - - - - - - - - - - - - - -
. If: 'pnx[j]=box#
.
Then: pnx[j]=tre(10)
.
32 ------- - - - - - - - - - - - - - - - -
. If: j lt "19" 'to prevent duplicate box #s in list box use nc
.
Then: j=j+"1";getnext tre;nc=tre(10);goto loop3
.
33 ------- - - - - - - - - - - - - - - - -
. If:
.
Then: close tre;return
.
34 ------- - - - - - - - - - - - - - - - -
File: IMstore────────────────────────────────────────────────Processing:
boxselx
File Used Here
┌─────────────────────────┐
5.0.05D4
│ D E F I N E F I L E S │
└─────────────────────────┘
Number -------------Field Heading-------------- Len --Type--
1 - last name . 20. allup .
2 - first name . 15. allup .
3 - ssn . 11. ssnum .
4 - birth date . 8. mdyy .
5 - box contents type . 1. allup .
6 - description-box type other . 20. allup .
7 - originating dept . 2. allup .
8 - date box packed . 6. mdy .
9 - box contents . 30. allup .
10 - box number . 10. allup .
11 - box storage location . 2. allup .
12 - retention code . 1. allup .
13 - destroy date . 6. mdy .
14 - alpha range-from . 10. allup .
15 - alpha range-to . 10. allup .
16 - date range-from . 6. mdy .
17 - date range-to . 6. mdy .
18 - folder contents . 79. allup .
19 - Empl or Consu . 1. allup .
20 - Link# to IMpeople . 5. .0 .
File:
IMstore────────────────────────────────────────────────────────────────Key
------------------------------
Larry Dannenberg
Butler County MRDD
155 Donald Drive
Fairfield, OH 45014
(513) 867-5962 ext. 35
HYPERLINK "mailto:debbies at butlermrdd.org"larryd at butlermrdd.org
HYPERLINK "http://www.butlermrdd.org"www.butlermrdd.org
------------------------------
Larry Dannenberg
Butler County MRDD
155 Donald Drive
Fairfield, OH 45014
(513) 867-5962 ext. 35
HYPERLINK "mailto:debbies at butlermrdd.org"larryd at butlermrdd.org
HYPERLINK "http://www.butlermrdd.org"www.butlermrdd.org
CONFIDENTIALITY NOTE: This message is intended for use only by
the individual or entity to which it is addressed and may contain
information that is privileged, confidential, and exempt from disclosure
under applicable law. If the reader of this message is not the intended
recipient, or the employee or agent responsible for delivering this
message to the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication or any
attachments is strictly prohibited. If you have received this
communication in error, please erase all copies of the message and its
attachments and notify the sender immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.celestial.com/pipermail/filepro-list/attachments/20050728/d9323d9e/attachment-0001.html
More information about the Filepro-list
mailing list