Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Save webfocus messages to a log file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Save webfocus messages to a log file
 Login/Join
 
Platinum Member
posted
When running the following focexec in webfocus using devstudio(MR):
-------------------------------------
DEFINE FILE CAR
CNT/I5 WITH CAR = 1;
END
TABLE FILE CAR
SUM CNT
BY COUNTRY
ON TABLE HOLD AS HOLDCAR FORMAT ALPHA
END
? HOLD HOLDCAR
-------------------------------------
Results in the following messages:
--------------------------------------------------------------------------------

No HTML Output!

--------------------------------------------------------------------------------


0 NUMBER OF RECORDS IN TABLE= 10 LINES= 5
0DEFINITION OF HOLD FILE: HOLDCAR
0FIELDNAME ALIAS FORMAT
COUNTRY E01 A10
CNT E02 I5


I would like to be able to save these messages in a log file and copy this file to another directory. Can someone tell me how to write these messages to a file as well as being displayed as an html page?

Thanks
 
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005Report This Post
Platinum Member
posted Hide Post
Hello Jim,

A simple method to save and display.

DEFINE FILE CAR
CNT/I5 WITH CAR = 1;
END

TABLE FILE CAR
SUM CNT
BY COUNTRY
ON TABLE SAVE AS HOLDCAR FORMAT ALPHA
END

TABLE FILE CAR
SUM CNT
BY COUNTRY
END
? HOLD HOLDCAR
-EXIT
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
<JG>
posted
Unfortunately in WebFocus it's not possible to redirect the sysprint output.

The only option that is available is for you to use the browser file/save as option.
Make sure that you select text and it will drop the html tags.
 
Report This Post
Platinum Member
posted Hide Post
Hi JG,

Thanks for the response. I was afraid that might be the answer. If anyone else knows how to save the focus log messages, please let me know.

I will actually use reportcaster to schedule this process. Can the log messages be saved into a seperate file in this case?

Thanks
 
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005Report This Post
Master
posted Hide Post
Guys,

There is almost always a way to do anything in FOCUS/WebFOCUS. When You run a report and hold the output you can then use the CHECK FILE command and redirect the output to HOLD and then query HOLD. &LINES gives you the number of Records Held in the actual Reports.

TABLE FILE CAR
...

...

ON TABLE HOLD AS HOLDCAR
END

-RUN
-* Store TOTAL NUMBER LINES in var TOTALRECS
-SET &TOTALRECS = &LINES;
-RUN

CHECK FILE HOLDCAR HOLD

-* If you want to see what is in HOLD isses the following command

? HOLD

DEFINE FILE HOLD
TOTALRECS/I9 = &LINES;
END

FILEDEF SAVEME DISK ..........

TABLE FILE HOLD
PRINT
TOTALRECS
...
...
ON TABLE SAVE AS SAVEME FORMAT ALPHA
END


Hope this helps

This message has been edited. Last edited by: Kerry,
 
Posts: 865 | Registered: May 24, 2004Report This Post
Platinum Member
posted Hide Post
Hi TexasStingray,

Thanks for the example. I would agree with you that there is usually a way to do about anything you want in Focus/Webfocus, but in this case, I'm looking for a way to redirect all messages to a file that could be saved for future reference or trouble shooting.

Thanks again for the post.

Jim
 
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005Report This Post
Expert
posted Hide Post
not in caster, but when you run a job Deferred, you can View the Echo file...and its saved ....
Old mainframe days we used to be able to save the sysout...
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
Hi susannah,

Thanks for the input. I've picked up several tips from many of your other posts to this forum. It's always interesting to see how other people solve different problems. Thanks Again!

I'm a long time Focus user(mostly mainframe), but I'm new to webfocus and I'm still stumbling around trying to figure out this new environment.

I've got a couple of questions relating to this topic of saving the focus messages that are generated during the execution of a multi-step focexec:

1) You said when you run a job deferred, that you can view the echo file. Where is the echo file?

2) When I run a webfocus session, the following files(along with the .mas, .ftm, .foc etc files) are generated in the temp directory:
stderr.log and stdout.log
But unfortunately they are empty. Is there some way to activate these log files? Any help would be greatly appreciated.

Jim
 
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005Report This Post
Guru
posted Hide Post
Try adding this to the beginning of your code....

FILEDEF EMGFILE DISK C:\IBI\EMGFILE.TXT
SET EMGSRV=FILE
-RUN
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
Platinum Member
posted Hide Post
Hi Piipster,

Thanks for the suggestion. I tried your filedef and set command but the file is always empty. Any thoughts?

