1,485 pts.
 AS400 Subfile session or device error
DOW *in12 = '0' Seton 2526 Write blank Write foot1 WRITE MSGSFC Exfmt sfc01 call 'L1000C' These codes are from my program when i'm executing these pgm im getting seesion or device error. I checked with debugging , when the execution comes to the EXFMT line its showing the error.. Pls giv me some suggestion.. wt will be the problem. ???

Software/Hardware used:
ASKED: December 20, 2012  7:33 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question. Sureyz   1,485 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

DOW *in12 = ’0′
Seton 2526
Write blank
Write foot1
WRITE MSGSFC
Seton 2526
Exfmt sfc01
Setoff 2526

 1,485 pts.

 

Impossible to say. What is the error message ID? How is the file defined? — Tom

 108,025 pts.

 

Session or device error occurred in file NM2401DA

its showing only this message.. Surey

 1,485 pts.

 

I have Checked with the Debugging while its executing the,
EXFMT SFC01
only its throwing this error message.
Do i need to setoff the indicators before doing EXFMT ???

 1,485 pts.

 

Never forget the [help] key (F1) for anything displayed by the system. (And anything you create for a display should include help that you create.)
 
Move the corsor somewhere on the message and press F1. The [help] display should guide you on what to do to begin determining your problem. Among other things, it will show any message ID. It will also enable F10 to let you look at any specific error messages in the joblog that describe details about an error.
 
For the indicators, we don’t know if they should be on or off or if they have anything to do in your programming at all. You haven’t shown us where they are defined. We still don’t know how the file is coded.
 
Tom

 108,025 pts.

 

Show us the control record please.

 44,150 pts.

 

Current library changed to L1ASRCU.
Library list changed.
Unable to retrieve query options file.
**** Starting optimizer debug message for query .
All access paths were considered for file M1AMC00.
Additional access path reason codes were used.
Access path of file M1AMC04 was used by query.
Unable to retrieve query options file.
**** Ending debug message for query .
Member M1AMC00 file M1AMC00 in L1ASRCT opened.
Unable to retrieve query options file.
**** Starting optimizer debug message for query .
All access paths were considered for file N1AMB00.
Access path built from keyed file N1AMB05.
Unable to retrieve query options file.
**** Ending debug message for query .
Member N1AMB00 file N1AMB00 in L1ASRCU opened.
SFLDSPCTL or SFLDSP option required for PUTGET.
? C
SFLDSPCTL or SFLDSP option required for PUTGET.
? C
Session or device error occurred in file NM2401DA.
Session or device error occurred in file NM2401DA.
Unmonitored exception at line 599

 1,485 pts.

 

SFLDSPCTL or SFLDSP option required for PUTGET.
 
That’s the error.
 
You are doing EXFMT against a subfile control record. But both SFLDSPCTL and SFLDSP options are not enabled. You have enable one or both of those in order for EXFMT to work with a control record. Most likely you want both to be enabled.
 
Tom

 108,025 pts.

 

Show us the subfile control record please sfc01.

Your logic doesn’t seem to write a subfile record,if that’s the case you cannot turn on the display command SFLDSP.  Of course you might not be showing us the piece of the code that writes to the subfile.

 44,150 pts.

 

Not writing subfile records might do it. I assumed that MSGSFC was a subfile record, and it seems likely that sfc01 is the control record. Indicators 25 and 26 looked as if they would enable SFLDSP and SFLDSPCTL. The small bit of code looks fine; but without seeing the definitions, there’s no way to know. — Tom

 108,025 pts.

 

without setting the value of rrn ???I thought MSGSFC might be the message subfile control record. 

 44,150 pts.

 

Yeah, I thought it might be a message subfile element, too, but there’s no way to know from what we see. As for RRN, if only one record was written, it could have been set anywhere earlier, even in a D-spec. If we’re only shown a small snippet, we shouldn’t have to assume that other parts of the program are relevant. But if the subfile is written in code that we can’t see, then this isn’t a single-line subfile and MSGSFC isn’t the subfile line. (Maybe this dialog will explain to the OP why we can’t say with certainty how to fix it, because we can’t see the relevant source code.) — Tom

 108,025 pts.

 

Simply,
I’m using three different subfiles here.
One is MSGSFL(Message Subfile),
Second one is SFL01(Subfile to Edit(Both Mode)).
Third one is SFL02(Subfile to Display the same records in sfl01(Output Mode)).

Initially im having one Single Record format display file.. While im calling the program it first goto the single record format, then if i press F9 there it should come to the SFL01 to add some records(which is showing the error now). Then it will save all the records on a PF.
and the both subfiles having the same indicators like SFLDSP – 25 and SFLDSPCTL – 26 and SFLEND – N30

 1,485 pts.

 

to add records?Seton 2526Exfmt sfc01with SFLDSP on, one or more records must exist in the subfile.SFLINZ might be used to provide some blank records.Phil 

 44,150 pts.

 

You can probably remove the WRITE instruction for MSGSFC. If that’s an actual message subfile, the system will take care of it for you.
 
Other than that, Phil knows about subfiles. He’s right. You can’t display a subfile if you haven’t put records into it. You can WRITE records into it in your programming, or you can have the system write blank records into it by setting SFLINZ (subfile initialialize).
 
Tom

 108,025 pts.

 

Finally i got the result. The reason is there is no record in specific subfile

Thank you very much Phil and Tom.

 1,485 pts.