View previous topic :: View next topic
|
Author |
Message |
Appu
New User
Joined: 26 Apr 2010 Posts: 73 Location: India
|
|
|
|
Hello Team,
I am having a PLI module which is having a file declaration in OUTPUT mode. From the PLI I am calling an assembler module in a loop which is actually writing to the file. The problem is that if I am writing to the file only from the ASSEMBLER or PLI , the contents are there. But if I am trying to write from both the PLI and the ASSEMBLER, it retains the contents written from PLI only. Could you please tell me why this happens and how it can be overcome. Is the FILE open in OUTPUT mode in PLI is the problem. ? |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
I think the problem is due to the fact that the PL/1 program and Assembler program have separate DCBs. Since the PL/1 DCB is the last accessed/closed, anything written to the Assembler programs DCB gets lost.
The solution? There is none - only one program can safely access the file.
Garry. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Instead of writing in the pl/i code, call the assembler with the record to be written and let the assembler code actually issue the write.
The assembler would need to be changed to determine if the invocation was a "write-only" request or the original processing request. Change the parameter list to add a new first-parm to indicate which process is being invoked (or change the assembler to have multiple entry points - for simplicity, you may want to just add the new parm). |
|
Back to top |
|
|
|