|
Check for additional messages in the job log right before the 'session or device error' message. Usually when I have seen this, it's either because there are no subfile records to display and the indicator on the SFLDSP line in the DDS is on (or not specified at all), or the SFLRCDNBR field is not set to a valid value. Terry Richardson Vermont Information Processing, Inc. terry@xxxxxxxxxx "Douglas W. Palme" <dpalme@xxxxxxxxxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 03/23/2005 09:56 AM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To "RPG Group" <rpg400-l@xxxxxxxxxxxx> cc Subject wierd error message I'm getting an usuual runtime error that I cannot for the life of me figure out. Session or device error occurred in file CUSTMASTSF (C G D F). I have a program that is supposed to display a subfile of customer records based on a specific salesman number, and it compiles fine, but bombs when I run it. The program is supposed to check the username against a PF called secfile to get the appropriate salesman number and then loop through the logical file for the appropriate customer records. I thought the only limit to sub files was the 9,999 records that can be displayed, but checking the RRN in debug mode it only reaches 2199 so I don't think that is the problem. It runs all the way through the program in debug with no errors up until it attempts to dipslay the subfile at which time it fries out. Any suggestions would be appreciated. ************************************************************************** * ORIGINAL DATE: 03/22/2005 * APPLICATION NAME: CUSTOMER MASTER SUB FILE BY SALESMAN * PROGRAM NAME: CMSLSSF * DESCRIPTION: 1. GET SALESM NO 2. LOADS SUBFILE * 3. DISPLAYS FOOTER * 4. EXCERCISE THE SCREEN DISPLAY WITH THE * SUBFILE ************************************************************************** * LOG OF MODIFICATIONS * * DATE PGMR DESCRIPTION *------------------------------------------------------------------------- * / / ************************************************************************** * FUNCTION OF INDICATORS * * IND FUNCTION *------------------------------------------------------------------------- * 12 USED TO EXIT DISPLAY * 51 USED TO DISPLA / CLEAR SUBFILE ************************************************************************** * SUBROUTINE INDEX ************************************************************************** * LOAD - INITILIZE THE SUBFILE AND START LOADING IT BASED ON SLSMNNO ************************************************************************** * FILES ************************************************************************** SECFILE IF E K DISK SLSMNCMLF IF E K DISK CUSTMASTSFCF E WORKSTN SFILE(CMSFL:RRN) ************************************************************************** * STANDALONE VARIABLES ************************************************************************** DRRN S 4S 0 D SDS DUSRID 254 263 DDSLSMNNO S 3S 0 ************************************************************************** * MAINLINE ************************************************************************** C EXSR LOAD C DOU *IN12 = *ON C EXFMT CMCTL C ENDDO C EVAL *INLR = *ON C RETURN ************************************************************************** * LOAD SUB FILE ROUTINE ************************************************************************** C LOAD BEGSR C USRID CHAIN SECURITY C EVAL DSLSMNNO = SALMNO C EVAL *IN52 = *ON C WRITE CMCTL C EVAL *IN52 = *OFF C DSLSMNNO CHAIN SLSMN C READ SLSMN C DOW dslsmnno = icmslsmn C EVAL DCUSTNO = ICMCUST# C EVAL DCUSTNAME = ICMNAME C EVAL DSTATUS = ICMSTATUS C EVAL DSALES = ICMSLSYTD C ADD 1 RRN C WRITE CMCTL C READ SLSMN C ENDDO C ENDSR -- 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 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.