Progress-4GL Writing to log file - progress-4gl

When running a progress-4gl program, I am able to write to a log file using the log-manager. However, when writing out message statements they only appear when I use message view-as alert-box. ie:
log-manager:logfile-name = "queue.p"
message "this will not appear".
message "this will appear" view-as alert-box.
Will show up in the log file as:
[12/05/10#09:03:21.154-0700] P-11993170 T-000001 1 4GL -- this will appear
Is there any way I can force the log-manager to write out message statements that do not include view-as alert-box? Our legacy code uses the message statement everywhere and I would prefer to not have to go through all related libraries updating it.

I fear getting messages (without "VIEW-AS ALERT-BOX") to the clientlog file is not possible.
Progress help says: "OpenEdge writes all ABL VIEW-AS ALERT-BOX messages to the log file".
(LOG-ENTRY-TYPES attribute > 4GLMessages).

Are you thinking of something like the LOG-MANAGER:WRITE-MESSAGE( ) method?

you should use in this case a Batch startup parameter. -b
then will no messages displayed (except errors).
prowin32.exe -p c:\test.p -b
you can define, where should be the messages logged. then will not displayed the errors too.
for example:
prowin32.exe -p c:\test.p -b > c:\Test.txt

Related

issues with fork() and taking a file as input standard

i have a program called tinydb this program use 4 fork() to create 4 child process called insert,delete,update,select .the parent process send message from the getline(cin,buffer) to the corresponding child by check the first word.the children process will execute the message and create a log file and cout the directory/name of the log file.
all are working when i send command to tinydb however when i try to use a file as a input standard for tinydb ,something is going wrong. ./tinydb student_db.bin < query.txt on the console all i see is the cout of the parent process ,the cout of the child process is not shown and the child doesnt create a log file however when i try to use debug on clion for tinydb with the rediction input of clion = query.txt all work fine.the cout of children are shown the logs are made.
i really want to know why its wrong, thank you.
p.s : i can't find the tag for redirection of the input standard to a file.
find a way for my children to be able to cout to the terminal and create a log.

CMD, REXX, need a way to detect an error

I'm very very new to programming/coding.
And I have a very specific question, which I didn't find any answers to.
This command below executes perfectly fine if the command is valid.
If I enter an invalid command, an error occurs and the cmd exits.
enter image description here
But how do I make it, if an error happens, the program starts from the beginning rather than the cmd window closes?
So, in short, I want "SIGNAL start" to happen if an error occurs.
I hope you understand, thank you very much.
other:
SAY "Enter your own command:"
PULL command
command
IF command=ERROR THEN DO
SIGNAL start
It would be helpful if you published all of your code but it seems that what you really need to do is code a loop.
/* REXX */
do forever
say "Enter a command"
pull command
"where" word(command,1)
if rc <> 0 then iterate
command
end

VBA 6.5 - "Bad File Name or Number" error on Form.Show - Run-time Error 52

EDIT: This ended up being more of a "how does the MS VBA IDE work?" kind of question. It was highlighting a function call when it erred out, but it was a line of code within the function actually causing the issue. By using the "Step Into" and "Step Over" actions (F8 and Shift+F8 respectively by default), you can walk through your code until you find the line that actually caused the error. Trying to step over this line will cause the VBA IDE to go back to the initially-highlighted line of code.
I have a simple VBA user form I've developed for use with Microsoft Excel 2007. A button on one of my sheets shows this form using the following lines of VBA:
Sub ShowMyDialog()
MyFormName.Show
End Sub
This was working perfectly fine yesterday. Today I open the .xlsm file and click the button to show the form again, and I get a "Run-time Error 52: Bad File Name or Number" error.
When I click "Debug" it just takes me to the line in which I'm showing the form above. The name is correct, and this hasn't changed since the last time it was in a working state. My form does open files from a directory, but if this were the problem, wouldn't it direct me to the line of code doing the file opening?
Thanks!
My form does open files from a directory, but if this were the problem, wouldn't it direct me to the line of code doing the file opening?
Not without an error handler, and not without error handling configured to break in classes. The code you posted is irrelevant to the issue and isn't causing the error.
Your form has some code that runs on load/initialization/activation, which fails opening a file, as the error message says.
Any code that's accessing outside resources must have error handling.
Private Sub DoSomething
On Error GoTo CleanFail
DoSomethingThatCanBlowUp
CleanExit:
Exit Sub
CleanFail:
' handle errors here
End Sub

Checking start up error messages in Emacs

When I invoke Emacs, I see some error messages which are replaced by the main window (startup screen) pretty soon. How can I access these error messages?
The error messages are stored in the *Messages* buffer. There is a command to open it: C-h e. You can also just click on the echo area in the bottom of the window.
By default, the last 1000 lines of messages are saved. You can change this by setting the variable message-log-max.

Oddball issue arising with use of TextWrangler to edit Python 2.7 script which tests multithreading and Queue modules

I'm writing a script in Python 2.7 exploring the use of the multithreading and Queue modules. the script just defines two functions, one of which will be started in a thread instance to fill a Queue, and a second one which will be started in a second thread instance to pull something off the Queue. However, I cannot even get this script to execute, as it chokes on one of the function definitions even before it executes. The code snippet with the problem is:
def listenThread(counter):
while queue.empty() != True:
try:
outcome = queue.get()
print outcome
counter -=1
print counter
except:
return 'queue.get() command loop failing.'
The error message I am getting is:
$ python threading-and-queue-test.py
File "threading-and-queue-test.py", line 34
except:
^
IndentationError: unindent does not match any outer indentation level
$
I've searched SO and checked the docs for correct formation of the try-except construct, and it seems OK. I had earlier versions of the code (without the try-except ) working, so I am getting suspicious about the text editor, TextWrangler v4.0.1.
Can anyone suggest a debug approach or code correction?
Thanks!
Red
As you have already suspected, it is most likely an indentation error. Your text editor is probably mixing the use of tabs and spaces. Replace all tabs with spaces (or vice versa though the standard in python is 4 spaces) and you should see the error disappear.
For those who find this question later like I did it's easy to fix TextWrangler's settings and stop this issue altogether; Go to "Preferences" -> "Editor Defaults" -> "Auto-expand tabs" then set tabs to 4 spaces. Restart TextWrangler for changes to take affect. For existing documents that continue giving you a problem read this.