Answer Posted / katiyar
As I mentioned above RRN (Relative Record Number) may be a
cause of "Session and Device Error". So In program code, at
display(EXFMT) subfile code, check the value of RRN. If is
is zero and you are making on the SFLDSP indicator *On or it
is un-conditional and doing display subfile. Then it will
give you the same error.So to avoid this situation you can
code in the way it mentioned below.
C If (RRN <= *Zeros)
C Eval *In32 = *OFF
C Else
C Eval *In32 = *ON
C EndIf
Where *In32 is SFLDSP indicator in Subfile code.
------------------OR-------------------
C If (RRN > Zeros)
C EXFMT SFLCTL (Subfile Control Display)
C EndIf
Both ways can be choose to avoid RRN related error.
==========================================================
Except the RRN, There are literally hundreds of other things
that can cause a "session or device error," and each has
exactly one "right" solution.For e.g. there may be chances
that you have not declared the keyword 'SFILE' i.e
SFILE(subfile rcdfmt name : RRN) while declaring
display(subfile) file in F-specs of your program. If so then
one can get the "session or device error".
Therefore, when you get a "session or device error," look at
the job log. In the job log will be a message that will
tell you exactly what the problem is. And also understand
all in better way, one should understand subfile programming
first.
Is This Answer Correct ? | 14 Yes | 0 No |
Post New Answer View All Answers
how do I declare a table or array in rpg iv?
How Chain operation copies the record's data to the input buffer for the program?
How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique
What is the difference between copybooks and subprocedures in as400?
how do I preserve and clean the array?
Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?
How to write record if no field or the field are different in physical file in rpgle ?
what is an online rpg?
What is the difference between iter and do?
How to select highest score of each subject or how to select highest income of every month?
thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400
is this a rpg channel?
how do I declare a minor?
what is the difference between do while and do until?
during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.