- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Typing Logfiles
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007 04:03 AM
06-06-2007 04:03 AM
I have a developer who's written a service using Cobol on OpenVMS. When this program was written in C and was a background process, the logfile could be typed out without a problem so the data could be viewed. Now that we've rewritten it in Cobol as a service that is picking up messages from a Websphere MQ Queue, we're having problems doing this. Options we've been given are to Close and then Open the file in Extend mode every so many records or reduce the disk cluster size so the allocated log file blocks will be filled sooner and can be typed.
Both of these options seem way too extreme. Does anybody have an easier solution as to how we may accomplish this?
Thoughts and advise are much appreciated.
Wanda
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007 04:10 AM
06-06-2007 04:10 AM
Re: Typing Logfiles
$FLUSH?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007 04:14 AM
06-06-2007 04:14 AM
Re: Typing Logfiles
CALL "SYS$FLUSH" USING BY VALUE THE_POINTER_TO_THE_RAB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007 04:16 AM
06-06-2007 04:16 AM
SolutionYou may be interested by the trick detailed by John Gillings in this thread
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=629558
which lets you view the logfile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007 05:47 AM
06-06-2007 05:47 AM
Re: Typing Logfiles
It looks like your doing your own rms open. check the fab. check that fab$b_shr has fab$v_shrget set. look at the rms manual for $open, there may be others. look also at $update $write. if the C code did
its own open, check what settings it has
for rms bits. Hope this helps -Dean
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007 07:19 AM
06-06-2007 07:19 AM
Re: Typing Logfiles
My leading suspect would be that the file is opened for exclusive use. Without looking at the code, it is hard to be precise.
Certainly, ensuring that the file is opened for sharing (admittedly with a single writer), and flushing the buffers on a periodic (timed) basis (timers and ASTs are excellent for this to simplify the logic, as I have mentioned in my DECUS presentations on using the AST facility), should allow use of the TYPE command to display the file (as you already do for batch jobs).
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007 07:31 AM
06-06-2007 07:31 AM
Re: Typing Logfiles
Thanks
Wanda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007 08:16 AM
06-06-2007 08:16 AM
Re: Typing Logfiles
status% = sys$flush(RAB by ref,[err by ref],[suc by ref])
where err and suc would be optional completion routines. status would have
the return status (r0) also located in
the rab, rab$l_sts. hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007 09:45 AM
06-06-2007 09:45 AM
Re: Typing Logfiles
If the log file is opened for shared read, you should not have to deal with the log flush operation -- this is very likely what the C code was doing. (Details of sharing output log files in C are over in the FAQ.) As for your case here, I'd probably look for and try something like OPEN OUTPUT mumble WITH LOCK ALLOWING READERS mumble -- or some such -- in your existing procedure division? When sharing is turned on, RMS deals also with the stuff in flight for you.
The brute-force option is to have the COBOL code call the (working) C code for its log I/O. That's certainly feasible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007 10:41 AM
06-06-2007 10:41 AM
Re: Typing Logfiles
Just checking that: -
"When this program was written in C and was a background process,"
was the log file of which you speak the sys$output of the background process? (and now it's not?)
Otherwise, what did the C declaration look like?
Cheers Richard Maher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007 10:43 AM
06-06-2007 10:43 AM
Re: Typing Logfiles
You don't need an explicit FLUSH, you just need to open the file from COBOL allowing shared write access. This is not the default. Something like:
OPEN OUTPUT yourfile ALLOWING WRITERS.
(not sure if "WITH LOCK" is required).
Now when another process opens the file with write intent, RMS will force your COBOL process to flush the output and update the EOF. The advantage is the output is always up to date when you want it, but work is only done when required, rather than a periodic flush, where you do more work than necessary, and still have a potential latency.
If you do want/need to perform direct RMS functions on COBOL files, you can obtain the RAB and/or FAB in a supported (but, obviously, not portable) manner using routines DCOB$RMS_CURRENT_RAB or DCOB$RMS_CURRENT_FAB. See Appendix E of the COBOL Reference Manual for details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2007 12:39 PM
06-06-2007 12:39 PM
Re: Typing Logfiles
[ Fancy meeting you here !]
I'm 99% sure to be in STL early next week, so we can go over some optionss.
The easiest way to go really is to 'allowing readers' in Cobol, that shoudl be all that is needed. Be sure to apply deferred write otherwise you'll get an IO per display.
Cobol is likely to use non-record IO for noshared output, in which case the SYS$FLUSH trick you are considering will not work.
Still, if you want example of getting to a RAB from Cobol and using them froa SYS$FLUSH call then check out my directories on VRXDEV::[DIGITAL.HEIN]. There are probably examples floating around from last year (LOCK.COB? UNSHIP.COB?)
My Cobol trace tool (Bob H!) may help to see some gory details if needed.
Did you already try CONVERT/SHARE to see the data?
Cheers,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2007 08:36 AM
06-29-2007 08:36 AM
Re: Typing Logfiles
Wanda