Arlina
7th October 2019, 07:23
Hi All,
I am facing this weird issue.
I have 5 dlls with similar logic. All of these are using the same domains/tables/flow of control etc. Only the main table selection is different as each of the dll is being used for creating different files depending upon selection on the session.
3 of these dlls are working completely fine by creating the files and transferring them to a local folder.
For the remaining 2 dlls, the files are getting generated on the server and return values of seq.close/seq.puts is also a success
But I am getting connection lost error (sometimes on server2client or clicking on any variable or just randomly)
I am debugging this thing for last 3 days with no success.
Can anyone please help me with this?
Thanks & Regards,
Arlina
günther
7th October 2019, 09:56
Hi Arlina,
in such cases, I would use logging to a file instead of debugging because that gives a different timing behaviour. I have a special logging function that opens a log file in append mode, writes to that file and closes the file - that's a little overhead, but I can always look into the log file and have no problems with buffered I/O.
Regards
Günther
mark_h
7th October 2019, 16:40
I think Gunther recommendation is good. The only other thing I can think of is to use a tool like wireshark to track the connection from the baan server all the way to the client. See if that helps to find the component that might be failing or causing you to lose the connection. In the past we have found load balancers(1 node with issues) and other network devices causing a dropped connection. Never done it myself, but others have.
Arlina
7th October 2019, 17:39
Hi All,
Thanks, guys for all the help and guidance.
But it seems the issue is not with the network.
What we found is, if we add any separator in the file it works perfectly fine. But without separator(not even a space as a separator) some spaces are getting added in the file which causes the issue.
As per the requirement, the file should be without any separator(we have a fixed length defined for each file-field).
Any suggestions/help/guidance is highly appreciated.
Thanks & Regards,
Arlina
Arlina
8th October 2019, 07:37
Let me explain the whole situation now.
We want to create a file with fixed-length file fields without any separator.
For example column parent= tccom010.pctf is of length 20. Even if it is blank it needs to occupy 20 blanks spaces in the file. We are presently using sprintf$("%*s",20,shiftl$(parent)
So the length of each data line to put into the file is always 3140 characters.
If we use any separator than there is no fixed-length file field and data line length is significantly reduced.
Can the size/formatting affect the behavior?
mark_h
8th October 2019, 19:04
There is always a possibility of some unprintable characters getting hung up in a field some where causing the issue. I don't think a fixed length field should cause the issue. Not sure if it is possible, but can you check the file for something like that on the server side? That is about the only thing I can think of.
okneb1
9th October 2019, 10:04
I really doubt this will have any impact, but try adding "t" to the openmode in seq.open call if you don't have it already:
If you now have seq.open ("file", "w+"), try with:
seq.open ("file", "wt+")
Also try playing around with text.mode option in function server2client (We almost always have it on true)
server2client (string source, string dest, boolean text.mode [, boolean progress.window] [, boolean read.only])