I now basics of VBA and use it to send or get data in AS 400, but I am not so advanced to understand documentation of IBM "Host Access Class Library". I want to know how can I detect error in AS400 for now I am using script below or skip errors by self, outside of running macro.
Sub check_error()
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLPS.wait 100
autECLSession.autECLPS.SendKeys "[reset]"
End Sub
When error appear I cannot use some commands like autECLOIA.WaitForInputReady, So instead I use 'wait 100' in my 'check_error' but it not always work. So how can I detect error, is there any command to do that? Or a method to handle it?
This is a massive topic that, unfortunately, depends on the application. There are so many ways that errors can be presented to the user on a 5250 display that one method can not fit all circumstances. It might be best to just ask us about your specific use case rather than all use cases.
However, let me give you a high level view of some of the ways errors can be presented.
External Message Queue
This is when the program sends a status message to the *EXT message Queue. These messages are displayed on the last line of the display. They do not appear in the job log, and are typically not used for exceptions, but they also do not end the program.
Program Message Queue
An application can define a message subfile which is a record format that displays on the screen between lines 1 and 24 on an 80x24 screen, or between lines 1 and 27 on a 132x27 screen. Where it appears, and the number of display lines it uses are defined in the display file DDS. The appearance of a message in this message subfile may be the only indication of an error, but it may contain informational messages as well. You are going to have to determine which it is by the text of the message. In conjunction with the message, a field may also be reverse imaged, or colored in a way that indicates an error, but the keyboard is not locked, and there is no audible indication that there is a problem.
DDS Error Messages
DDS error messages can be defined that lock the keyboard, reverse image the field, and display an error message. These messages can be displayed on any line as well, which is configurable in the DDS. In addition to the typical display lines, there is an addition line: 25 on a 80x24 screen, and 28 on a 132x27 screen, that is accessible to these messages.
Custom Error Messages
And sometimes an error is indicated in a completely custom way, for example by populating a text field somewhere on the screen.
The point is that you need to know your application, and how it provides user feedback, and without that knowledge, we can't help you.
Related
I call the FM MESSAGES GIVE into Function Module MRM_SRM_INVOICE_SIMULATE, how do I find the point where the error is generated?
Thanks
Further data is needed to give you appropriate help.
But have you already tried to add a breakpoint in the MESSAGE statement?
To do this:
Open debugger via /h + action
then in menu Breakpoints -> Breakpoint at -> Breakpoint at statement [Shift+F5]
in the pop-up window grid, write MESSAGE in the first line and then click Ok.
after that, you need to replicate the error and the debugger will stop in EVERY MESSAGE statement reached in runtime.
Note: there may be many MESSAGE statements reached. Yo need to check one by one using F8 key.
Extract the message ID MSGID and message number MSGNO from the list of messages as displayed.
Then try the following:
Try to find the place where the message was triggered by static code analysis: In transaction SE91, navigate to the message given by MSGID and MSGNO, then perform a Where-Used-List for the single message. This will give you the code places where that message is issued. Put a breakpoint at each place and repeat the transaction that leads to the message. The system should stop at the point where the message is issued.
Some developers issue their messages dynamically (with variables for MSGID and MSGNO), so that the points where they are issued cannot be found by static code analysis. This is bad, but there is another way to find it. The breakpoint at statement MESSAGE as described in the answer of #cape_bsas usually stops too often, but you can put a watchpoint on the field SY-MSGNO, instructing the debugger to stop as soon as SY-MSGNO assumes the given message number.
I'm trying to implement the transfer of a one-time code from SMS to the field above the keyboard, as in the image.
But for some reason the field above the keyboard is not displayed.
Code:self.valueTextField.textContentType = UITextContentTypeOneTimeCode;
UI hierarchy:
+UIView
CustomContentView
UIImageView
UITextField - valueTextField
UITextFieldContentView
I have read these materials:soQuestion and apple docs , and I saw a warning:
If you use a custom input view for a security code input text field, iOS cannot display the necessary AutoFill UI.
... but I do not understand what is meant by custom input view.
Also I have category for UITextField. Can it affect the work?
I will be glad to any ideas, thanks!
Okay. This is what I could find out. Regarding the code, it is enough that I described above. Additional settings on the client is not required. But you need to pay attention to the text of the SMS message. As an example, I attached two messages.
In the first message, our code is defined by the system as a phone number. We can even call it if we click on it. But why do we need to call a one-time code? :)
In the second image, the code is defined as one-time, just what we need. If we click on it, the system will offer to copy it to the clipboard.
What is the difference? Unfortunately, it is not completely clear by what rule the text is parsed in SMS. But we can check your text in the following way:
If you set a property textContentType to your text field and nothing works for you, the first thing you need to check is whether the operating system determines the code correctly. To do this, simply go to the message application and check the code:
blue font color with underscore - the system did not recognize
one-time code.
black font color (as default) with a gray underscore - it's okay!
At the end, in the first case, you should check the text of the message for the contents of incorrect characters.
PS Just a couple of examples of correct and incorrect SMS:
SMS-code: 12345 £ correct
SMS-code: 12345 $ correct
SMS-code: 12345 № correct
SMS-code №1: 12345 incorrect
I got caught out by the fact "Autofill PAsswords" was turned off on the phone.
It seems that it needs to be on for this functionaility to work.
I recently added the ability for a FBP runtime that I am building to send the network protocol commands output and error. When using app.flowhub.io for the client, the error message shows up in a message window but I don't see the message that accompanies the output command when it is sent. The websocket frame sent to the noflo ui from my runtime looks like:
{"protocol":"network","payload":{"type":"message","message":"Hello"},"command":"output"}
Where should I expect to see the message text for an output command?
The network output and errors should show in the right hand panel, under the runtime connection info. You may need to press the eye icon to open it.
However I believe only strings are supported.
I am considering writing a graphical tool that will show you what gnu-screen sessions you have and what windows are available in them. You would then be able to, for example, click on the window title and it would take you there. I do not want to modify gnu-screen in any way so that my tool can work with existing installations on other machines and so on.
I can get ordinary output from programs running inside screen out of the screen session by using a log-file, or by copying the last few lines into the exchange-buffer. What I really need in order to make a nice user interface though is the contents of the status line (the line that temporarily appears at the bottom of the window). For example, to get the list of windows in a session I can send the windowlist command, but the result is never part of the output. Does anyone know if there is a way to make screen put its messages into the log, into a paste-buffer, into the current window, or anything similar where I can grab it from another program?
I have some code in Form Load event. It is doing fine. But when it reaches to pick data from database, no commands are executing after that. There is no error at all but it just goes silent.
I tested it as follows:
MsgBox("1")
vrStudentName = DsGetPprStatusfromEnrSummary.tblPaperEnrSummary.Rows(0).Item("StudentName")
MsgBox("2")
Please advise.
Thanks
Furqan
Message Box one is showing data but not the message box two. In fact, the second message box statement is not showing any response at all.
This is a nasty problem on 64-bit operating systems. Any exception raised in code that's run from a form's Load event is swallowed without a diagnostic. This is an old problem that is not getting solved because the DevDiv and the Windows groups at Microsoft are pointing fingers at each other. My finger is pointing at the Windows group but that doesn't help either.
Two basic ways to solve this problem:
Project + Properties, Compile tab, scroll down, Advanced Compile Options, change the Target CPU option from x86 to AnyCPU. This disables the Wow64 emulation layer that swallows the exception.
Debug + Exceptions, tick the Thrown box for "Common Language Runtime Exceptions". The debugger stops as soon as the exception is thrown.
Also keep in mind that it is very rarely necessary to use the OnLoad method or Load event. Only code that requires the Size or Location or Handle of the form to be accurate needs it. Anything else belongs in the constructor of the form. That Load is used so often is a VB6 anachronism, carried over in the designer design which made the Load event the default event for a Form. Add a constructor by typing "Sub New".
Well, it seems pretty obvious that the call to DsGetPprStatusfromEnrSummary.tblPaperEnrSummary is never returning; which means the problem is IN THERE somewhere.
So what on eath is it? I'm guessing it's a DataSet, yes?
But you've referenced it staticly, which is YuckyPooPoo(TM) IMHO, because it's a complex artifact, and you've rendered EVERYTHING which references it unisolatable, and therefore fundamentally untestable!
Received answer on Codeproject
In the dialog that comes up, put a tick in every checkbox under both "Thrown" and "Unhandled". Press OK.
Now, when you run your app though the debugger, it will break for any exception, even if you have an active handler. This should help you track down the problem.
Issue RESOLVED