As400 Session Device Error Occurred
Contents |
no ratings. Published: 02 Jun 2012 Revised: 23 Jan 2013 - 1347 days ago Last viewed on: 01 Oct 2016(8329 views) MainURL: Using IBM i? Need to create Excel, CSV, HTML, JSON, session or device error occurred in file PDF, SPOOL reports? Learn more about the fastest and least expensive tool for
Session Or Device Error Occurred In File Rpg
the job: SQL iQuery. "Session or Device error occurred" while using Subfiles in RPGLE Published by: deepthi on 02 Jun 2012
Session Or Device Error Occurred In File Subfile
view comments(6) I faced this issue once while using the subfiles. In that case it was because there was no record eligible in my Physical file that can be displayed on the screen and
Session Or Device Error Occurred In Display File
i guess i didn't initialize some of the subfile variables. Can you please explain me various cases (through your experience) where we see this error and what has to be done to avoid it. Return to midrangenews.com home page. Sort Ascend | Descend COMMENTS (Sign in to Post a Comment) Posted by: bobcozzi Site Admin **** Chicagoland www.cozTools.com/qryfile Comment on: "Session or Device error occurred" while using Subfiles in how to display empty subfile in as400 RPGLEPosted: 4 years 4 months 12 hours ago If the DSPSFL keyword is optioned ON, and the number of Subfile records = 0 it causes an error. I tend to use the SFLRCDCSR keyword and if that's 0 or greater than the number of records in the file, you also get an error. Posted by: neilrh Premium member * Jackson, MI Comment on: "Session or Device error occurred" while using Subfiles in RPGLEPosted: 4 years 3 months 28 days 18 hours 11 minutes ago As Bob says the most common reason is an empty subfile. Many, many programmers seem to use a single indicator for both SFLDSP and SFLDSPCTL - and never consider the situation where the subfile might be empty. Posted by: DaleB Premium member * Reading, PA Comment on: "Session or Device error occurred" while using Subfiles in RPGLEPosted: 4 years 3 months 28 days 17 hours 47 minutes ago Bob, did you mean SFLRCDNBR, possibly SFLRCDNBR(*CURSOR)? Like Neil says, I tend to use 11 SFLDSPCTL and 11 12 SFLDSP, which allows me to display the control record even if the subfile is empty. This also sets me up for N11 SFLCLR, for initializing the empty subfile. On 11 N12, I write
? Ask a question, help others, and get answers from the community Discussions Start a thread and discuss today's topics with top experts Blogs Read the latest tech blogs written by experienced community members AS/400 session and device error Nikrajpapa 250 pts. incorrect relative record number or field selection error. Tags: Thanks! We'll email youwhen relevant content isadded and updated. Following Follow AS/400 Thanks! rnx1255 We'll email youwhen relevant content isadded and updated. Following Follow AS/400 errors I've encountered this session and device error: 2>> CALL CSCNIKH/RPGLE1 incorrect record number in subfile sflrcdnbr or sflsiz field. SFLDSPCTL or SFLDSP option required for PUTGET. ? C SFLDSPCTL or SFLDSP option required for PUTGET. ? C Session or device error occurred in file DSPF1. Function check. RNX1255 unmonitored by RPGLE1 at statement 0000000028, instruction X'0000'. http://www.midrangenews.com/view?id=1788 Session or device error occurred in file DSPF1 (C G D F). Session or device error occurred in file DSPF1 (C G D F). What should I do? Asked: June 16, 20147:05 AM Last updated: June 16, 201412:46 PM Related Questions RPG/400 Error RNQ1255 how to display blank rows in a subfile in rpgle How can we write an AS/400 subfile program without using any indicators? how to update pf using dspf through rpgle http://itknowledgeexchange.techtarget.com/itanswers/ass400/ Object locks on display files Answer Wiki Last updated: June 16, 201412:46 PM GMT philpl1jb54,090 pts. History Contributors Ordered by most recent philpl1jb54,090 pts. Michael Tidmarsh48,580 pts. Thanks. We'll let you know when a new response is added. Your rpgle program is doing a write or exfmt on a subfile control record in the display file. If it's a write then either the indicator controlling SFLDSPCTL or SFLCLR or SFLINZ must be on. If it's an EXFMT then the indicator controlling SFLDSPCTL must be on. If you expet to see the SFL then also SFLDSP must be on.
Your rpgle program is doing a write or exfmt on a subfile control record in the display file. If it's a write then either the indicator controlling SFLDSPCTL or SFLCLR or SFLINZ must be on. If it's an EXFMT then the indicator controlling SFLDSPCTL must be on. If you expet to see the SFL then also SFLDSP must be on. Please enter an answer. Send me notifications when members answer or reply to this question. Register Hereor login if you are already a member E-mail User Name Password Forgot Password? By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processefrom GoogleSign inHidden fieldsSearch for groups or messages
November 20, 2013 Position record to top of subfile I recently received a message asking about subfiles: I know this is a stupid question and I have done this a million times before, but I'm just blocked now and can't figure out what is wrong. My subfile is fully loaded, it is a few pages long. Enter was pressed on a second page, so I need the same page displayed when control is passed back to the subfile. For some reason it goes back to the first page. The questioner must be asking about a "expanding" or a "load all" type of subfile, as this would not be an issue in the "page a time" subfile. Fortunately there is a quick, and easy, solution for this problem by the addition of one line of code to the display file's source and a just two lines to the RPGLE/RPG IV's source. In the DDS source code for the subfile the following line needs to be added to the subfile control record: AAN01N02N03T.Name++++++RLen++TDpBLinPosFunctions++++++++ A Z1SFLRCD 3S 0H SFLRCDNBR(CURSOR) The Subfile Record Number keyword, SFLRCDNBR, is used to specify that the subfile record number moved to the field is displayed on the current subfile page. Or, to put it another way, if you select a record on the second page of the subfile the second page is displayed. If you specify *TOP, see below, then the selected record appears at the top of the current subfile. AAN01N02N03T.Name++++++RLen++TDpBLinPosFunctions+++++++++++++ A Z1SFLRCD 3S 0H SFLRCDNBR(CURSOR *TOP) In your RPGLE/RPGIV program you have to move a value into the SFLRCDNBR field, if you do not you will get a "RNQ1255 - Session or device error occured in file..." error Below is the code I used to load the subfile: 01 for Z1RRN = 1 to 999 ; 02 read TESTPFR ; 03 if (%eof) ; 04 leave ; 05 endif ; 06 write SFL01 ; 07 endfor ; 08 if (Z1RRN > 1) ; 09 IndDs.SflDsp = *on ; 10 Z1SFLRCD = 1 ; 11 endif ; After loading the subfile from the file, TESTPF lines 1 - 7, I check, line 8, if the subfile contains any records. If it does then I turn on the SFLDSP indicator, line 9. I know I am not doing something like *IN01 = *ON, I use the Indicator Area in the display file and Indicator Data Structure in my program. To learn more see No more number indicators. Line 10 is where I have added the code to position the subfile to the first record, therefore, when the subfile is displayed it starts with its first record. In the area of the code I perform the check to see if any of the subfile's records have been chan