Thanks
Jim
 
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005Report This Post
Guru
posted Hide Post
You are running against Managed Reporting, right?

Where is your WebFOCUS Reporting server installed? This is where the file will get created. You need to be allocating a file on the server that you can create/write to.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
Platinum Member
posted Hide Post
Hi Piipster,

The webfocus server is windows NT. I've tried running my test both in MR and outside of MR with the same results. The EMGFILE.TXT gets created on the server but is always empty. Any other ideas?

I would still like to know what these two files are used for during a febfocus session:

1) stderr.log
2) stdout.log

If I copy all files from the temp directory to a permanent directory, these two files are always there, but they are empty. Does anyone know about these files?

Jim
 
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005Report This Post
Expert
posted Hide Post
when you run a fex deferred (click right, pick Run Deferred from MRE Domain Builder..i never use devstu), then go look at it when its done (click on Deferred Status icon), one of the buttons you can select for that job when its done is VIEW...when you VIEW, you'll see the echo, provided of course you've set the echo on at the top of your fex.
Now, in the version i have (525), only the
-SET &ECHO = ON
part is viewable, not the complete
-SET &ECHO = ALL
Not good enuf but better than nothing.
We've all complained...they've listened...but i dont know where it stands. we want to be able to see the echo from a Caster job as well.
I'll upgrade and find out...

and... i have no idea what those log files are, either. someone wiser will come along and tell us. but here's something you can do, but its powerful so use carefully.
if you put this command at the top of your fex
SET TEMPERASE = OFF
you can then look inside that agent directory as your job is running and when its done..and all your interim hold files are still there. they won't be erased. you can examine them.
however...this setting is now in effect for your whole site...so its dangerous. if you've got a development box, you're fine. If not, SET TEMPERASE = ON (the default) as SOON as you can.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
quote:
however...this setting is now in effect for your whole site...so its dangerous
More precisely, the TEMPERASE setting remains as is, for that agent, and files remain in place in its temp directory -- which will affect whatever request next gets assigned to that particular agent.

Other agents go their merry may, quite unaffected.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
Jack, i don't find that to be the case, actually.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
Depends.

If it's in edasprof.prf, the effect is global (since each agent executes that at start of any user's 'session').

But if it appears in an "application" fex, it will only have effect on a particular agent if and when the agent executes that fex.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Guru
posted Hide Post
Jim,
Please let me know if you found the solution for saving the system log messages to a file. I need to do exactly the same thing here and I've been looking to find one all over.

Any help wud be greatly appreciated.

Thx
-P
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Platinum Member
posted Hide Post
-P,

Sorry, no solution yet. I've got many jobs scheduled via reportcaster, but unfortunately don't have any log files to refer to in case I need to trouble shoot any problems. At the end of most of my focus procedures, I copy .ftm, .foc, .mas, .pdf files off to a permanent location, but I would sure like to be able to save a log file of the focus messages that are generated as well.

I'm glad you brought this up again. Maybe there is a solution out there, if so, please let us know.

Thanks
Jim
 
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005Report This Post
Gold member
posted Hide Post
This may be a stupid suggestion, but could you create log database entries using SQL passthru when certain conditions occur? You could log the values of global variables such as &FOCERRNUM &FOCFOCEXEC &DATE &TOD &IORETURN &RETCODE &LINES &READS &RECORDS... You get the idea. I don't know if this will do what you want or not. I hope so....

-IF &FOCERRNUM NE 0 THEN GOTO LOGERROR
-LOGERROR
SQL ORA
INSERT INTO LOG_TABLE(
LOG_DATE,
LOG_TIME,
LOG_ERROR)
VALUES (
'&DATE',
'&TOD',
'&FOCERRNUM');
COMMIT;
 
Posts: 90 | Location: Tinker AFB | Registered: June 03, 2003Report This Post
Expert
posted Hide Post
say Jim, what about your Caster log file? you say you don't have access to 'any log files'? Someone in your shop must have access to the Caster Console. In 52, the log has a nice small concise synopsis of every caster job, and highlights in RED if there's a messup; in 53 the log has the whole detailed log...and if you have &ECHO=ALL in your job you'll get more info that you can stand! well, more than i can stand anyway. Your log output for each caster job can actually look just like the Deferred Job output... Sounds like you need access to your Caster Console; Your admin should be monitoring that log anyway, and purging it from time to time.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
Jim, how good is your java? Your origional request can be done by writing a filter for the webfocus servlet. You can trap the servlet response, then selectively decide what to deliver and/or log.
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Save webfocus messages to a log file

Copyright © 1996-2020 Information Builders