AS400 Subfile session or device error

2375 pts.
Tags:
AS400 Subfile
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. ???

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

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 processed in the United States. Privacy

Discuss This Question: 18  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

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 processed in the United States. Privacy
  • Sureyz
    DOW *in12 = '0' Seton 2526 Write blank Write foot1 WRITE MSGSFC Seton 2526 Exfmt sfc01 Setoff 2526
    2,375 pointsBadges:
    report
  • TomLiotta
    Impossible to say. What is the error message ID? How is the file defined? -- Tom
    125,585 pointsBadges:
    report
  • Sureyz
    Session or device error occurred in file NM2401DA its showing only this message.. Surey
    2,375 pointsBadges:
    report
  • Sureyz
    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 ???
    2,375 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • philpl1jb
    Show us the control record please.
    49,600 pointsBadges:
    report
  • Sureyz
    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
    2,375 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • philpl1jb
    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.
    49,600 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • philpl1jb
    without setting the value of rrn ???I thought MSGSFC might be the message subfile control record. 
    49,600 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • Sureyz
    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
    2,375 pointsBadges:
    report
  • philpl1jb
    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 
    49,600 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • Sureyz
    Finally i got the result. The reason is there is no record in specific subfile Thank you very much Phil and Tom.
    2,375 pointsBadges:
    report
  • gourav6060
    hey...i have some problem in sub file...it show session error..!!
    20 pointsBadges:
    report
  • TomLiotta
    i have sm problm in sub file   If it's the "same problem", then we've already covered it in the above comments. There is nothing more we can add. What do you think we should do?   Of course, if there is a difference in your problem, you have to tell us what's different so we know how to reply.   Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

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 processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following