network failure during a file write results in application termination

Dear Sir,
we are in PB 9.2.
We are trying to write to a file in a network location. and
due to network failure FileWrite() operation is failing but
in that case the application control does not continue to
next line but application termination happens.
Try
li_status = FileWrite(FileNum, ls_textdata)
if li_status = -1 then
       MessageBox('Error', 'File write failed due to network
issues')
       Return -100
end if
Catch (runtimeerror er)
   .....
end try

but at this point, the control is not coming to catch,
niether is it continuing in try block. Application is
terminating.
Please tell us what the solution is? are there any patches
to PB 9.2 that we can apply in order to overcome the issue?
Thanks in advance for help.
-
paniraj n
0
Paniraj
1/13/2011 10:30:11 AM
sybase.powerbuilder.general 62418 articles. 11 followers. Follow

4 Replies
704 Views

Similar Articles

[PageSpeed] 27

13.01.2011 13:30, Paniraj N wrote:

> we are in PB 9.2.

There is no PB 9.2, and PB9 is EOLed anyway. If you have support 
contract, you can get 9.0.3 update, and that's all.

> Please tell us what the solution is?

Do not write files over the network, especially over the crappy one.

Dmitri.
0
Dmitri
1/13/2011 10:40:58 AM
Maybe you could write to temp file localy and then copy that file to
network location.

On 13.1.2011 11:30, Paniraj N wrote:
> Dear Sir,
> we are in PB 9.2.
> We are trying to write to a file in a network location. and
> due to network failure FileWrite() operation is failing but
> in that case the application control does not continue to
> next line but application termination happens.
> Try
> li_status = FileWrite(FileNum, ls_textdata)
> if li_status = -1 then
>        MessageBox('Error', 'File write failed due to network
> issues')
>        Return -100
> end if
> Catch (runtimeerror er)
>    .....
> end try
> 
> but at this point, the control is not coming to catch,
> niether is it continuing in try block. Application is
> terminating.
> Please tell us what the solution is? are there any patches
> to PB 9.2 that we can apply in order to overcome the issue?
> Thanks in advance for help.
> -
> paniraj n
0
Goran
1/13/2011 1:33:31 PM
Hi Paniraj,

I'm not sure but you can play around with the current application's error 
reporting mode. Be very careful with this one. Here's an example how to 
temporarily switch the mode before your function call and then to restore it 
back to its original state:

External function declaration:
-----------------------------
FUNCTION uint SetErrorMode(uint uMode) Library "KERNEL32.DLL"

Code block:
------------
// The system does not display the critical-error-handler message box.
// Instead, the system sends the error to the calling process.
Constant uint SEM_FAILCRITICALERRORS = 1

// The system does not display the general-protection-fault message box.
// This flag should only be set by debugging applications that handle 
general protection (GP) faults themselves with an exception handler.
Constant uint SEM_NOGPFAULTERRORBOX = 2

// 64-bit Windows:  The system automatically fixes memory alignment faults
// and makes them invisible to the application.
// It does this for the calling process and any descendant processes.
// After this value is set for a process, subsequent attempts to clear the 
value are ignored.
Constant uint SEM_NOALIGNMENTFAULTEXCEPT = 4

// The system does not display a message box when it fails to find a file.
// Instead, the error is returned to the calling process.
Constant uint SEM_NOOPENFILEERRORBOX = 32768

uint lui_current_mode

// ...

// Prevent the system from displaying a message box asking the user to 
insert a floppy disk or a compact disc
lui_current_mode = SetErrorMode(SEM_FAILCRITICALERRORS)

if not GetVolumeInformation(as_drive, lpVolumeNameBuffer, nVolumeNameSize, 
lpVolumeSerialNumber, lpMaximumComponentLength, lpFileSystemFlags, 
lpFileSystemNameBuffer, nFileSystemNameSize) then
   // ... setting some error flags
   SetErrorMode(lui_current_mode)
   return
end if

// Restore original Error Mode
SetErrorMode(lui_current_mode)

Regards,
Ivaylo

<Paniraj N> wrote in message news:4d2ed433.29c7.1681692777@sybase.com...
> Dear Sir,
> we are in PB 9.2.
> We are trying to write to a file in a network location. and
> due to network failure FileWrite() operation is failing but
> in that case the application control does not continue to
> next line but application termination happens.
> Try
> li_status = FileWrite(FileNum, ls_textdata)
> if li_status = -1 then
>       MessageBox('Error', 'File write failed due to network
> issues')
>       Return -100
> end if
> Catch (runtimeerror er)
>   .....
> end try
>
> but at this point, the control is not coming to catch,
> niether is it continuing in try block. Application is
> terminating.
> Please tell us what the solution is? are there any patches
> to PB 9.2 that we can apply in order to overcome the issue?
> Thanks in advance for help.
> -
> paniraj n 


0
Ivaylo
1/13/2011 2:25:15 PM
Hmmm - it's odd the Catch is not catching the error.
I use the same construct (using 'runtimeerror') to catch
null references all the time (and I _know_ that works).
How about submit a case (it's free) and it will be looked into
for the current version.

However, like the other posts, PB 9.2 is way out of date
and I doubt any more updates are coming...

Regards,
Reed Shilts
<Standard-Disclaimers-Apply/>

On 13 Jan 2011 02:30:11 -0800, Paniraj N wrote:

>Dear Sir,
>we are in PB 9.2.
>We are trying to write to a file in a network location. and
>due to network failure FileWrite() operation is failing but
>in that case the application control does not continue to
>next line but application termination happens.
>Try
>li_status = FileWrite(FileNum, ls_textdata)
>if li_status = -1 then
>       MessageBox('Error', 'File write failed due to network
>issues')
>       Return -100
>end if
>Catch (runtimeerror er)
>   .....
>end try
>
>but at this point, the control is not coming to catch,
>niether is it continuing in try block. Application is
>terminating.
>Please tell us what the solution is? are there any patches
>to PB 9.2 that we can apply in order to overcome the issue?
>Thanks in advance for help.
>-
>paniraj n

0
Reed
1/13/2011 3:08:57 PM
Reply:

Similar Artilces:

writing file::find results to an file
Hi, I'm using file::find to (obviously!) find files, but I want the results to be placed in a text file so I can send the paths via email to others. Could someone have a look at this code (granted it might and is messy), But look at all lines beginning with * (near the bottom) and tell me why it dumps EVERY file it looks at into my text file. Any help would be appreciated. When i just print out the results to the screen, it works, when I try to put it into a file it doesn't... Thanx a zill... ben #!usr/bin/perl -w use File::Find; use File::Basename; $match=<ST...

Powerbuilder Application Execution Error (R0006) Application terminated
I receive the following message in my Jaguar srv.log file. "Powerbuilder Application Execution Error (R0006). Application terminated." Question 1. Is this a generic error message or does it point to a specific reason. Question 2. First I will include these lines from srv.log leading up to and including the application error message. Item 1. **************************************************************************** **** Dec 05 09:35:02 2001: HTMLDW: Entering SetServerServiceClasses('n_sc_specimen;') Dec 05 09:35:02 2001: Constructor 09:35:02 Dec 05 09:35:02...

PowerBuilder Application Execution Error (R0094) Application terminated.
Hi all, Do you know what is the problem of EAS server (3.61) , it generate error as below. I try to find out but fail. Regards, Frankie May 21 15:05:48 2002: Frankie *** Refreshing Product Catalog May 21 15:05:48 2002: ACTIVATE for n_product May 21 15:05:48 2002: BEGINNING refresh() May 21 15:05:49 2002: PB exception caught in tryInvoke May 21 15:05:49 2002: DESTRUCTOR for n_product May 21 15:05:49 2002: SystemException: INTERNAL (orderentry/n_product/refresh__L - <system>@0.0.0.0) May 21 15:05:49 2002: PowerBuilder Application Execution Error (R0094) Application t...

Asp application not able to write file to back end file server
I have 3 front end web servers running .net framework. They all have an ASP application running on there local drive but I want the content from this application to write to a central location. I've created a virtual directory on each front end web server in IIS to point to the back end folder , it's using a domain account to access the folder with full permissions(also opened the folder to everyone full permission for testing), the same account that asp is using configured in the machine.config file. In the web.config file I have the TempDocsphysicalpath (\\share\folder\temp) pointing to th...

How can I launch other application from PowerBuilder and wait until the launched application terminates before continuing?
I need to write function launches the application specified by StringParameter with the command line parameters. The function should wait until the launched application terminates before continuing. How can I do it using PowerBuilder and Windows API ? mail: igorm@proactivityinc.com In article <i6rNFfSBAHA.203@forums.sybase.com>, igor@proactivityinc.com says... > I need to write function launches the application specified by > StringParameter with the command line parameters. The function should wait > until the launched application terminates before continuing...

How to write the XML file on the network
Dim objODA As New localhost2.WebServiceMethods Dim ds As New DataSet ds = objODA.GenerationOfRecords() Dim filename As String = "\\chasocopweb\ESOWebServices\WSGenerationOfRecords.xml" ' Create the FileStream to write with. Dim myFileStream As New System.IO.FileStream(filename, System.IO.FileMode.Create) ' Write to the file with the WriteXml method. ds.WriteXml(myFileStream) UltraWebGrid1.DataSource = ds UltraWebGrid1.DataBind()With the help of the above code I am trying to write the XML file on the network I am getting error.How to resolve this?Thanks I'd believe you'd need to ...

Writing the result of a query to a file
I currently have a dynamic query builder in ASP that the user can display the results of the query in a table or dump to a double-quote qualified, coma-delimited file. (to save as a .csv or whatever) I'm in the process of rebuilding the application in .NET, but have not be able to figure out how to write to the file in this mannor. Before it seemed quite simple using set and looping through all the entries writing a line at a time, but how do you do this in .NET. Below I have my code, which is very similar to how I populate my datagrid for the same query, but in this ...

powerbuilder application on novell network?
Hi! Can anyone tell me if a powerbuilder executable will run on a novell network? TIA, Sharon It will -- have you tried it? Are you experiencing any issues? -- pbm_hopethishelps, Roy Kiesler [TeamSybase] Sybase Developer Network (SDN) - http://www.sybase.com/sdn "Sharon Abenoja" <sabenoja@akersgroup.com> wrote in message news:Ry9T7xsu$GA.201@forums.sybase.com... > Hi! > > Can anyone tell me if a powerbuilder executable will run on a novell > network? > > TIA, > > Sharon > > PB 6.5, NT4SP5 I have a situat...

Reading and writing network files
I am attempting to read and write files that are located on a server. The FileOpen always returns a -1. I feel sure that this should work, but my guesses are not working. Shouldn't it be as simple as using the network drive's mapped letter on the client? Ie: h:\network drive\file.txt??? thanx! I would use the full syntax \\server\directory\filename.ext because there is no guarantee that every client has the same letter mapped to that directory. Are you sure the network logon at the client has appropriate rights to the file? Randy Harmon wrote in message ... >I am ...

NDPS write failure on network
We've got a problem that when we try to print large pdf documents, an error box comes up titled NDPS Print Provider for Netware - Error with the text A write fault occured on the network. And then nothing prints. Printing is through NDPS agents on a 5.1 server. We are having some space problems on the SYS vol on this server, but I can't see where the agents spool stuff to (we have some queues set up and they are all set up to spool to another volume, but I can't see where agents use to spool things to - I presume they spool somewhere). Having said that, I&#...

network writing file error
Any idea. When saving a file to a server via a VPN line. Intermittenly it can be saved and some time it failed with error: writing error.In other testings, copy a file to that destination folder could intermittenly come up with the same symptom of problem. Looking into the destination folder, temporary file was created instead. e.g. saving an image named inform.jpg from Paint Shop Pro V.8, when it failed a temporary file named SAV01.tmp was created. This workstation runs nwc 491sp4 Server runs netware 6.5sp5 SLP DA is up and no slp error is logged. duplica...

Writing an XML file to the network
I am trying to write an XML file to a network location using the XMLWriter.  But I get a bad username/password error. The aspnet_wp account does have write permissions on the folder. What should I try?   Do you have <identity impersonate="false"/> in Web.config?Andrey Dudarev...для нас невозможного мало... Can you output the content to the browser window? Try this link: http://aspnet.4guysfromrolla.com/articles/092403-1.aspxDon't forget to click "Mark as Answer" on the post(s) that helped you.This credits that member, earns you a point and ...

Writing formatted results to a file
------_=_NextPart_001_01C1E569.B001A870 Content-Type: text/plain; charset="iso-8859-1" Hi guys I was wondering if you could help me. Does anybody know how to write formatted results to a file ? I am getting the following error : write() on closed filehandle main::ADDRESSLABEL at ./test.pl line 2785, <SUMMARYTMP> line 5. write() on closed filehandle main::ADDRESSLABEL at ./test.pl line 2785, <SUMMARYTMP> line 15. write() on closed filehandle main::ADDRESSLABEL at ./test.pl line 2785, <SUMMARYTMP> line 21. This is the section of my perl code r...

Writing data to file or other application
Hello, Being a relative newcomer to Java and Jaguar I was wondering if anyone can help with a problem I am having. I want to be able to have a java client get some data and display it on an applet using Jaguar connecting to a database (I've done this and it all works), then either write this data to a file so that another application can read it (or send it to another application). As I understand Java will not let you write to a local file as it breaks security, so what is the preferred means of achieving this. Do I have to serialise the data and send it via a socket...

Web resources about - network failure during a file write results in application termination - sybase.powerbuilder.general

Application - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

The Bachelor 2016 application process can get explicit - Laurina Fleure
CHANNEL Ten is calling on singles to sign up for a chance to find love on The Bachelor , but willing applicants have to open a lot more than ...

Perth man’s Afghan wife slapped with 10-year visa application ban - PerthNow Search Search
A MAN’S three-year struggle to have his wife live with him in Australia has ended in heartache after his spouse was slapped with a 10-year ban. ...

Application developers struggle to adapt to changing licensing models
Application producers are aware of rapid change impacting their ability to make money from their software products, but they're not adopting ...

MBA: Mortgage Applications Decrease in Latest MBA Weekly Survey, Purchase Applications up 30% YoY
From the MBA: Mortgage Applications Slightly Decrease in Latest MBA Weekly Survey Mortgage applications decreased 0.2 percent from one week ...

Elon Musk Requests Applications For Autopilot Software Engineers On Twitter
... and more quickly achieve “generalized full autonomy.” So, if you ever wanted to work for Tesla in such a [&hellip Elon Musk Requests Applications ...

Mortgage applications down 0.2%
Mortgage interest rates haven't moved much in the past three weeks, but they are holding at a higher level than for all of 2015.

Number Of Daily Applications To French Military TRIPLES Overnight
Number Of Daily Applications To French Military TRIPLES Overnight

LED market saturation to drive industry to seek profits in new applications in 2016, says LEDinside
According to LEDinside, LED makers had an especially tough year in 2015. "Despite rising LED lighting market demand and the large scale replacement ...

Windows 10’s broken fall update removes user-installed applications without asking first
Microsoft's latest Windows 10 update is causing problems for at least some users, and uninstalling programs without the user's consent or evidence ...

Resources last updated: 12/3/2015 6:30:54 AM