Sometimes we observe session and device errors
when working with display files in the RPG program. How can we resolve this session and device error?
Sorry, you do not have permission to ask a question, You must login to ask a question.
Sorry, you do not have permission to ask a question.
session device error can occur in the following situation
SFLRCDNBR
orSFLSIZ
field has an incorrect record number.EXFMT
execution and theSFLDSP
indication is set *ON.9999
records for theLoad All subfile
on the Display file.We usually get the error
Session or device error occurred in file SubfileName (C G D F)
when we try to display an empty subfile by setting the indicator ON associated with theSFLDSP
keyword. So, setting theSFLDSP
indicator off would resolve this session or device error. You may also get this session or device error if you do not include theSFLDSPCTL
keyword in your subfile control record format.This session or device error can also occur when the field and position in DDS are incorrect and display a window subfile in an incorrect position.