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



Begging the question of why have two programs that are exactly the same, this sounds like the subfile has no records selected (i.e., it's an empty subfile). The subfile's relative record number (defined in the F-specs) is *Zeros. Condition the SFLDSP keyword on some indicator, and set this indicator *On or *Off before outputting the Subfile Control.


Now as to why two iterations of the exact same program would return different results. Are there selectors in the program ("Start here...")? Or do you just load the entire CUSTOMER table from beginning to end in both? If the answer to the first question is 'Yes, but I used the same selector in each,' or the answer to the second question is 'Yes,' then the programs are obviously not exact replicas if one returns the error and the other one does not given the same working parameters.


        * Jerry C. Adams
*IBM System i Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
        615.995.7024
fax
        615.995.1201
email
        jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>



Joseph Pascoguin wrote:

Good Morning All,

I wrote a simple Load-all subfile program SFR001 to access CUSTOMER file.
I wrote the same program(same load all) by giving different name SFR001A to access same CUSTOMER. When I call SFR001A it is throwing the error " Session or device error occurred in file SFD001 (C G D F)."
I took D to see dump, the one statement that attracted me is as below
Message Identifier . . . . . . . . . . :   CPF5021
            Incorrect relative record number or field selection error.

In the additional message information by F1 , I can seen below


Message ID . . . . . . :   RNQ1255       Severity . . . . . . . :   99
Message type . . . . . :   Inquiry
Date sent  . . . . . . :   08/22/06      Time sent  . . . . . . :   08:30:43

Message . . . . : Session or device error occurred in file SFD001 (C G D F).
Cause . . . . . :   RPG procedure SFR001A in program PASCOJ/SFR001A at
 statement *INIT detected a session or device error.  Recovery may be
 possible. Examine the major/minor return code value to determine the
specific error that occurred. If the major return code is 82 then the error occurred while acquiring a session or device. If the major return code is 83 then the error occurred during an I/O operation and the session or device is
 still active.

Can some one advise why the second program(SFR001A) is throwing this exception, though it is same as that of SFR001?
Thank you all,

JoeP

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



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.