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



Is this another scoping issue?
Do you have RRN defined as a global variable and/or a local variable? That
is, is RRN defined in your subprocedure? If so, then that's your problem.
The RRN needs to be a global variable.


Bob Cozzi
Cozzi Consulting
www.rpgiv.com


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Fisher, Don
Sent: Tuesday, November 18, 2003 1:11 PM
To: 'rpg400-l@xxxxxxxxxxxx'
Subject: Building a subfile using a procedure

I am using a procedure to add records to a subfile, which is essentially one
of my standard subfile load routines turned into a procedure.  The subfile
is cleared using SFLCLR in the calling procedure.  The called procedure sets
RRN to 0 and begins adding records.  On the first WRITE, I receive an
"incorrect relative record number or field selection" error.  This is a
subfile record that is not bound by any WINDOW keywords and RRN is 1 when
the WRITE is attempted.  SFLINZ is not used so there are definitely no
records in the subfile when the WRITE is attempted.  The SFLCLR indicator is
also turned off.

Any ideas will be most appreciated.

Thanks. 

Donald R. Fisher, III
Project Manager
Roomstore Furniture Company
(804) 784-7600 extension 2124
DFisher@xxxxxxxxxxxxx

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




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.