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



> > 
> > "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 
> > -- 

It looks like you are writing to the subfile control record rather than
the subfile record. Can you post the DDS? This will make it easier to
find out what is going on.

     
Thanks,
Terry 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.