when will come session device error?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / katiyar
The Session and Device error occurs when program tries to
load data to display file (Subfile). The program should have
correct logic to load data from Database file to Subfile
using RRN(Relative Record Number). Then only data will be
loaded successfully to display file (subfile) else it will
be encountered with session and device error.
To prevent Session and Device error, One should understand
the Display file (Subfile) programming.
| Is This Answer Correct ? | 11 Yes | 3 No |
Answer / raj
1. If RRN is not incresing correctly
2. If sfldsp and sfldspctl are set on proparlly
3. In load all if records exceeds 9999 and even less than
zero
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / sahish
Check the records are write in sub file
write sfl
for each record
| Is This Answer Correct ? | 0 Yes | 1 No |
what is overlay? how can we pass parameters in cl or rpg programing? how can we get data area value in cl or rpg programming?
What is the purpose of FRCDTA keyword?
What is the name of default out queue when user logs inn to syatem with valid profile?
How can we access Interactive job LDA in Batch Job?. and How we can access a file in interactive QTEMP lib in Batch job?.
How to declare the more than one file in cl/400.
can you debug ile rpg program using isdb?
What will happen if we r using seton lr after return or vice versa.
1. I have2 records in a PF. READ PF DO DSPLY EMPNO RETRN DSPLY EMPNO ENDDO What was the output 2. SETON LR vs RETURN 3. Primary File 4. How to delete a deleted spaces 5. How to read a PF in reverse order in CL 6. I have a object in Lib A, B and C. But it shows in D Lib..Why? 7.
Setps to create .csv file on IFS folder in AS/400( V4R3)....?
Have a join logical file with more than one members with different record formats. So how can we read the different members from this file and also how we can read the different record format from the join logical?
can I touch the array during treatments?
how to find whether a date format is valid or not in RPG400 not in RPGILE.Can you please write the coding for this sir,i'm new to AS400.Please help.